From f38f2e73df1b9eee14aa09f8537eb17d70857929 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 8 Jun 2009 04:09:35 +0000 Subject: make DND work better don't show a stupid dialog --- dnd-keynav.patch | 11 +++++ metacity.spec | 12 ++++- no-lame-dialog.patch | 133 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 155 insertions(+), 1 deletion(-) create mode 100644 dnd-keynav.patch create mode 100644 no-lame-dialog.patch diff --git a/dnd-keynav.patch b/dnd-keynav.patch new file mode 100644 index 0000000..32f86cf --- /dev/null +++ b/dnd-keynav.patch @@ -0,0 +1,11 @@ +--- metacity-2.27.0/src/core/display.c 2009-06-07 21:35:13.623787399 -0400 ++++ hacked/src/core/display.c 2009-06-06 00:20:58.889278832 -0400 +@@ -3307,7 +3307,7 @@ + meta_display_set_grab_op_cursor (display, screen, op, FALSE, grab_xwindow, + timestamp); + +- if (!display->grab_have_pointer) ++ if (!display->grab_have_pointer && !grab_op_is_keyboard (op)) + { + meta_topic (META_DEBUG_WINDOW_OPS, + "XGrabPointer() failed\n"); diff --git a/metacity.spec b/metacity.spec index 229ab26..01ceb14 100644 --- a/metacity.spec +++ b/metacity.spec @@ -1,12 +1,16 @@ Summary: Unobtrusive window manager Name: metacity Version: 2.27.0 -Release: 1%{?dist} +Release: 2%{?dist} URL: http://download.gnome.org/sources/metacity/ Source0: http://download.gnome.org/sources/metacity/2.27/metacity-%{version}.tar.bz2 Patch0: default-theme.patch # http://bugzilla.gnome.org/show_bug.cgi?id=558723 Patch4: stop-spamming-xsession-errors.patch +# http://bugzilla.gnome.org/show_bug.cgi?id=135056 +Patch5: dnd-keynav.patch +# http://bugzilla.gnome.org/show_bug.cgi?id=584723 +Patch6: no-lame-dialog.patch License: GPLv2+ Group: User Interface/Desktops @@ -68,6 +72,8 @@ API. This package exists purely for technical reasons. %setup -q %patch0 -p1 -b .default-theme %patch4 -p1 -b .stop-spamming-xsession-errors +%patch5 -p1 -b .dnd-keynav +%patch6 -p1 -b .no-lame-dialog autoreconf -i -f @@ -172,6 +178,10 @@ fi %{_mandir}/man1/metacity-window-demo.1.gz %changelog +* Sun Jun 7 2009 Matthias Clasen - 2.27.0-2 +- Make DND work better +- Don't show a lame dialog + * Sun May 31 2009 Matthias Clasen - 2.27.0-1 - Update to 2.27.0 diff --git a/no-lame-dialog.patch b/no-lame-dialog.patch new file mode 100644 index 0000000..fbba206 --- /dev/null +++ b/no-lame-dialog.patch @@ -0,0 +1,133 @@ +--- metacity-2.27.0/src/core/session.c 2009-02-20 10:26:32.000000000 -0500 ++++ hacked/src/core/session.c 2009-06-07 23:46:25.927041281 -0400 +@@ -82,7 +82,7 @@ + static char* load_state (const char *previous_save_file); + static void regenerate_save_file (void); + static const char* full_save_file (void); +-static void warn_about_lame_clients_and_finish_interact (gboolean shutdown); ++static void finish_interact (gboolean shutdown); + + /* This is called when data is available on an ICE connection. */ + static gboolean +@@ -382,7 +382,7 @@ + return; + } + +- warn_about_lame_clients_and_finish_interact (FALSE); ++ finish_interact (FALSE); + + if (session_connection == NULL) + return; +@@ -584,7 +584,7 @@ + + current_state = STATE_DONE_WITH_INTERACT; + +- warn_about_lame_clients_and_finish_interact (shutdown); ++ finish_interact (shutdown); + } + + static void +@@ -1724,13 +1724,6 @@ + return full_save_path; + } + +-static int +-windows_cmp_by_title (MetaWindow *a, +- MetaWindow *b) +-{ +- return g_utf8_collate (a->title, b->title); +-} +- + static void + finish_interact (gboolean shutdown) + { +@@ -1742,89 +1735,4 @@ + } + } + +-static void +-sigchld_handler (MetaNexus *nexus, guint arg1, gpointer arg2, gpointer user_data) +-{ +- gboolean shutdown = GPOINTER_TO_INT (user_data); +- +- if (arg1 == 0) /* pressed "OK" */ +- { +- finish_interact (shutdown); +- } +-} +- +-static void +-warn_about_lame_clients_and_finish_interact (gboolean shutdown) +-{ +- GSList *lame = NULL; +- GSList *windows; +- GSList *lame_details = NULL; +- GSList *tmp; +- GSList *columns = NULL; +- +- windows = meta_display_list_windows (meta_get_display ()); +- tmp = windows; +- while (tmp != NULL) +- { +- MetaWindow *window; +- +- window = tmp->data; +- +- /* only complain about normal windows, the others +- * are kind of dumb to worry about +- */ +- if (window->sm_client_id == NULL && +- window->type == META_WINDOW_NORMAL) +- lame = g_slist_prepend (lame, window); +- +- tmp = tmp->next; +- } +- +- g_slist_free (windows); +- +- if (lame == NULL) +- { +- /* No lame apps. */ +- finish_interact (shutdown); +- return; +- } +- +- columns = g_slist_prepend (columns, "Window"); +- columns = g_slist_prepend (columns, "Class"); +- +- lame = g_slist_sort (lame, (GCompareFunc) windows_cmp_by_title); +- +- tmp = lame; +- while (tmp != NULL) +- { +- MetaWindow *w = tmp->data; +- +- lame_details = g_slist_prepend (lame_details, +- w->res_class ? w->res_class : ""); +- lame_details = g_slist_prepend (lame_details, +- w->title); +- +- tmp = tmp->next; +- } +- g_slist_free (lame); +- +- meta_show_dialog("--list", +- _("These windows do not support "save current setup" " +- "and will have to be restarted manually next time " +- "you log in."), +- "240", +- meta_screen_get_screen_number (meta_get_display()->active_screen), +- NULL, NULL, +- None, +- columns, +- lame_details); +- +- g_slist_free (lame_details); +- +- g_signal_connect (sigchld_nexus, "sigchld", +- G_CALLBACK (sigchld_handler), +- GINT_TO_POINTER (shutdown)); +- +-} +- + #endif /* HAVE_SM */ -- cgit