]> Dogcows Code - chaz/openbox/commitdiff
Reload motif wm hints when property changes
authorMikael Magnusson <mikachu@gmail.com>
Sun, 20 Sep 2009 13:37:54 +0000 (15:37 +0200)
committerMikael Magnusson <mikachu@gmail.com>
Sun, 20 Sep 2009 13:37:54 +0000 (15:37 +0200)
Google's chrome does this when you toggle window decorations.

Based on patch in #4250 by Daniel Erat.

openbox/client.c
openbox/client.h
openbox/event.c

index c1af196b5f08e90403cdd7c47fe0ba96a4515a18..fe342f650cec2d804f101dec8a424422575d75ab 100644 (file)
@@ -80,7 +80,6 @@ static void client_get_area(ObClient *self);
 static void client_get_desktop(ObClient *self);
 static void client_get_state(ObClient *self);
 static void client_get_shaped(ObClient *self);
-static void client_get_mwm_hints(ObClient *self);
 static void client_get_colormap(ObClient *self);
 static void client_set_desktop_recursive(ObClient *self,
                                          guint target,
@@ -1479,7 +1478,7 @@ static void client_update_transient_tree(ObClient *self,
     }
 }
 
-static void client_get_mwm_hints(ObClient *self)
+void client_get_mwm_hints(ObClient *self)
 {
     guint num;
     guint32 *hints;
index f55c7ac6e788b0bd0a4a35a8cc61b31629e2cd65..832405cf63616fd0174ed553f67a0e808ec48993 100644 (file)
@@ -634,6 +634,8 @@ void client_setup_decor_and_functions(ObClient *self, gboolean reconfig);
 
 /*! Sets the window's type and transient flag */
 void client_get_type_and_transientness(ObClient *self);
+/*! Gets the motif wm hints */
+void client_get_mwm_hints(ObClient *self);
 
 /*! Returns a client's icon set, or its parents (recursively) if it doesn't
   have one
index ddd2e3263a81c9c015edebac2dccb483bbc0f9de..71fed41367461b9210066b365b01f3d4cbb9a0d7 100644 (file)
@@ -1517,6 +1517,13 @@ static void event_handle_client(ObClient *client, XEvent *e)
                reconfigure the window if it needs to. emacs will update its
                normal hints every time it receives a conigurenotify */
             client_reconfigure(client, FALSE);
+        } else if (msgtype == prop_atoms.motif_wm_hints) {
+            client_get_mwm_hints(client);
+            /* This can override some mwm hints */
+            client_get_type_and_transientness(client);
+
+            /* Apply the changes to the window */
+            client_setup_decor_and_functions(client, TRUE);
         } else if (msgtype == XA_WM_HINTS) {
             client_update_wmhints(client);
         } else if (msgtype == XA_WM_TRANSIENT_FOR) {
This page took 0.034529 seconds and 4 git commands to generate.