all repos — openbox @ 48b6fd9ac4cb82c0c176a4554ce3272c01025aae

openbox fork - make it a bit more like ryudo

Reload motif wm hints when property changes

Google's chrome does this when you toggle window decorations.

Based on patch in #4250 by Daniel Erat.
Mikael Magnusson mikachu@gmail.com
commit

48b6fd9ac4cb82c0c176a4554ce3272c01025aae

parent

1169118e60050ee361e22111ffce842ff393d8bf

3 files changed, 10 insertions(+), 2 deletions(-)

jump to
M openbox/client.copenbox/client.c

@@ -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 @@ client_direct_parent(c));

} } -static void client_get_mwm_hints(ObClient *self) +void client_get_mwm_hints(ObClient *self) { guint num; guint32 *hints;
M openbox/client.hopenbox/client.h

@@ -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
M openbox/event.copenbox/event.c

@@ -1517,6 +1517,13 @@ /* make sure the client's sizes are within its bounds, but only

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) {