client_restore_session_state(self);
/* now we have all of the window's information so we can set this up */
- client_setup_decor_and_functions(self);
+ client_setup_decor_and_functions(self, FALSE);
{
Time t = sn_app_started(self->startup_id, self->class);
}
}
-/*! This needs to be followed by a call to client_configure to make
- the changes show */
-void client_setup_decor_and_functions(ObClient *self)
+void client_setup_decor_and_functions(ObClient *self, gboolean reconfig)
{
/* start with everything (cept fullscreen) */
self->decorations =
}
client_change_allowed_actions(self);
+
+ if (reconfig)
+ client_reconfigure(self);
}
static void client_change_allowed_actions(ObClient *self)
(self->functions & OB_CLIENT_FUNC_UNDECORATE || !undecorated))
{
self->undecorated = undecorated;
- client_setup_decor_and_functions(self);
- client_reconfigure(self); /* show the lack of decorations */
+ client_setup_decor_and_functions(self, TRUE);
client_change_state(self); /* reflect this in the state hints */
}
}
/*! Set up what decor should be shown on the window and what functions should
be allowed (ObClient::decorations and ObClient::functions).
This also updates the NET_WM_ALLOWED_ACTIONS hint.
+ @param reconfig When TRUE, the window will be reconfigured to show the
+ changes
*/
-void client_setup_decor_and_functions(ObClient *self);
+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);
if (msgtype == XA_WM_NORMAL_HINTS) {
client_update_normal_hints(client);
/* normal hints can make a window non-resizable */
- client_setup_decor_and_functions(client);
- client_reconfigure(client);
+ client_setup_decor_and_functions(client, TRUE);
} else if (msgtype == XA_WM_HINTS) {
client_update_wmhints(client);
} else if (msgtype == XA_WM_TRANSIENT_FOR) {
client_get_type_and_transientness(client);
/* type may have changed, so update the layer */
client_calc_layer(client);
- client_setup_decor_and_functions(client);
- client_reconfigure(client);
+ client_setup_decor_and_functions(client, TRUE);
} else if (msgtype == prop_atoms.net_wm_name ||
msgtype == prop_atoms.wm_name ||
msgtype == prop_atoms.net_wm_icon_name ||
client_update_title(client);
} else if (msgtype == prop_atoms.wm_protocols) {
client_update_protocols(client);
- client_setup_decor_and_functions(client);
- client_reconfigure(client);
+ client_setup_decor_and_functions(client, TRUE);
}
else if (msgtype == prop_atoms.net_wm_strut) {
client_update_strut(client);