[libwnck] Add support for _GTK_FRAME_EXTENTS



commit 063cc9281372815e0bf0a6b2e63f9b07e1769448
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Thu Jul 24 14:52:04 2014 +0200

    Add support for _GTK_FRAME_EXTENTS
    
    This adds an additional check if _NET_FRAME_EXTENTS is not set and
    therefore uses the existing *_frame variables accordingly.

 libwnck/window.c |    4 +++-
 libwnck/xutils.c |   17 +++++++++++++++++
 2 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/libwnck/window.c b/libwnck/window.c
index 29e5bf8..d57544e 100644
--- a/libwnck/window.c
+++ b/libwnck/window.c
@@ -2601,7 +2601,9 @@ _wnck_window_process_property_notify (WnckWindow *window,
       queue_update (window);
     }
   else if (xevent->xproperty.atom ==
-           _wnck_atom_get ("_NET_FRAME_EXTENTS"))
+           _wnck_atom_get ("_NET_FRAME_EXTENTS") ||
+           xevent->xproperty.atom ==
+           _wnck_atom_get ("_GTK_FRAME_EXTENTS"))
     {
       window->priv->need_update_frame_extents = TRUE;
       queue_update (window);
diff --git a/libwnck/xutils.c b/libwnck/xutils.c
index 173d3ed..8222b19 100644
--- a/libwnck/xutils.c
+++ b/libwnck/xutils.c
@@ -1365,6 +1365,23 @@ _wnck_get_frame_extents (Screen *screen,
       retval = TRUE;
     }
 
+  if (p_size == NULL)
+    {
+      _wnck_get_cardinal_list (screen, xwindow,
+                               _wnck_atom_get ("_GTK_FRAME_EXTENTS"),
+                               &p_size, &n_size);
+
+      if (p_size != NULL && n_size == 4)
+        {
+          *left_frame   = -p_size[0];
+          *right_frame  = -p_size[1];
+          *top_frame    = -p_size[2];
+          *bottom_frame = -p_size[3];
+
+          retval = TRUE;
+        }
+    }
+
   if (p_size != NULL)
     g_free (p_size);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]