From 24481514a4c419d12f67119436757db7b55ab61d Mon Sep 17 00:00:00 2001 From: Florian Müllner Date: Thu, 9 Feb 2012 22:03:41 +0100 Subject: - Update to 2.34.2 --- Add-a-newwindowsalwaysontop-preference.patch | 147 +++++++-------- ...uswindows-preference-to-list-windows-that.patch | 197 +++++++++++---------- ...eaking-out-from-maximization-during-mouse.patch | 41 ++--- ...indows_always_on_top-to-newly-raised-acti.patch | 57 +++--- ...s-ancestor-window-on-a-different-workspac.patch | 11 +- ...-current-application-from-no_focus_window.patch | 49 ++--- ...-and-sloppy-focus-return-to-mouse-mode-on.patch | 52 +++--- Stop-confusing-GDK-s-grab-tracking.patch | 18 +- default-window-icon.patch | 45 ----- fresh-tooltips.patch | 2 +- metacity-2.28-empty-keybindings.patch | 15 +- metacity-2.28-xioerror-unknown-display.patch | 6 +- metacity.spec | 53 +++--- screenshot-forkbomb.patch | 84 --------- sources | 2 +- workspaces.patch | 12 -- 16 files changed, 337 insertions(+), 454 deletions(-) delete mode 100644 default-window-icon.patch delete mode 100644 screenshot-forkbomb.patch delete mode 100644 workspaces.patch diff --git a/Add-a-newwindowsalwaysontop-preference.patch b/Add-a-newwindowsalwaysontop-preference.patch index c4b26b5..f3bf1b1 100644 --- a/Add-a-newwindowsalwaysontop-preference.patch +++ b/Add-a-newwindowsalwaysontop-preference.patch @@ -1,48 +1,51 @@ -From c4fba8198bacc8ecf911cb15c9cd9314f3204a85 Mon Sep 17 00:00:00 2001 -From: Owen W. Taylor +From 861a3efb0f531eae767926d18c4d690366306bfe Mon Sep 17 00:00:00 2001 +From: "Owen W. Taylor" Date: Wed, 21 Oct 2009 19:22:35 -0400 -Subject: [PATCH] Add a new_windows_always_on_top preference +Subject: [PATCH] Add a new-windows-always-on-top preference -Add a /apps/metacity/general/new_windows_always_on_top preference. -When set, new windows are always placed on top, even if they are -denied focus. +Add a new-windows-always-on-top preference. When set, new windows +are always placed on top, even if they are denied focus. This is useful on large screens and multihead setups where the tasklist can be hard to notice and difficult to mouse to, so the normal behavior of flashing in the tasklist is less effective. --- - src/core/prefs.c | 17 ++++++++++++++++- - src/core/window.c | 6 +++++- - src/include/prefs.h | 2 ++ - src/metacity.schemas.in.in | 29 +++++++++++++++++++++++++++++ - 4 files changed, 52 insertions(+), 2 deletions(-) + src/core/prefs.c | 20 +++++++++++++++++++- + src/core/window.c | 6 +++++- + src/include/prefs.h | 2 ++ + src/metacity-schemas.convert | 1 + + src/org.gnome.metacity.gschema.xml.in | 22 ++++++++++++++++++++++ + 5 files changed, 49 insertions(+), 2 deletions(-) diff --git a/src/core/prefs.c b/src/core/prefs.c -index e03c816..1bf888b 100644 +index 24a98cd..949f6ed 100644 --- a/src/core/prefs.c +++ b/src/core/prefs.c -@@ -79,6 +79,7 @@ static MetaFocusMode focus_mode = META_FOCUS_MODE_CLICK; - static MetaFocusNewWindows focus_new_windows = META_FOCUS_NEW_WINDOWS_SMART; +@@ -73,6 +73,7 @@ static GDesktopFocusMode focus_mode = G_DESKTOP_FOCUS_MODE_CLICK; + static GDesktopFocusNewWindows focus_new_windows = G_DESKTOP_FOCUS_NEW_WINDOWS_SMART; static GSList *no_focus_windows = NULL; static gboolean raise_on_click = TRUE; +static gboolean new_windows_always_on_top = TRUE; static char* current_theme = NULL; static int num_workspaces = 4; - static MetaActionTitlebar action_double_click_titlebar = META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE; -@@ -358,6 +359,11 @@ static MetaBoolPreference preferences_bool[] = - &raise_on_click, + static GDesktopTitlebarAction action_double_click_titlebar = G_DESKTOP_TITLEBAR_ACTION_TOGGLE_MAXIMIZE; +@@ -261,6 +262,14 @@ static MetaBoolPreference preferences_bool[] = TRUE, }, -+ { "/apps/metacity/general/new_windows_always_on_top", -+ META_PREF_NEW_WINDOWS_ALWAYS_ON_TOP, + { ++ { "new-windows-always-on-top", ++ SCHEMA_METACITY, ++ META_PREF_NEW_WINDOWS_ALWAYS_ON_TOP, ++ }, + &new_windows_always_on_top, + TRUE, + }, - { "/apps/metacity/general/titlebar_uses_system_font", - META_PREF_TITLEBAR_FONT, /* note! shares a pref */ - &use_system_font, -@@ -1271,6 +1277,12 @@ meta_prefs_get_raise_on_click (void) - return raise_on_click || focus_mode == META_FOCUS_MODE_CLICK; ++ { + { "titlebar-uses-system-font", + SCHEMA_GENERAL, + META_PREF_TITLEBAR_FONT, /* note! shares a pref */ +@@ -920,6 +929,12 @@ meta_prefs_get_raise_on_click (void) + return raise_on_click || focus_mode == G_DESKTOP_FOCUS_MODE_CLICK; } +gboolean @@ -54,7 +57,7 @@ index e03c816..1bf888b 100644 const char* meta_prefs_get_theme (void) { -@@ -1709,7 +1721,10 @@ meta_preference_to_string (MetaPreference pref) +@@ -1386,7 +1401,10 @@ meta_preference_to_string (MetaPreference pref) case META_PREF_RAISE_ON_CLICK: return "RAISE_ON_CLICK"; @@ -67,10 +70,10 @@ index e03c816..1bf888b 100644 return "THEME"; diff --git a/src/core/window.c b/src/core/window.c -index 10da47a..0ae6a01 100644 +index 6f5c280..b6a69b0 100644 --- a/src/core/window.c +++ b/src/core/window.c -@@ -1983,7 +1983,7 @@ window_state_on_map (MetaWindow *window, +@@ -2008,7 +2008,7 @@ window_state_on_map (MetaWindow *window, if (!(window->input || window->take_focus)) { *takes_focus = FALSE; @@ -79,7 +82,7 @@ index 10da47a..0ae6a01 100644 } /* Terminal usage may be different; some users intend to launch -@@ -2030,6 +2030,10 @@ window_state_on_map (MetaWindow *window, +@@ -2055,6 +2055,10 @@ window_state_on_map (MetaWindow *window, /* The default is correct for these */ break; } @@ -91,10 +94,10 @@ index 10da47a..0ae6a01 100644 static gboolean diff --git a/src/include/prefs.h b/src/include/prefs.h -index 6698dfe..8c7cd09 100644 +index b86843c..c49e93d 100644 --- a/src/include/prefs.h +++ b/src/include/prefs.h -@@ -35,6 +35,7 @@ typedef enum +@@ -37,6 +37,7 @@ typedef enum META_PREF_FOCUS_MODE, META_PREF_FOCUS_NEW_WINDOWS, META_PREF_RAISE_ON_CLICK, @@ -103,53 +106,55 @@ index 6698dfe..8c7cd09 100644 META_PREF_ACTION_MIDDLE_CLICK_TITLEBAR, META_PREF_ACTION_RIGHT_CLICK_TITLEBAR, @@ -81,6 +82,7 @@ guint meta_prefs_get_mouse_button_menu (void); - MetaFocusMode meta_prefs_get_focus_mode (void); - MetaFocusNewWindows meta_prefs_get_focus_new_windows (void); + GDesktopFocusMode meta_prefs_get_focus_mode (void); + GDesktopFocusNewWindows meta_prefs_get_focus_new_windows (void); gboolean meta_prefs_get_raise_on_click (void); +gboolean meta_prefs_get_new_windows_always_on_top (void); const char* meta_prefs_get_theme (void); /* returns NULL if GTK default should be used */ const PangoFontDescription* meta_prefs_get_titlebar_font (void); -diff --git a/src/metacity.schemas.in.in b/src/metacity.schemas.in.in -index 25ca5f3..14155fa 100644 ---- a/src/metacity.schemas.in.in -+++ b/src/metacity.schemas.in.in -@@ -166,6 +166,35 @@ - - - -+ /schemas/apps/metacity/general/new_windows_always_on_top -+ /apps/metacity/general/new_windows_always_on_top -+ metacity -+ bool +diff --git a/src/metacity-schemas.convert b/src/metacity-schemas.convert +index 9c271c6..f1fce08 100644 +--- a/src/metacity-schemas.convert ++++ b/src/metacity-schemas.convert +@@ -2,3 +2,4 @@ + compositing-manager = /apps/metacity/general/compositing_manager + reduced-resources = /apps/metacity/general/reduced_resources + no-focus-windows = /apps/metacity/general/no_focus_windows ++new-windows-always-on-top = /apps/metacity/general/new_windows_always_on_top +diff --git a/src/org.gnome.metacity.gschema.xml.in b/src/org.gnome.metacity.gschema.xml.in +index e4f86bd..d69d525 100644 +--- a/src/org.gnome.metacity.gschema.xml.in ++++ b/src/org.gnome.metacity.gschema.xml.in +@@ -46,6 +46,28 @@ + this setting. + + ++ + false -+ -+ Whether new windows should always be placed on top -+ -+ The normal behavior is that if a new window is not given the -+ focus (since, for example, the user has interacted with another -+ window after launching an application), then if the window would -+ be stacked on top of the focus window, the window is instead -+ stacked beneath and flashed in the taskbar. This behavior can -+ be annoying on large screens and multihead setups where the -+ taskbar is hard to notice and difficult to get to, so this option, -+ if set, disables this behavior, and new windows are always placed -+ on top, whether or not they get focus. ++ <_summary>Whether new windows should always be placed on top ++ <_description> ++ The normal behavior is that if a new window is not given the ++ focus (since, for example, the user has interacted with another ++ window after launching an application), then if the window would ++ be stacked on top of the focus window, the window is instead ++ stacked beneath and flashed in the taskbar. This behavior can ++ be annoying on large screens and multihead setups where the ++ taskbar is hard to notice and difficult to get to, so this option, ++ if set, disables this behavior, and new windows are always placed ++ on top, whether or not they get focus. + -+ Note that if this option is set, a new window may completely hide -+ the focus window but not get focus itself, which can be quite confusing -+ to users. Also, note that setting this option breaks the normal -+ invariant in the 'click' focus mode that the topmost window always -+ has focus, so its most suitable for use with the 'mouse' and -+ 'sloppy' focus modes. -+ -+ -+ -+ -+ - /schemas/apps/metacity/general/action_double_click_titlebar - /apps/metacity/general/action_double_click_titlebar - metacity ++ Note that if this option is set, a new window may completely hide ++ the focus window but not get focus itself, which can be quite confusing ++ to users. Also, note that setting this option breaks the normal ++ invariant in the 'click' focus mode that the topmost window always ++ has focus, so its most suitable for use with the 'mouse' and ++ 'sloppy' focus modes. ++ ++ + + + -- -1.6.5.rc2 +1.7.9 diff --git a/Add-nofocuswindows-preference-to-list-windows-that.patch b/Add-nofocuswindows-preference-to-list-windows-that.patch index de0eed4..bca6f10 100644 --- a/Add-nofocuswindows-preference-to-list-windows-that.patch +++ b/Add-nofocuswindows-preference-to-list-windows-that.patch @@ -1,14 +1,15 @@ -From 88c66808ec5f2bfba425fc6d6f0b9ac43ed44696 Mon Sep 17 00:00:00 2001 -From: Owen W. Taylor +From 60d38a7c6683001ee2beb72b8f0b0beee4f04bb4 Mon Sep 17 00:00:00 2001 +From: "Owen W. Taylor" Date: Wed, 21 Oct 2009 18:07:12 -0400 -Subject: [PATCH] Add no_focus_windows preference to list windows that shouldn't be focused +Subject: [PATCH] Add no-focus-windows preference to list windows that + shouldn't be focused Notification windows from legacy software that don't set _NET_WM_USER_TIME can be a huge annoyance for users, since they will pop up and steal focus. Add: - /apps/metacity/general/no_focus_windows + no-focus-windows which is a list of expressions identifying new windows that shouldn't ever be focused. For example: @@ -17,22 +18,23 @@ be focused. For example: https://bugzilla.gnome.org/show_bug.cgi?id=599248 --- - src/Makefile.am | 2 + - src/core/prefs.c | 43 ++++ - src/core/window-matcher.c | 582 ++++++++++++++++++++++++++++++++++++++++++++ - src/core/window-matcher.h | 46 ++++ - src/core/window.c | 9 +- - src/include/prefs.h | 6 +- - src/metacity.schemas.in.in | 28 ++ - 7 files changed, 714 insertions(+), 2 deletions(-) + src/Makefile.am | 2 + + src/core/prefs.c | 55 +++ + src/core/window-matcher.c | 582 +++++++++++++++++++++++++++++++++ + src/core/window-matcher.h | 46 +++ + src/core/window.c | 9 +- + src/include/prefs.h | 6 +- + src/metacity-schemas.convert | 1 + + src/org.gnome.metacity.gschema.xml.in | 21 ++ + 8 files changed, 720 insertions(+), 2 deletions(-) create mode 100644 src/core/window-matcher.c create mode 100644 src/core/window-matcher.h diff --git a/src/Makefile.am b/src/Makefile.am -index bd3420f..3baf422 100644 +index 4d405bf..2befe33 100644 --- a/src/Makefile.am +++ b/src/Makefile.am -@@ -65,6 +65,8 @@ metacity_SOURCES= \ +@@ -66,6 +66,8 @@ metacity_SOURCES= \ core/stack.h \ core/util.c \ include/util.h \ @@ -42,53 +44,61 @@ index bd3420f..3baf422 100644 core/window-props.h \ core/window.c \ diff --git a/src/core/prefs.c b/src/core/prefs.c -index 6e41b3c..e03c816 100644 +index 58f11e9..24a98cd 100644 --- a/src/core/prefs.c +++ b/src/core/prefs.c -@@ -25,6 +25,7 @@ +@@ -26,6 +26,7 @@ #include #include "prefs.h" +#include "window-matcher.h" #include "ui.h" #include "util.h" - #ifdef HAVE_GCONF -@@ -76,6 +77,7 @@ static PangoFontDescription *titlebar_font = NULL; + #include +@@ -70,6 +71,7 @@ static PangoFontDescription *titlebar_font = NULL; static MetaVirtualModifier mouse_button_mods = Mod1Mask; - static MetaFocusMode focus_mode = META_FOCUS_MODE_CLICK; - static MetaFocusNewWindows focus_new_windows = META_FOCUS_NEW_WINDOWS_SMART; + static GDesktopFocusMode focus_mode = G_DESKTOP_FOCUS_MODE_CLICK; + static GDesktopFocusNewWindows focus_new_windows = G_DESKTOP_FOCUS_NEW_WINDOWS_SMART; +static GSList *no_focus_windows = NULL; static gboolean raise_on_click = TRUE; static char* current_theme = NULL; static int num_workspaces = 4; -@@ -147,6 +149,7 @@ static void maybe_give_disable_workarounds_warning (void); +@@ -120,6 +122,7 @@ static void maybe_give_disable_workarounds_warning (void); - static void titlebar_handler (MetaPreference, const gchar*, gboolean*); - static void theme_name_handler (MetaPreference, const gchar*, gboolean*); -+static void no_focus_windows_handler (MetaPreference, const gchar*, gboolean*); - static void mouse_button_mods_handler (MetaPreference, const gchar*, gboolean*); - static void button_layout_handler (MetaPreference, const gchar*, gboolean*); + static gboolean titlebar_handler (GVariant*, gpointer*, gpointer); + static gboolean theme_name_handler (GVariant*, gpointer*, gpointer); ++static gboolean no_focus_windows_handler (GVariant*, gpointer*, gpointer); + static gboolean mouse_button_mods_handler (GVariant*, gpointer*, gpointer); + static gboolean button_layout_handler (GVariant*, gpointer*, gpointer); -@@ -425,6 +428,11 @@ static MetaStringPreference preferences_string[] = - theme_name_handler, +@@ -367,6 +370,14 @@ static MetaStringPreference preferences_string[] = NULL, }, -+ { "/apps/metacity/general/no_focus_windows", -+ META_PREF_NO_FOCUS_WINDOWS, + { ++ { "no-focus-windows", ++ SCHEMA_METACITY, ++ META_PREF_NO_FOCUS_WINDOWS, ++ }, + no_focus_windows_handler, + NULL + }, - { KEY_TITLEBAR_FONT, - META_PREF_TITLEBAR_FONT, - titlebar_handler, -@@ -1344,6 +1352,30 @@ theme_name_handler (MetaPreference pref, ++ { + { KEY_TITLEBAR_FONT, + SCHEMA_GENERAL, + META_PREF_TITLEBAR_FONT, +@@ -998,6 +1009,39 @@ theme_name_handler (GVariant *value, } - static void -+no_focus_windows_handler (MetaPreference pref, -+ const gchar *string_value, -+ gboolean *inform_listeners) + static gboolean ++no_focus_windows_handler (GVariant *value, ++ gpointer *result, ++ gpointer data) +{ ++ const gchar *string_value; ++ ++ *result = NULL; /* ignored */ ++ string_value = g_variant_get_string (value, NULL); ++ + if (no_focus_windows) + { + meta_window_matcher_list_free (no_focus_windows); @@ -104,15 +114,19 @@ index 6e41b3c..e03c816 100644 + meta_warning ("Error parsing no_focus_windows='%s': %s\n", + string_value, error->message); + g_error_free (error); ++ ++ return FALSE; + } + } ++ ++ return TRUE; +} + -+static void - mouse_button_mods_handler (MetaPreference pref, - const gchar *string_value, - gboolean *inform_listeners) -@@ -1755,6 +1787,9 @@ meta_preference_to_string (MetaPreference pref) ++static gboolean + mouse_button_mods_handler (GVariant *value, + gpointer *result, + gpointer data) +@@ -1414,6 +1458,9 @@ meta_preference_to_string (MetaPreference pref) case META_PREF_FORCE_FULLSCREEN: return "FORCE_FULLSCREEN"; @@ -122,7 +136,7 @@ index 6e41b3c..e03c816 100644 } return "(unknown)"; -@@ -2633,6 +2668,14 @@ meta_prefs_get_action_right_click_titlebar (void) +@@ -1710,6 +1757,14 @@ meta_prefs_get_action_right_click_titlebar (void) } gboolean @@ -139,7 +153,7 @@ index 6e41b3c..e03c816 100644 return auto_raise; diff --git a/src/core/window-matcher.c b/src/core/window-matcher.c new file mode 100644 -index 0000000..e2fd293 +index 0000000..df889eb --- /dev/null +++ b/src/core/window-matcher.c @@ -0,0 +1,582 @@ @@ -778,10 +792,10 @@ index 0000000..7fc7826 + const char *window_class); +#endif /* META_WINDOW_MATCHER_H */ diff --git a/src/core/window.c b/src/core/window.c -index 8d029a2..10da47a 100644 +index 2f2f800..5440160 100644 --- a/src/core/window.c +++ b/src/core/window.c -@@ -1965,7 +1965,14 @@ window_state_on_map (MetaWindow *window, +@@ -1981,7 +1981,14 @@ window_state_on_map (MetaWindow *window, { gboolean intervening_events; @@ -798,7 +812,7 @@ index 8d029a2..10da47a 100644 *takes_focus = !intervening_events; *places_on_top = *takes_focus; diff --git a/src/include/prefs.h b/src/include/prefs.h -index a4193ff..6698dfe 100644 +index 673cb36..b86843c 100644 --- a/src/include/prefs.h +++ b/src/include/prefs.h @@ -60,7 +60,8 @@ typedef enum @@ -811,9 +825,9 @@ index a4193ff..6698dfe 100644 } MetaPreference; typedef void (* MetaPrefsChangedFunc) (MetaPreference pref, -@@ -106,6 +107,9 @@ MetaActionTitlebar meta_prefs_get_action_double_click_titlebar (void); - MetaActionTitlebar meta_prefs_get_action_middle_click_titlebar (void); - MetaActionTitlebar meta_prefs_get_action_right_click_titlebar (void); +@@ -105,6 +106,9 @@ GDesktopTitlebarAction meta_prefs_get_action_double_click_titlebar (void); + GDesktopTitlebarAction meta_prefs_get_action_middle_click_titlebar (void); + GDesktopTitlebarAction meta_prefs_get_action_right_click_titlebar (void); +gboolean meta_prefs_window_is_no_focus (const char *window_name, + const char *window_class); @@ -821,42 +835,47 @@ index a4193ff..6698dfe 100644 void meta_prefs_set_num_workspaces (int n_workspaces); const char* meta_prefs_get_workspace_name (int i); -diff --git a/src/metacity.schemas.in.in b/src/metacity.schemas.in.in -index a9dd397..34cd7d6 100644 ---- a/src/metacity.schemas.in.in -+++ b/src/metacity.schemas.in.in -@@ -100,6 +100,34 @@ - +diff --git a/src/metacity-schemas.convert b/src/metacity-schemas.convert +index 46f3104..9c271c6 100644 +--- a/src/metacity-schemas.convert ++++ b/src/metacity-schemas.convert +@@ -1,3 +1,4 @@ + [org.gnome.metacity] + compositing-manager = /apps/metacity/general/compositing_manager + reduced-resources = /apps/metacity/general/reduced_resources ++no-focus-windows = /apps/metacity/general/no_focus_windows +diff --git a/src/org.gnome.metacity.gschema.xml.in b/src/org.gnome.metacity.gschema.xml.in +index 8fcdd7c..6900fa6 100644 +--- a/src/org.gnome.metacity.gschema.xml.in ++++ b/src/org.gnome.metacity.gschema.xml.in +@@ -22,6 +22,27 @@ + However, the wireframe feature is disabled when accessibility is on. + + ++ ++ '' ++ <_summary>New windows that shouldn't get focus ++ <_description> ++ This option provides a way to specify new windows that shouldn't get ++ focus. Normally an application specifies whether or not it gets focus ++ by setting the _NET_WM_USER_TIME property, but legacy applications ++ may not set this, which can cause unwanted focus stealing. ++ ++ The contents of this property is a space-separated list of expressions ++ to match against windows. If any of the expressions match a window ++ then the window will not get focus. The syntax of expressions is: ++ ++ (eq [name|class] "<value>"): window name (title) or the class from ++ WM_CLASS matches <value> exactly. ++ (glob [name|class] "<glob>"): window name (title) or the class from ++ WM_CLASS matches the shell-style glob pattern <glob>. ++ (and <expr> <expr>) (or <expr> <expr>) (not <expr): Boolean combinations ++ of expressions. ++ ++ + - -+ /schemas/apps/metacity/general/no_focus_windows -+ /apps/metacity/general/no_focus_windows -+ metacity -+ string -+ -+ -+ New windows that shouldn't get focus -+ -+ This option provides a way to specify new windows that shouldn't get -+ focus. Normally an application specifies whether or not it gets focus -+ by setting the _NET_WM_USER_TIME property, but legacy applications -+ may not set this, which can cause unwanted focus stealing. -+ -+ The contents of this property is a space-separated list of expressions -+ to match against windows. If any of the expressions match a window -+ then the window will not get focus. The syntax of expressions is: -+ -+ (eq [name|class] "<value>"): window name (title) or the class from -+ WM_CLASS matches <value> exactly. -+ (glob [name|class] "<glob>"): window name (title) or the class from -+ WM_CLASS matches the shell-style glob pattern <glob>. -+ (and <expr> <expr>) (or <expr> <expr>) (not <expr): Boolean combinations -+ of expressions. -+ -+ -+ -+ -+ - /schemas/apps/metacity/general/raise_on_click - /apps/metacity/general/raise_on_click - metacity + +-- +1.7.9 + diff --git a/Allow-breaking-out-from-maximization-during-mouse.patch b/Allow-breaking-out-from-maximization-during-mouse.patch index 15005b6..286c873 100644 --- a/Allow-breaking-out-from-maximization-during-mouse.patch +++ b/Allow-breaking-out-from-maximization-during-mouse.patch @@ -1,7 +1,8 @@ -From 339710e884cfbab810382a63fafb3cdab8ee51e9 Mon Sep 17 00:00:00 2001 -From: Owen W. Taylor +From 00d291927a59b6bca164fc5cd2d4729604b40d1c Mon Sep 17 00:00:00 2001 +From: "Owen W. Taylor" Date: Wed, 23 Jun 2010 15:08:38 -0400 -Subject: [PATCH] Allow breaking out from maximization during a mouse resize +Subject: [PATCH] Allow breaking out from maximization during a mouse + resize A maximized window can't be resized from the screen edges (preserves Fitts law goodness for the application), but it's still possible @@ -40,10 +41,10 @@ https://bugzilla.gnome.org/show_bug.cgi?id=622517 4 files changed, 228 insertions(+), 24 deletions(-) diff --git a/src/core/display-private.h b/src/core/display-private.h -index 19287f3..a19d1d8 100644 +index 7f779fd..bb6ba8a 100644 --- a/src/core/display-private.h +++ b/src/core/display-private.h -@@ -170,6 +170,9 @@ struct _MetaDisplay +@@ -178,6 +178,9 @@ struct _MetaDisplay guint grab_wireframe_active : 1; guint grab_was_cancelled : 1; /* Only used in wireframe mode */ guint grab_frame_action : 1; @@ -54,10 +55,10 @@ index 19287f3..a19d1d8 100644 MetaRectangle grab_wireframe_last_xor_rect; MetaRectangle grab_initial_window_pos; diff --git a/src/core/display.c b/src/core/display.c -index 4c7b4c0..2122851 100644 +index 0c5f61d..25cf857 100644 --- a/src/core/display.c +++ b/src/core/display.c -@@ -3353,6 +3353,7 @@ meta_display_begin_grab_op (MetaDisplay *display, +@@ -3470,6 +3470,7 @@ meta_display_begin_grab_op (MetaDisplay *display, #endif display->grab_was_cancelled = FALSE; display->grab_frame_action = frame_action; @@ -65,7 +66,7 @@ index 4c7b4c0..2122851 100644 if (display->grab_resize_timeout_id) { -@@ -3583,11 +3584,20 @@ meta_display_end_grab_op (MetaDisplay *display, +@@ -3700,11 +3701,20 @@ meta_display_end_grab_op (MetaDisplay *display, display->grab_wireframe_rect.x, display->grab_wireframe_rect.y); if (meta_grab_op_is_resizing (display->grab_op)) @@ -92,7 +93,7 @@ index 4c7b4c0..2122851 100644 meta_window_calc_showing (display->grab_window); } diff --git a/src/core/window-private.h b/src/core/window-private.h -index da3fc52..65143ce 100644 +index 7cf5b04..2c07e85 100644 --- a/src/core/window-private.h +++ b/src/core/window-private.h @@ -412,6 +412,11 @@ void meta_window_maximize_internal (MetaWindow *window, @@ -108,10 +109,10 @@ index da3fc52..65143ce 100644 void meta_window_unmake_above (MetaWindow *window); void meta_window_shade (MetaWindow *window, diff --git a/src/core/window.c b/src/core/window.c -index 9af5283..6438540 100644 +index 897161e..427f91f 100644 --- a/src/core/window.c +++ b/src/core/window.c -@@ -2666,9 +2666,11 @@ unmaximize_window_before_freeing (MetaWindow *window) +@@ -2693,9 +2693,11 @@ unmaximize_window_before_freeing (MetaWindow *window) } } @@ -126,7 +127,7 @@ index 9af5283..6438540 100644 { /* At least one of the two directions ought to be set */ gboolean unmaximize_horizontally, unmaximize_vertically; -@@ -2702,13 +2704,13 @@ meta_window_unmaximize (MetaWindow *window, +@@ -2729,13 +2731,13 @@ meta_window_unmaximize (MetaWindow *window, meta_window_get_client_root_coords (window, &target_rect); if (unmaximize_horizontally) { @@ -144,7 +145,7 @@ index 9af5283..6438540 100644 } /* Window's size hints may have changed while maximized, making -@@ -2727,12 +2729,13 @@ meta_window_unmaximize (MetaWindow *window, +@@ -2754,12 +2756,13 @@ meta_window_unmaximize (MetaWindow *window, window->display->grab_anchor_window_pos = target_rect; } @@ -164,7 +165,7 @@ index 9af5283..6438540 100644 /* Make sure user_rect is current. */ -@@ -2749,6 +2752,36 @@ meta_window_unmaximize (MetaWindow *window, +@@ -2776,6 +2779,36 @@ meta_window_unmaximize (MetaWindow *window, } void @@ -201,7 +202,7 @@ index 9af5283..6438540 100644 meta_window_make_above (MetaWindow *window) { window->wm_state_above = TRUE; -@@ -7033,6 +7066,112 @@ update_resize_timeout (gpointer data) +@@ -7124,6 +7157,112 @@ update_resize_timeout (gpointer data) return FALSE; } @@ -314,7 +315,7 @@ index 9af5283..6438540 100644 static void update_resize (MetaWindow *window, gboolean snap, -@@ -7045,6 +7184,7 @@ update_resize (MetaWindow *window, +@@ -7136,6 +7275,7 @@ update_resize (MetaWindow *window, MetaRectangle old; int new_x, new_y; double remaining; @@ -322,7 +323,7 @@ index 9af5283..6438540 100644 window->display->grab_latest_motion_x = x; window->display->grab_latest_motion_y = y; -@@ -7109,7 +7249,9 @@ update_resize (MetaWindow *window, +@@ -7200,7 +7340,9 @@ update_resize (MetaWindow *window, meta_window_update_keyboard_resize (window, TRUE); } } @@ -333,7 +334,7 @@ index 9af5283..6438540 100644 /* FIXME: This stupidity only needed because of wireframe mode and * the fact that wireframe isn't making use of * meta_rectangle_resize_with_gravity(). If we were to use that, we -@@ -7233,6 +7375,8 @@ update_resize (MetaWindow *window, +@@ -7324,6 +7466,8 @@ update_resize (MetaWindow *window, if (window->display->grab_wireframe_active) { @@ -342,7 +343,7 @@ index 9af5283..6438540 100644 if ((new_x + new_w <= new_x) || (new_y + new_h <= new_y)) return; -@@ -7242,18 +7386,60 @@ update_resize (MetaWindow *window, +@@ -7333,18 +7477,60 @@ update_resize (MetaWindow *window, * wireframe, but still resize it; however, that probably * confuses broken clients that have problems with opaque * resize, they probably don't track their visibility. @@ -409,5 +410,5 @@ index 9af5283..6438540 100644 if (window->rect.width != old.width || window->rect.height != old.height) g_get_current_time (&window->display->grab_last_moveresize_time); -- -1.7.0.1 +1.7.9 diff --git a/Apply-new_windows_always_on_top-to-newly-raised-acti.patch b/Apply-new_windows_always_on_top-to-newly-raised-acti.patch index 7df74fb..93378bf 100644 --- a/Apply-new_windows_always_on_top-to-newly-raised-acti.patch +++ b/Apply-new_windows_always_on_top-to-newly-raised-acti.patch @@ -1,29 +1,30 @@ -From c093802679a2232a115da35e8d3a3cfefef0e6dd Mon Sep 17 00:00:00 2001 -From: Owen W. Taylor +From 2bd938c957b27c1055f7f235939c9b8b338d5cbf Mon Sep 17 00:00:00 2001 +From: "Owen W. Taylor" Date: Wed, 23 Jun 2010 19:45:05 -0400 -Subject: [PATCH 2/2] Apply new_windows_always_on_top to newly raised/activated windows +Subject: [PATCH] Apply new-windows-always-on-top to newly + raised/activated windows A window that raises itself or activates itself is in many ways like a completely new window. (Once a window is out of the user's site, they really have no idea if it's mapped or has been withdrawn by the user.) -If the user has set the new_windows_always_on_top key to make the +If the user has set the new-windows-always-on-top key to make the behavior for a focus-stealing-prevented *new* window "raise but not focus", then they'll want the same behavior in the case of windows that attempt to raise or activate themselves as well. https://bugzilla.gnome.org/show_bug.cgi?id=599261 --- - src/core/window.c | 35 +++++++++++++++++++++++++++++++---- - src/metacity.schemas.in.in | 6 ++++++ + src/core/window.c | 35 +++++++++++++++++++++++++++++--- + src/org.gnome.metacity.gschema.xml.in | 6 +++++ 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/src/core/window.c b/src/core/window.c -index 399bb42..c51cdec 100644 +index b6a69b0..897161e 100644 --- a/src/core/window.c +++ b/src/core/window.c -@@ -3000,6 +3000,8 @@ window_activate (MetaWindow *window, +@@ -2970,6 +2970,8 @@ window_activate (MetaWindow *window, MetaWorkspace *workspace) { gboolean can_ignore_outdated_timestamps; @@ -32,7 +33,7 @@ index 399bb42..c51cdec 100644 meta_topic (META_DEBUG_FOCUS, "_NET_ACTIVE_WINDOW message sent for %s at time %u " "by client type %u.\n", -@@ -3021,8 +3023,28 @@ window_activate (MetaWindow *window, +@@ -2991,8 +2993,28 @@ window_activate (MetaWindow *window, "last_user_time (%u) is more recent; ignoring " " _NET_ACTIVE_WINDOW message.\n", window->display->last_user_time); @@ -63,7 +64,7 @@ index 399bb42..c51cdec 100644 } /* For those stupid pagers, get a valid timestamp and show a warning */ -@@ -3071,7 +3093,8 @@ window_activate (MetaWindow *window, +@@ -3041,7 +3063,8 @@ window_activate (MetaWindow *window, meta_topic (META_DEBUG_FOCUS, "Focusing window %s due to activation\n", window->desc); @@ -73,7 +74,7 @@ index 399bb42..c51cdec 100644 } /* This function exists since most of the functionality in window_activate -@@ -4796,11 +4819,15 @@ meta_window_configure_request (MetaWindow *window, +@@ -4759,11 +4782,15 @@ meta_window_configure_request (MetaWindow *window, "broken behavior and the request is being ignored.\n", window->desc); } @@ -90,23 +91,23 @@ index 399bb42..c51cdec 100644 { meta_topic (META_DEBUG_STACK, "Ignoring xconfigure stacking request from %s (with " -diff --git a/src/metacity.schemas.in.in b/src/metacity.schemas.in.in -index e0dec3d..b8257c4 100644 ---- a/src/metacity.schemas.in.in -+++ b/src/metacity.schemas.in.in -@@ -193,6 +193,12 @@ - invariant in the 'click' focus mode that the topmost window always - has focus, so its most suitable for use with the 'mouse' and - 'sloppy' focus modes. +diff --git a/src/org.gnome.metacity.gschema.xml.in b/src/org.gnome.metacity.gschema.xml.in +index d69d525..edc1b70 100644 +--- a/src/org.gnome.metacity.gschema.xml.in ++++ b/src/org.gnome.metacity.gschema.xml.in +@@ -66,6 +66,12 @@ + invariant in the 'click' focus mode that the topmost window always + has focus, so its most suitable for use with the 'mouse' and + 'sloppy' focus modes. + -+ This key also affects windows that try to activate or raise themselves -+ themselves but don't succeed in getting the the focus. Without -+ this key being set, such windows are flashed in the taskbar. With -+ this key set they, like entirely new windows, are raised but not -+ focused. - - - ++ This key also affects windows that try to activate or raise themselves ++ themselves but don't succeed in getting the the focus. Without ++ this key being set, such windows are flashed in the taskbar. With ++ this key set they, like entirely new windows, are raised but not ++ focused. + + + -- -1.7.0.1 +1.7.9 diff --git a/Dont-focus-ancestor-window-on-a-different-workspac.patch b/Dont-focus-ancestor-window-on-a-different-workspac.patch index be67d0d..4df7902 100644 --- a/Dont-focus-ancestor-window-on-a-different-workspac.patch +++ b/Dont-focus-ancestor-window-on-a-different-workspac.patch @@ -1,5 +1,5 @@ -From a17fb47e08257d09e1e795e8114b21b134b1f3c2 Mon Sep 17 00:00:00 2001 -From: Owen W. Taylor +From 0734ddbfaacff73b80747272ad7044ff904290f6 Mon Sep 17 00:00:00 2001 +From: "Owen W. Taylor" Date: Mon, 19 Oct 2009 18:43:00 -0400 Subject: [PATCH] Don't focus ancestor window on a different workspace @@ -20,10 +20,10 @@ https://bugzilla.gnome.org/show_bug.cgi?id=598995 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/core/workspace.c b/src/core/workspace.c -index a0170a6..92993a7 100644 +index e877b19..6ffea30 100644 --- a/src/core/workspace.c +++ b/src/core/workspace.c -@@ -969,7 +969,10 @@ focus_ancestor_or_mru_window (MetaWorkspace *workspace, +@@ -975,7 +975,10 @@ focus_ancestor_or_mru_window (MetaWorkspace *workspace, MetaWindow *ancestor; ancestor = NULL; meta_window_foreach_ancestor (not_this_one, record_ancestor, &ancestor); @@ -36,4 +36,5 @@ index a0170a6..92993a7 100644 meta_topic (META_DEBUG_FOCUS, "Focusing %s, ancestor of %s\n", -- -1.6.5.rc2 \ No newline at end of file +1.7.9 + diff --git a/Exclude-the-current-application-from-no_focus_window.patch b/Exclude-the-current-application-from-no_focus_window.patch index 22f9f56..b2a4577 100644 --- a/Exclude-the-current-application-from-no_focus_window.patch +++ b/Exclude-the-current-application-from-no_focus_window.patch @@ -1,32 +1,33 @@ -From 10c92eeae2fb4130cade27e1c2d631ef00019a2c Mon Sep 17 00:00:00 2001 -From: Owen W. Taylor +From 3a8164d5ddf688db9cb00657861351febf013e72 Mon Sep 17 00:00:00 2001 +From: "Owen W. Taylor" Date: Wed, 23 Jun 2010 16:49:37 -0400 -Subject: [PATCH 1/2] Exclude the current application from no_focus_windows setting +Subject: [PATCH] Exclude the current application from no-focus-windows + setting -The idea of the no_focus_windows setting is to allow identifying +The idea of the no-focus-windows setting is to allow identifying legacy application windows that are stealing focus from other applications and suppress that behavior. Sometimes its not possible to identify specific problem windows of an application and its necessary to blanket add all windows of the application. In this -case no_focus_windows can disrupt the internal flow of focus +case no-focus-windows can disrupt the internal flow of focus within the application. On the assumption that apps internally handle focus correctly and have been tested not to steal focus from themselves at annoying times, we exclude windows of the the current application -from no_focus_windows. +from no-focus-windows. https://bugzilla.gnome.org/show_bug.cgi?id=599248 --- - src/core/window.c | 11 ++++++++++- - src/metacity.schemas.in.in | 3 +++ + src/core/window.c | 11 ++++++++++- + src/org.gnome.metacity.gschema.xml.in | 3 +++ 2 files changed, 13 insertions(+), 1 deletions(-) diff --git a/src/core/window.c b/src/core/window.c -index cacc3eb..399bb42 100644 +index 5440160..6f5c280 100644 --- a/src/core/window.c +++ b/src/core/window.c -@@ -1977,12 +1977,21 @@ window_state_on_map (MetaWindow *window, +@@ -1980,12 +1980,21 @@ window_state_on_map (MetaWindow *window, gboolean *places_on_top) { gboolean intervening_events; @@ -49,20 +50,20 @@ index cacc3eb..399bb42 100644 intervening_events = TRUE; else intervening_events = intervening_user_event_occurred (window); -diff --git a/src/metacity.schemas.in.in b/src/metacity.schemas.in.in -index c42fa96..e0dec3d 100644 ---- a/src/metacity.schemas.in.in -+++ b/src/metacity.schemas.in.in -@@ -123,6 +123,9 @@ - WM_CLASS matches the shell-style glob pattern <glob>. - (and <expr> <expr>) (or <expr> <expr>) (not <expr): Boolean combinations - of expressions. +diff --git a/src/org.gnome.metacity.gschema.xml.in b/src/org.gnome.metacity.gschema.xml.in +index 6900fa6..e4f86bd 100644 +--- a/src/org.gnome.metacity.gschema.xml.in ++++ b/src/org.gnome.metacity.gschema.xml.in +@@ -41,6 +41,9 @@ + WM_CLASS matches the shell-style glob pattern <glob>. + (and <expr> <expr>) (or <expr> <expr>) (not <expr): Boolean combinations + of expressions. + -+ New windows from the current active application are unaffected by -+ this setting. - - - ++ New windows from the current active application are unaffected by ++ this setting. + + + -- -1.7.0.1 +1.7.9 diff --git a/For-mouse-and-sloppy-focus-return-to-mouse-mode-on.patch b/For-mouse-and-sloppy-focus-return-to-mouse-mode-on.patch index be5a7ce..6fbd49e 100644 --- a/For-mouse-and-sloppy-focus-return-to-mouse-mode-on.patch +++ b/For-mouse-and-sloppy-focus-return-to-mouse-mode-on.patch @@ -1,7 +1,8 @@ -From e8a6af29a1f57024067a12567e2bd906e6bad5a4 Mon Sep 17 00:00:00 2001 -From: Owen W. Taylor +From a24b336303c50e74f7d5e8582049dfae0d70329d Mon Sep 17 00:00:00 2001 +From: "Owen W. Taylor" Date: Tue, 20 Oct 2009 15:13:45 -0400 -Subject: [PATCH] For mouse and sloppy focus, return to "mouse mode" on motion +Subject: [PATCH] For mouse and sloppy focus, return to "mouse mode" on + motion For mouse and sloppy focus, there are various cases where the focus window can be moved away from the focus window. Mostly these relate @@ -28,7 +29,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=599097 3 files changed, 210 insertions(+), 50 deletions(-) diff --git a/src/core/display-private.h b/src/core/display-private.h -index 19287f3..b14d7d7 100644 +index feee851..fee321c 100644 --- a/src/core/display-private.h +++ b/src/core/display-private.h @@ -150,6 +150,14 @@ struct _MetaDisplay @@ -46,16 +47,16 @@ index 19287f3..b14d7d7 100644 /* Alt+click button grabs */ unsigned int window_grab_modifiers; -@@ -497,4 +505,7 @@ void meta_display_queue_autoraise_callback (MetaDisplay *display, - MetaWindow *window); - void meta_display_remove_autoraise_callback (MetaDisplay *display); +@@ -501,4 +509,7 @@ void meta_display_remove_autoraise_callback (MetaDisplay *display); + /* In above-tab-keycode.c */ + guint meta_display_get_above_tab_keycode (MetaDisplay *display); +void meta_display_disable_mouse_mode (MetaDisplay *display); +void meta_display_enable_mouse_mode (MetaDisplay *display); + #endif diff --git a/src/core/display.c b/src/core/display.c -index 55c374a..78139bd 100644 +index 2e959b6..5bcf025 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -165,6 +165,9 @@ static void sanity_check_timestamps (MetaDisplay *display, @@ -76,7 +77,7 @@ index 55c374a..78139bd 100644 if (display->grab_old_window_stacking) g_list_free (display->grab_old_window_stacking); -@@ -1816,67 +1820,86 @@ event_callback (XEvent *event, +@@ -1778,67 +1782,86 @@ event_callback (XEvent *event, if (window && !serial_is_ignored (display, event->xany.serial) && event->xcrossing.mode != NotifyGrab && event->xcrossing.mode != NotifyUngrab && @@ -86,8 +87,8 @@ index 55c374a..78139bd 100644 { switch (meta_prefs_get_focus_mode ()) { - case META_FOCUS_MODE_SLOPPY: - case META_FOCUS_MODE_MOUSE: + case G_DESKTOP_FOCUS_MODE_SLOPPY: + case G_DESKTOP_FOCUS_MODE_MOUSE: - display->mouse_mode = TRUE; - if (window->type != META_WINDOW_DOCK && - window->type != META_WINDOW_DESKTOP) @@ -162,7 +163,7 @@ index 55c374a..78139bd 100644 + * alternative mechanism works great. + */ + if (window->type == META_WINDOW_DESKTOP && -+ meta_prefs_get_focus_mode() == META_FOCUS_MODE_MOUSE && ++ meta_prefs_get_focus_mode() == G_DESKTOP_FOCUS_MODE_MOUSE && + display->expected_focus_window != NULL) { meta_topic (META_DEBUG_FOCUS, @@ -185,7 +186,7 @@ index 55c374a..78139bd 100644 - * alternative mechanism works great. - */ - if (window->type == META_WINDOW_DESKTOP && -- meta_prefs_get_focus_mode() == META_FOCUS_MODE_MOUSE && +- meta_prefs_get_focus_mode() == G_DESKTOP_FOCUS_MODE_MOUSE && - display->expected_focus_window != NULL) - { - meta_topic (META_DEBUG_FOCUS, @@ -197,7 +198,7 @@ index 55c374a..78139bd 100644 - event->xcrossing.time); - } break; - case META_FOCUS_MODE_CLICK: + case G_DESKTOP_FOCUS_MODE_CLICK: break; } - @@ -208,7 +209,7 @@ index 55c374a..78139bd 100644 meta_window_raise (window); } break; -@@ -5140,6 +5163,132 @@ meta_display_remove_autoraise_callback (MetaDisplay *display) +@@ -5095,6 +5118,132 @@ meta_display_remove_autoraise_callback (MetaDisplay *display) } } @@ -263,14 +264,14 @@ index 55c374a..78139bd 100644 + meta_display_queue_autoraise_callback (display, window); + } + } -+ else if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_MOUSE) ++ else if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_MOUSE) + { + meta_topic (META_DEBUG_FOCUS, + "Setting focus to no_focus_windowm, since no mouse window.\n"); + meta_display_focus_the_no_focus_window (display, screen, timestamp); + } + -+ /* for META_FOCUS_MODE_SLOPPY, if the pointer isn't over a window, we just ++ /* for G_DESKTOP_FOCUS_MODE_SLOPPY, if the pointer isn't over a window, we just + * leave the last window focused */ + } + } @@ -326,7 +327,7 @@ index 55c374a..78139bd 100644 + * start checking for motion events to see if we should + * focus the mouse window and return to mouse mode. + */ -+ if (meta_prefs_get_focus_mode () != META_FOCUS_MODE_CLICK) ++ if (meta_prefs_get_focus_mode () != G_DESKTOP_FOCUS_MODE_CLICK) + start_focus_on_motion (display); +} + @@ -342,10 +343,10 @@ index 55c374a..78139bd 100644 void meta_display_get_compositor_version (MetaDisplay *display, diff --git a/src/core/keybindings.c b/src/core/keybindings.c -index 63596bb..7d9130f 100644 +index 08d861e..3c0ef95 100644 --- a/src/core/keybindings.c +++ b/src/core/keybindings.c -@@ -2027,7 +2027,7 @@ process_tab_grab (MetaDisplay *display, +@@ -2082,7 +2082,7 @@ process_tab_grab (MetaDisplay *display, meta_topic (META_DEBUG_FOCUS, "Activating %s due to tab popup " "selection and turning mouse_mode off\n", target_window->desc); @@ -354,7 +355,7 @@ index 63596bb..7d9130f 100644 meta_window_activate (target_window, event->xkey.time); meta_topic (META_DEBUG_KEYBINDINGS, -@@ -2763,7 +2763,7 @@ handle_panel (MetaDisplay *display, +@@ -2686,7 +2686,7 @@ handle_panel (MetaDisplay *display, meta_topic (META_DEBUG_KEYBINDINGS, "Sending panel message with timestamp %lu, and turning mouse_mode " "off due to keybinding press\n", event->xkey.time); @@ -363,7 +364,7 @@ index 63596bb..7d9130f 100644 meta_error_trap_push (display); -@@ -2886,7 +2886,7 @@ do_choose_window (MetaDisplay *display, +@@ -2809,7 +2809,7 @@ do_choose_window (MetaDisplay *display, "Activating %s and turning off mouse_mode due to " "switch/cycle windows with no modifiers\n", initial_selection->desc); @@ -372,7 +373,7 @@ index 63596bb..7d9130f 100644 meta_window_activate (initial_selection, event->xkey.time); } else if (meta_display_begin_grab_op (display, -@@ -2915,7 +2915,7 @@ do_choose_window (MetaDisplay *display, +@@ -2838,7 +2838,7 @@ do_choose_window (MetaDisplay *display, "modifier was released prior to grab\n", initial_selection->desc); meta_display_end_grab_op (display, event->xkey.time); @@ -381,7 +382,7 @@ index 63596bb..7d9130f 100644 meta_window_activate (initial_selection, event->xkey.time); } else -@@ -3156,7 +3156,7 @@ handle_move_to_workspace (MetaDisplay *display, +@@ -3079,7 +3079,7 @@ handle_move_to_workspace (MetaDisplay *display, meta_topic (META_DEBUG_FOCUS, "Resetting mouse_mode to FALSE due to " "handle_move_to_workspace() call with flip set.\n"); @@ -391,4 +392,5 @@ index 63596bb..7d9130f 100644 window, event->xkey.time); -- -1.6.5.rc2 \ No newline at end of file +1.7.9 + diff --git a/Stop-confusing-GDK-s-grab-tracking.patch b/Stop-confusing-GDK-s-grab-tracking.patch index abcca67..c289453 100644 --- a/Stop-confusing-GDK-s-grab-tracking.patch +++ b/Stop-confusing-GDK-s-grab-tracking.patch @@ -1,5 +1,5 @@ -From c81be0bc98ff79fcdba7d60276ae63048e53b7c8 Mon Sep 17 00:00:00 2001 -From: Owen W. Taylor +From ab0428a82f8233829c36e2a3ac0ed0848571c59d Mon Sep 17 00:00:00 2001 +From: "Owen W. Taylor" Date: Wed, 9 Jun 2010 19:38:35 -0400 Subject: [PATCH] Stop confusing GDK's grab tracking @@ -22,10 +22,10 @@ http://bugzilla.gnome.org/show_bug.cgi?id=599181 2 files changed, 138 insertions(+), 0 deletions(-) diff --git a/src/core/display-private.h b/src/core/display-private.h -index 19287f3..8bc00fb 100644 +index fee321c..7f779fd 100644 --- a/src/core/display-private.h +++ b/src/core/display-private.h -@@ -223,6 +223,13 @@ struct _MetaDisplay +@@ -232,6 +232,13 @@ struct _MetaDisplay /* Closing down the display */ int closing; @@ -40,7 +40,7 @@ index 19287f3..8bc00fb 100644 GHashTable *groups_by_leader; diff --git a/src/core/display.c b/src/core/display.c -index 4c7b4c0..bdd3016 100644 +index 5bcf025..0c5f61d 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -77,6 +77,7 @@ @@ -51,9 +51,9 @@ index 4c7b4c0..bdd3016 100644 #define GRAB_OP_IS_WINDOW_SWITCH(g) \ (g == META_GRAB_OP_KEYBOARD_TABBING_NORMAL || \ -@@ -1396,6 +1397,133 @@ handle_net_restack_window (MetaDisplay* display, +@@ -1362,6 +1363,133 @@ meta_display_queue_autoraise_callback (MetaDisplay *display, + display->autoraise_window = window; } - #endif +/* We do some of our event handling in core/frames.c, which expects + * GDK events delivered by GTK+. However, since the transition to @@ -185,7 +185,7 @@ index 4c7b4c0..bdd3016 100644 /** * This is the most important function in the whole program. It is the heart, * it is the nexus, it is the Grand Central Station of Metacity's world. -@@ -2403,6 +2531,9 @@ event_callback (XEvent *event, +@@ -2387,6 +2515,9 @@ event_callback (XEvent *event, event, window); } @@ -196,5 +196,5 @@ index 4c7b4c0..bdd3016 100644 display->current_time = CurrentTime; return filter_out_event; -- -1.7.0.1 +1.7.9 diff --git a/default-window-icon.patch b/default-window-icon.patch deleted file mode 100644 index b09199d..0000000 --- a/default-window-icon.patch +++ /dev/null @@ -1,45 +0,0 @@ ---- metacity-2.30.0/src/Makefile.am 2010-04-20 00:56:08.110849725 -0400 -+++ hacked2/src/Makefile.am 2010-04-20 01:03:18.002854963 -0400 -@@ -192,10 +192,12 @@ - install-data-local: - endif - --IMAGES=stock_maximize.png stock_minimize.png stock_delete.png -+IMAGES=stock_maximize.png stock_minimize.png stock_delete.png window.png mini-window.png - VARIABLES=stock_maximize_data $(srcdir)/stock_maximize.png \ - stock_minimize_data $(srcdir)/stock_minimize.png \ -- stock_delete_data $(srcdir)/stock_delete.png -+ stock_delete_data $(srcdir)/stock_delete.png \ -+ mini_window_data $(srcdir)/mini-window.png \ -+ window_data $(srcdir)/window.png - - BUILT_SOURCES = inlinepixbufs.h - CLEANFILES = inlinepixbufs.h metacity.desktop metacity-wm.desktop metacity.schemas metacity.schemas.in 50-metacity-desktop-key.xml 50-metacity-key.xml ---- metacity-2.30.0/src/ui/ui.c 2010-04-20 00:56:08.190599271 -0400 -+++ hacked2/src/ui/ui.c 2010-04-20 01:04:24.220853635 -0400 -@@ -588,10 +588,8 @@ - 0, - NULL); - else -- default_icon = gtk_icon_theme_load_icon (theme, -- "gtk-missing-image", -- META_ICON_WIDTH, -- 0, -+ default_icon = gdk_pixbuf_new_from_inline (-1, window_data, -+ FALSE, - NULL); - - g_assert (default_icon); -@@ -623,10 +621,8 @@ - 0, - NULL); - else -- default_icon = gtk_icon_theme_load_icon (theme, -- "gtk-missing-image", -- META_MINI_ICON_WIDTH, -- 0, -+ default_icon = gdk_pixbuf_new_from_inline (-1, mini_window_data, -+ FALSE, - NULL); - - g_assert (default_icon); diff --git a/fresh-tooltips.patch b/fresh-tooltips.patch index 2ea8b8c..aaa9ab7 100644 --- a/fresh-tooltips.patch +++ b/fresh-tooltips.patch @@ -145,7 +145,7 @@ diff -up metacity-2.30.2/src/ui/fixedtip.c.fresh-tooltips metacity-2.30.2/src/ui +} + static gint --expose_handler (GtkTooltips *tooltips) +-expose_handler (GtkTooltip *tooltips) +expose_handler (GtkWidget *window) { - gtk_paint_flat_box (gtk_widget_get_style (tip), gtk_widget_get_window (tip), diff --git a/metacity-2.28-empty-keybindings.patch b/metacity-2.28-empty-keybindings.patch index cc76a9b..b2ae51b 100644 --- a/metacity-2.28-empty-keybindings.patch +++ b/metacity-2.28-empty-keybindings.patch @@ -1,7 +1,8 @@ -From 599f25e51d967febddb4de3aa21db4258356a9f9 Mon Sep 17 00:00:00 2001 -From: Owen W. Taylor +From 857ac4b0682dec32ba55e4080fa7ec560a2481a0 Mon Sep 17 00:00:00 2001 +From: "Owen W. Taylor" Date: Fri, 20 Nov 2009 10:19:03 -0500 -Subject: [PATCH] Accept an empty string as well as "disabled" for keybindings +Subject: [PATCH] Accept an empty string as well as "disabled" for + keybindings Treat the empty string the same as "disabled" for GConf keybinding keys. gnome-keybinding-properties was changed to write disabled @@ -13,10 +14,10 @@ https://bugzilla.gnome.org/show_bug.cgi?id=559816 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/ui.c b/src/ui/ui.c -index 6df289f..1e68df0 100644 +index 78aa353..ef9fcfc 100644 --- a/src/ui/ui.c +++ b/src/ui/ui.c -@@ -765,7 +765,7 @@ meta_ui_parse_accelerator (const char *accel, +@@ -954,7 +954,7 @@ meta_ui_parse_accelerator (const char *accel, *keycode = 0; *mask = 0; @@ -25,7 +26,7 @@ index 6df289f..1e68df0 100644 return TRUE; meta_ui_accelerator_parse (accel, &gdk_sym, &gdk_code, &gdk_mask); -@@ -852,7 +852,7 @@ meta_ui_parse_modifier (const char *accel, +@@ -1041,7 +1041,7 @@ meta_ui_parse_modifier (const char *accel, *mask = 0; @@ -35,5 +36,5 @@ index 6df289f..1e68df0 100644 meta_ui_accelerator_parse (accel, &gdk_sym, &gdk_code, &gdk_mask); -- -1.6.5.2 +1.7.9 diff --git a/metacity-2.28-xioerror-unknown-display.patch b/metacity-2.28-xioerror-unknown-display.patch index 2c29cd5..5de5f8d 100644 --- a/metacity-2.28-xioerror-unknown-display.patch +++ b/metacity-2.28-xioerror-unknown-display.patch @@ -1,5 +1,5 @@ -From 7c30ba2d034050e8e7d1776ea7541495bdf898b3 Mon Sep 17 00:00:00 2001 -From: Owen W. Taylor +From 04f775d77d53bca92faee883258d787b89255ef8 Mon Sep 17 00:00:00 2001 +From: "Owen W. Taylor" Date: Fri, 20 Nov 2009 10:42:07 -0500 Subject: [PATCH] Handle XError and XIOError for unknown displays @@ -54,5 +54,5 @@ index 8de4608..59f9c71 100644 /* Xlib would force an exit anyhow */ -- -1.6.5.2 +1.7.9 diff --git a/metacity.spec b/metacity.spec index 15a4058..129540b 100644 --- a/metacity.spec +++ b/metacity.spec @@ -2,19 +2,16 @@ Summary: Unobtrusive window manager Name: metacity -Version: 2.34.1 -Release: 3%{?dist} +Version: 2.34.2 +Release: 1%{?dist} URL: http://download.gnome.org/sources/metacity/ Source0: http://download.gnome.org/sources/metacity/2.34/metacity-%{version}.tar.xz # 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=336750 -Patch10: screenshot-forkbomb.patch # fedora specific patches -Patch11: workspaces.patch Patch12: fresh-tooltips.patch # https://bugzilla.gnome.org/show_bug.cgi?id=598995 @@ -36,9 +33,6 @@ Patch28: Stop-confusing-GDK-s-grab-tracking.patch # https://bugzilla.gnome.org/show_bug.cgi?id=622517 Patch29: Allow-breaking-out-from-maximization-during-mouse.patch -# default window icon: https://bugzilla.gnome.org/show_bug.cgi?id=616246 -Patch30: default-window-icon.patch - Source1: window.png Source2: mini-window.png @@ -47,7 +41,7 @@ Group: User Interface/Desktops BuildRequires: gtk2-devel BuildRequires: pango-devel BuildRequires: fontconfig-devel -BuildRequires: GConf2-devel +BuildRequires: gsettings-desktop-schemas-devel BuildRequires: desktop-file-utils BuildRequires: libglade2-devel BuildRequires: autoconf, automake, libtool, gnome-common @@ -69,14 +63,8 @@ BuildRequires: libcanberra-devel Requires: startup-notification # for /usr/share/control-center/keybindings, /usr/share/gnome/wm-properties Requires: control-center-filesystem -# for /etc/gconf/schemas -Requires: GConf2 Requires: zenity -Requires(post): GConf2 -Requires(pre): GConf2 -Requires(preun): GConf2 - # http://bugzilla.redhat.com/605675 Provides: firstboot(windowmanager) = metacity @@ -100,8 +88,6 @@ API. This package exists purely for technical reasons. %setup -q %patch4 -p1 -b .stop-spamming-xsession-errors %patch5 -p1 -b .dnd-keynav -%patch10 -p1 -b .screenshot-forkbomb -%patch11 -p1 -b .workspaces %patch12 -p1 -b .fresh-tooltips %patch16 -p1 -b .focus-different-workspace @@ -115,12 +101,10 @@ API. This package exists purely for technical reasons. %patch28 -p1 -b .grab-tracking %patch29 -p1 -b .mouse-unmaximize -%patch30 -p1 -b .window-icon - cp -p %{SOURCE1} %{SOURCE2} src/ # force regeneration -rm -f src/metacity.schemas +rm -f src/org.gnome.metacity.gschema.valid %build CPPFLAGS="$CPPFLAGS -I$RPM_BUILD_ROOT%{_includedir}" @@ -129,7 +113,7 @@ export CPPFLAGS # Always rerun configure for now rm -f configure (if ! test -x configure; then autoreconf -i -f; fi; - %configure --disable-static) + %configure --disable-static --disable-schemas-compile) SHOULD_HAVE_DEFINED="HAVE_SM HAVE_XINERAMA HAVE_XFREE_XINERAMA HAVE_SHAPE HAVE_RANDR HAVE_STARTUP_NOTIFICATION" @@ -147,9 +131,7 @@ done make CPPFLAGS="$CPPFLAGS" LIBS="$LIBS" %{?_smp_mflags} %install -export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" -unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' @@ -162,22 +144,22 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %post /sbin/ldconfig -%gconf_schema_upgrade metacity -%pre -%gconf_schema_prepare metacity - -%preun -%gconf_schema_remove metacity +%posttrans +glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %postun -p /sbin/ldconfig +if [ $1 -eq 0 ]; then + glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : +fi %files -f %{name}.lang %defattr(-,root,root,-) %doc README AUTHORS COPYING NEWS HACKING doc/theme-format.txt doc/metacity-theme.dtd rationales.txt %{_bindir}/metacity %{_bindir}/metacity-message -%{_sysconfdir}/gconf/schemas/*.schemas +%{_datadir}/glib-2.0/schemas/* +%{_datadir}/GConf/gsettings/metacity-schemas.convert %{_datadir}/metacity %{_datadir}/themes/* %{_datadir}/gnome-control-center/keybindings/* @@ -199,6 +181,17 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %{_mandir}/man1/metacity-window-demo.1.gz %changelog +* Thu Feb 09 2012 Florian Müllner 2.34.2-1 +- Update to 2.34.2 +- Remove patches: + - screenshot-forkbomb.patch: screenshot keybindings have been moved + to gnome-settings-daemon + - workspace.patch: default preference values now defined in + gsettings-desktop-schemas + - default-window-icon.patch: included upstream +- Rebase remaining patches +- Adjust spec file to dropped GConf dependency + * Fri Jan 13 2012 Fedora Release Engineering - 2.34.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild diff --git a/screenshot-forkbomb.patch b/screenshot-forkbomb.patch deleted file mode 100644 index f16595d..0000000 --- a/screenshot-forkbomb.patch +++ /dev/null @@ -1,84 +0,0 @@ ---- metacity-2.28.0/src/include/all-keybindings.h 2009-09-08 16:55:35.000000000 -0400 -+++ hacked/src/include/all-keybindings.h 2009-11-24 21:32:04.351687546 -0500 -@@ -76,6 +76,7 @@ - #define BINDING_PER_WINDOW 0x01 - #define BINDING_REVERSES 0x02 - #define BINDING_IS_REVERSED 0x04 -+#define BINDING_NO_REPEAT 0x08 - - #endif /* _BINDINGS_DEFINED_CONSTANTS */ - -@@ -234,9 +235,9 @@ - keybind (run_command_31, handle_run_command, 30, 0, NULL, NULL) - keybind (run_command_32, handle_run_command, 31, 0, NULL, NULL) - --keybind (run_command_screenshot, handle_run_command, 32, 0, "Print", -+keybind (run_command_screenshot, handle_run_command, 32, BINDING_NO_REPEAT, "Print", - _("Take a screenshot")) --keybind (run_command_window_screenshot, handle_run_command, 33, 0,"Print", -+keybind (run_command_window_screenshot, handle_run_command, 33, BINDING_NO_REPEAT, "Print", - _("Take a screenshot of a window")) - - keybind (run_command_terminal, handle_run_terminal, 0, 0, NULL, _("Run a terminal")) ---- metacity-2.28.0/src/core/keybindings.c 2009-09-08 16:55:35.000000000 -0400 -+++ hacked/src/core/keybindings.c 2009-11-24 21:37:02.614687728 -0500 -@@ -122,6 +122,7 @@ - unsigned int mask; - MetaVirtualModifier modifiers; - const MetaKeyHandler *handler; -+ gboolean repeating; - }; - - #define keybind(name, handler, param, flags, stroke, description) \ -@@ -1172,10 +1173,6 @@ - { - int i; - -- /* we used to have release-based bindings but no longer. */ -- if (event->type == KeyRelease) -- return FALSE; -- - /* - * TODO: This would be better done with a hash table; - * it doesn't suit to use O(n) for such a common operation. -@@ -1185,12 +1182,12 @@ - const MetaKeyHandler *handler = bindings[i].handler; - - if ((!on_window && handler->flags & BINDING_PER_WINDOW) || -- event->type != KeyPress || -+ (event->type == KeyRelease && !(handler->flags & BINDING_NO_REPEAT)) || - bindings[i].keycode != event->xkey.keycode || - ((event->xkey.state & 0xff & ~(display->ignored_modifier_mask)) != - bindings[i].mask)) - continue; -- -+ - /* - * window must be non-NULL for on_window to be true, - * and so also window must be non-NULL if we get here and -@@ -2370,6 +2367,25 @@ - const char *command; - GError *err; - -+ if (event->type == KeyRelease) -+ { -+ meta_topic (META_DEBUG_KEYBINDINGS, -+ "Key release, binding %s\n", -+ binding->name); -+ binding->repeating = FALSE; -+ return; -+ } -+ -+ if (binding->repeating && (binding->handler->flags & BINDING_NO_REPEAT)) -+ { -+ meta_topic (META_DEBUG_KEYBINDINGS, -+ "Key repeat ignored, binding %s\n", -+ binding->name); -+ return; -+ } -+ -+ binding->repeating = TRUE; -+ - command = meta_prefs_get_command (which); - - if (command == NULL) diff --git a/sources b/sources index e04011a..c76a837 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d505e2d7936bd9b11a3f48470a616767 metacity-2.34.1.tar.xz +c8d661a9f232d826c5f21bc0bff0a3e6 metacity-2.34.2.tar.xz diff --git a/workspaces.patch b/workspaces.patch deleted file mode 100644 index f3caf4c..0000000 --- a/workspaces.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up metacity-2.28.0/src/metacity.schemas.in.in.workspaces metacity-2.28.0/src/metacity.schemas.in.in ---- metacity-2.28.0/src/metacity.schemas.in.in.workspaces 2009-10-15 13:52:37.983401456 -0400 -+++ metacity-2.28.0/src/metacity.schemas.in.in 2009-10-15 13:52:58.017654116 -0400 -@@ -295,7 +295,7 @@ - /apps/metacity/general/num_workspaces - metacity - int -- 4 -+ 2 - - Number of workspaces - -- cgit