[Xfce4-commits] [xfce/xfce4-panel] 01/01: Simplify check for shaded windows of e01b5aba182

noreply at xfce.org noreply at xfce.org
Fri Jan 9 00:22:16 CET 2015


This is an automated email from the git hooks/post-receive script.

andrzejr pushed a commit to branch master
in repository xfce/xfce4-panel.

commit 1cfbcde589ebd4f59296202296d9e9e42252b8c1
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Fri Jan 9 00:09:43 2015 +0100

    Simplify check for shaded windows of e01b5aba182
---
 panel/panel-window.c |   31 +++++++++----------------------
 1 file changed, 9 insertions(+), 22 deletions(-)

diff --git a/panel/panel-window.c b/panel/panel-window.c
index c9712ab..8f30e41 100644
--- a/panel/panel-window.c
+++ b/panel/panel-window.c
@@ -31,7 +31,6 @@
 #ifdef GDK_WINDOWING_X11
 #include <gdk/gdkx.h>
 #include <X11/Xlib.h>
-#include <X11/Xatom.h>
 #endif
 
 #include <libwnck/libwnck.h>
@@ -2178,29 +2177,17 @@ panel_window_active_window_geometry_changed (WnckWindow  *active_window,
                                     &window_area.width, &window_area.height);
 
           /* if a window is shaded, check the height of the window's
-           * decoration as exposed through the _NET_FRAME_EXTENTS application
-           * window property */
+           * decoration */
           if (wnck_window_is_shaded (active_window))
           {
-            Display *display;
-            Atom real_type;
-            int real_format;
-            unsigned long items_read, items_left;
-            guint32 *data;
-
-            display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
-            if (XGetWindowProperty (display, wnck_window_get_xid (active_window),
-                                    XInternAtom(display, "_NET_FRAME_EXTENTS", True),
-                                    0, 4, FALSE, AnyPropertyType,
-                                    &real_type, &real_format, &items_read, &items_left,
-                                    (unsigned char **) &data) == Success
-                                    && (items_read >= 4))
-              window_area.height = data[2] + data[3];
-
-            if (data)
-            {
-              XFree (data);
-            }
+            GdkRectangle window_content;
+
+            wnck_window_get_client_window_geometry (active_window,
+                                                    &window_content.x,
+                                                    &window_content.y,
+                                                    &window_content.width,
+                                                    &window_content.height);
+            window_area.height = window_area.height - window_content.height;
           }
 
           /* obtain position and dimension from the panel */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list