r35408 - in /desktop/unstable/metacity/debian: changelog patches/01_focus_new_window.patch patches/series

joss at users.alioth.debian.org joss at users.alioth.debian.org
Sat Jun 23 16:49:18 UTC 2012


Author: joss
Date: Sat Jun 23 16:49:17 2012
New Revision: 35408

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=35408
Log:
01_focus_new_window.patch: new patch from upstream bugzilla.
Correctly focus new windows even when they appear behind an “always 
on top” window. Closes: #515577.

Added:
    desktop/unstable/metacity/debian/patches/01_focus_new_window.patch
Modified:
    desktop/unstable/metacity/debian/changelog
    desktop/unstable/metacity/debian/patches/series

Modified: desktop/unstable/metacity/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/metacity/debian/changelog?rev=35408&op=diff
==============================================================================
--- desktop/unstable/metacity/debian/changelog [utf-8] (original)
+++ desktop/unstable/metacity/debian/changelog [utf-8] Sat Jun 23 16:49:17 2012
@@ -1,3 +1,11 @@
+metacity (1:2.34.3-3) UNRELEASED; urgency=low
+
+  * 01_focus_new_window.patch: new patch from upstream bugzilla.
+    Correctly focus new windows even when they appear behind an “always 
+    on top” window. Closes: #515577.
+
+ -- Josselin Mouette <joss at debian.org>  Sat, 23 Jun 2012 18:48:28 +0200
+
 metacity (1:2.34.3-2) unstable; urgency=low
 
   * Upload to unstable.

Added: desktop/unstable/metacity/debian/patches/01_focus_new_window.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/metacity/debian/patches/01_focus_new_window.patch?rev=35408&op=file
==============================================================================
--- desktop/unstable/metacity/debian/patches/01_focus_new_window.patch (added)
+++ desktop/unstable/metacity/debian/patches/01_focus_new_window.patch [utf-8] Sat Jun 23 16:49:17 2012
@@ -1,0 +1,69 @@
+Debian #515577
+GNOME #534752
+
+--- a/src/core/window.c
++++ b/src/core/window.c
+@@ -2045,6 +2045,10 @@
+ windows_overlap (const MetaWindow *w1, const MetaWindow *w2)
+ {
+   MetaRectangle w1rect, w2rect;
++
++  if (w1->minimized || w2->minimized)
++    return FALSE;
++
+   meta_window_get_outer_rect (w1, &w1rect);
+   meta_window_get_outer_rect (w2, &w2rect);
+   return meta_rectangle_overlap (&w1rect, &w2rect);
+@@ -2099,6 +2103,7 @@
+   gboolean takes_focus_on_map;
+   gboolean place_on_top_on_map;
+   gboolean needs_stacking_adjustment;
++  gboolean will_be_covered;
+   MetaWindow *focus_window;
+   guint32     timestamp;
+ 
+@@ -2116,6 +2121,7 @@
+   did_show = FALSE;
+   window_state_on_map (window, &takes_focus_on_map, &place_on_top_on_map);
+   needs_stacking_adjustment = FALSE;
++  will_be_covered = window_would_be_covered (window);
+ 
+   meta_topic (META_DEBUG_WINDOW_STATE,
+               "Window %s %s focus on map, and %s place on top on map.\n",
+@@ -2136,7 +2142,7 @@
+ 
+   if ( focus_window != NULL && window->showing_for_first_time &&
+       ( (!place_on_top_on_map && !takes_focus_on_map) ||
+-      window_would_be_covered (window) )
++      will_be_covered )
+     ) {
+       if (meta_window_is_ancestor_of_transient (focus_window, window))
+         {
+@@ -2220,21 +2226,21 @@
+        * in the stack when it doesn't overlap it confusingly places
+        * that new window below a lot of other windows.
+        */
+-      if (overlap || 
++      if (!will_be_covered && (overlap || 
+           (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK &&
+-           meta_prefs_get_raise_on_click ()))
++           meta_prefs_get_raise_on_click ())))
+         meta_window_stack_just_below (window, focus_window);
+ 
+-      /* If the window will be obscured by the focus window, then the
+-       * user might not notice the window appearing so set the
+-       * demands attention hint.
++      /* If the window will be obscured by the focus window or a window set to
++       * always on top, then the user might not notice the window appearing so 
++       * set the demands attention hint.
+        *
+        * We set the hint ourselves rather than calling 
+        * meta_window_set_demands_attention() because that would cause
+        * a recalculation of overlap, and a call to set_net_wm_state()
+        * which we are going to call ourselves here a few lines down.
+        */
+-      if (overlap)
++      if (overlap || will_be_covered)
+         window->wm_state_demands_attention = TRUE;
+     } 
+ 

Modified: desktop/unstable/metacity/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/metacity/debian/patches/series?rev=35408&op=diff
==============================================================================
--- desktop/unstable/metacity/debian/patches/series [utf-8] (original)
+++ desktop/unstable/metacity/debian/patches/series [utf-8] Sat Jun 23 16:49:17 2012
@@ -1,1 +1,2 @@
+01_focus_new_window.patch
 03_gtop_error.patch




More information about the pkg-gnome-commits mailing list