diff --git a/openbox/client.c b/openbox/client.c index a8a1567..ce1d13a 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -1616,6 +1616,19 @@ void client_update_normal_hints(ObClient *self) ob_debug("Normal hints: not set"); } +void client_update_mwm_hints(ObClient *self) +{ + client_get_mwm_hints(self); + + /* these other properties didn't change, but they can affect the MWM + hints that we just loaded, so we need to process them again */ + client_get_type_and_transientness(self); + client_get_state(self); + client_update_normal_hints(self); + + client_setup_decor_and_functions(self, TRUE); +} + void client_setup_decor_and_functions(ObClient *self, gboolean reconfig) { /* start with everything (cept fullscreen) */ diff --git a/openbox/client.h b/openbox/client.h index 6d018bc..daf6a2c 100644 --- a/openbox/client.h +++ b/openbox/client.h @@ -606,6 +606,9 @@ void client_update_sync_request_counter(ObClient *self); void client_update_colormap(ObClient *self, Colormap colormap); /*! Updates the WMNormalHints and adjusts things if they change */ void client_update_normal_hints(ObClient *self); +/*! Updates the ObMwmHints after they have changed and adjusts decorations + and functions */ +void client_update_mwm_hints(ObClient *self); /*! Updates the WMHints and adjusts things if they change @param initstate Whether to read the initial_state property from the diff --git a/openbox/event.c b/openbox/event.c index f69267d..e4d77b9 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -1569,6 +1569,9 @@ static void event_handle_client(ObClient *client, XEvent *e) client_update_sync_request_counter(client); } #endif + else if (msgtype == OBT_PROP_ATOM(MOTIF_WM_HINTS)) { + client_update_mwm_hints(client); + } break; case ColormapNotify: client_update_colormap(client, e->xcolormap.colormap);