r36606 - in /desktop/unstable/gtk+3.0/debian: changelog patches/076_check_wm_supports_hint.patch patches/series

sebastien at users.alioth.debian.org sebastien at users.alioth.debian.org
Thu Jan 31 16:55:57 UTC 2013


Author: sebastien
Date: Thu Jan 31 16:55:57 2013
New Revision: 36606

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=36606
Log:
debian/patches/076_check_wm_supports_hint.patch: This patch fixes the
size and placement of popup menus with some window managers, such as
Awesome and XMonad. Closes: #681974


Added:
    desktop/unstable/gtk+3.0/debian/patches/076_check_wm_supports_hint.patch
Modified:
    desktop/unstable/gtk+3.0/debian/changelog
    desktop/unstable/gtk+3.0/debian/patches/series

Modified: desktop/unstable/gtk+3.0/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gtk%2B3.0/debian/changelog?rev=36606&op=diff
==============================================================================
--- desktop/unstable/gtk+3.0/debian/changelog [utf-8] (original)
+++ desktop/unstable/gtk+3.0/debian/changelog [utf-8] Thu Jan 31 16:55:57 2013
@@ -1,3 +1,11 @@
+gtk+3.0 (3.4.2-6) UNRELEASED; urgency=low
+
+  * debian/patches/076_check_wm_supports_hint.patch: This patch fixes the
+    size and placement of popup menus with some window managers, such as
+    Awesome and XMonad. Closes: #681974
+
+ -- Sébastien Villemot <sebastien at debian.org>  Thu, 31 Jan 2013 17:08:09 +0100
+
 gtk+3.0 (3.4.2-5) unstable; urgency=low
 
   * debian/patches/075_gtkplug-fix-handling-of-key-events-for-layouts.patch:

Added: desktop/unstable/gtk+3.0/debian/patches/076_check_wm_supports_hint.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gtk%2B3.0/debian/patches/076_check_wm_supports_hint.patch?rev=36606&op=file
==============================================================================
--- desktop/unstable/gtk+3.0/debian/patches/076_check_wm_supports_hint.patch (added)
+++ desktop/unstable/gtk+3.0/debian/patches/076_check_wm_supports_hint.patch [utf-8] Thu Jan 31 16:55:57 2013
@@ -1,0 +1,75 @@
+Description: Fix placement and size of popup menus with some window managers
+ Before acting on any hint that is set by the window manager we must first
+ check that the hint is supported by the current window manager. Checking that
+ a property has a value is insufficient as it may have been set by a previous
+ window manager which did support the hint.
+Origin: upstream, http://git.gnome.org/browse/gtk+/commit/?id=2fcbe3a9b44491059170b71f75e07b3b24138c4a
+Bug: https://bugzilla.gnome.org/show_bug.cgi?id=691515
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=681974
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
+index a6d8ba6..b5767b5 100644
+--- a/gdk/x11/gdkscreen-x11.c
++++ b/gdk/x11/gdkscreen-x11.c
+@@ -280,6 +280,10 @@ get_current_desktop (GdkScreen *screen)
+   unsigned char *data_return = NULL;
+   int workspace = 0;
+ 
++  if (!gdk_x11_screen_supports_net_wm_hint (screen,
++                                            gdk_atom_intern_static_string ("_NET_CURRENT_DESKTOP")))
++    return workspace;
++
+   display = GDK_DISPLAY_XDISPLAY (gdk_screen_get_display (screen));
+   win = XRootWindow (display, GDK_SCREEN_XNUMBER (screen));
+ 
+@@ -330,6 +334,10 @@ get_work_area (GdkScreen    *screen,
+   area->width = gdk_screen_get_width (screen);
+   area->height = gdk_screen_get_height (screen);
+ 
++  if (!gdk_x11_screen_supports_net_wm_hint (screen,
++                                            gdk_atom_intern_static_string ("_NET_WORKAREA")))
++    return;
++
+   if (workarea == None)
+     return;
+ 
+diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
+index 150f58e..70a6ba0 100644
+--- a/gdk/x11/gdkwindow-x11.c
++++ b/gdk/x11/gdkwindow-x11.c
+@@ -1738,7 +1738,9 @@ static void
+ move_to_current_desktop (GdkWindow *window)
+ {
+   if (gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window),
+-					   gdk_atom_intern_static_string ("_NET_WM_DESKTOP")))
++					   gdk_atom_intern_static_string ("_NET_WM_DESKTOP")) &&
++      gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window),
++					   gdk_atom_intern_static_string ("_NET_CURRENT_DESKTOP")))
+     {
+       Atom type;
+       gint format;
+@@ -2717,7 +2719,9 @@ gdk_x11_window_get_frame_extents (GdkWindow    *window,
+   xwindow = GDK_WINDOW_XID (window);
+ 
+   /* first try: use _NET_FRAME_EXTENTS */
+-  if (XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), xwindow,
++  if (gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window),
++                                           gdk_atom_intern_static_string ("_NET_FRAME_EXTENTS")) &&
++      XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), xwindow,
+                           gdk_x11_get_xatom_by_name_for_display (display,
+                                                                   "_NET_FRAME_EXTENTS"),
+                           0, G_MAXLONG, False, XA_CARDINAL, &type_return,
+@@ -2764,7 +2768,9 @@ gdk_x11_window_get_frame_extents (GdkWindow    *window,
+   /* use NETWM_VIRTUAL_ROOTS if available */
+   root = GDK_WINDOW_XROOTWIN (window);
+ 
+-  if (XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), root,
++  if (gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window),
++                                           gdk_atom_intern_static_string ("_NET_VIRTUAL_ROOTS")) &&
++      XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), root,
+ 			  gdk_x11_get_xatom_by_name_for_display (display, 
+ 								 "_NET_VIRTUAL_ROOTS"),
+ 			  0, G_MAXLONG, False, XA_WINDOW, &type_return,
+--
+cgit v0.9.0.2

Modified: desktop/unstable/gtk+3.0/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gtk%2B3.0/debian/patches/series?rev=36606&op=diff
==============================================================================
--- desktop/unstable/gtk+3.0/debian/patches/series [utf-8] (original)
+++ desktop/unstable/gtk+3.0/debian/patches/series [utf-8] Thu Jan 31 16:55:57 2013
@@ -13,3 +13,4 @@
 073_transparent_colors.patch
 074_try-harder-to-discriminate-Shift-F10-and-F10.patch
 075_gtkplug-fix-handling-of-key-events-for-layouts.patch
+076_check_wm_supports_hint.patch




More information about the pkg-gnome-commits mailing list