client_change_allowed_actions(self);
if (reconfig)
- client_reconfigure(self);
+ /* force reconfigure to make sure decorations are updated */
+ client_reconfigure(self, TRUE);
}
static void client_change_allowed_actions(ObClient *self)
}
}
-void client_reconfigure(ObClient *self)
+void client_reconfigure(ObClient *self, gboolean force)
{
- client_configure(self, self->area.x, self->area.y,
- self->area.width, self->area.height,
- FALSE, TRUE);
+ gint x, y, w, h, lw, lh;
+
+ /* 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 */
+ RECT_TO_DIMS(self->area, x, y, w, h);
+ if (!force)
+ client_try_configure(self, &x, &y, &w, &h, &lw, &lh, FALSE);
+ if (force || !RECT_EQUAL_DIMS(self->area, x, y, w, h)) {
+ gulong ignore_start;
+
+ ob_debug("Reconfiguring client x %d y %d w %d h %d\n",
+ x, y, w, h);
+ ignore_start = event_start_ignore_all_enters();
+ client_configure(self, x, y, w, h, FALSE, TRUE);
+ event_end_ignore_all_enters(ignore_start);
+ }
}
void client_update_wmhints(ObClient *self)
/* raise if it was not already on the desktop */
if (old != DESKTOP_ALL)
stacking_raise(CLIENT_AS_WINDOW(self));
- /* the new desktop's geometry may be different, so we may need to
- resize, for example if we are maximized */
- client_reconfigure(self);
if (STRUT_EXISTS(self->strut))
screen_update_areas();
+ else
+ /* the new desktop's geometry may be different, so we may need to
+ resize, for example if we are maximized */
+ client_reconfigure(self, FALSE);
}
/* move all transients */
void client_configure(ObClient *self, gint x, gint y, gint w, gint h,
gboolean user, gboolean final);
-void client_reconfigure(ObClient *self);
+void client_reconfigure(ObClient *self, gboolean force);
/*! Finds coordinates to keep a client on the screen.
@param self The client
/* send a synthetic ConfigureNotify, cuz this is supposed
to be like a ConfigureRequest. */
- client_reconfigure(client);
+ client_reconfigure(client, TRUE);
} else
ob_debug_type(OB_DEBUG_APP_BUGS,
"_NET_RESTACK_WINDOW sent for window %s "
msgtype = e->xproperty.atom;
if (msgtype == XA_WM_NORMAL_HINTS) {
- gint x, y, w, h, lw, lh;
-
ob_debug("Update NORMAL hints\n");
client_update_normal_hints(client);
/* normal hints can make a window non-resizable */
client_setup_decor_and_functions(client, FALSE);
- /* 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 */
- RECT_TO_DIMS(client->area, x, y, w, h);
- client_try_configure(client, &x, &y, &w, &h, &lw, &lh, FALSE);
- if (!RECT_EQUAL_DIMS(client->area, x, y, w, h)) {
- gulong ignore_start;
-
- ob_debug("Configuring client x %d y %d w %d h %d\n",
- x, y, w, h);
- ignore_start = event_start_ignore_all_enters();
- client_configure(client, x, y, w, h, FALSE, TRUE);
- event_end_ignore_all_enters(ignore_start);
- }
+ client_reconfigure(client, FALSE);
} else if (msgtype == XA_WM_HINTS) {
client_update_wmhints(client);
} else if (msgtype == XA_WM_TRANSIENT_FOR) {
else {
/* Send a ConfigureNotify when the animation is done, this fixes
KDE's pager showing the window in the wrong place. */
- client_reconfigure(self->client);
+ client_reconfigure(self->client, TRUE);
}
/* we're not animating any more ! */
frame_adjust_area(c->frame, TRUE, TRUE, FALSE);
/* the decor sizes may have changed, so the windows may
end up in new positions */
- client_reconfigure(c);
+ client_reconfigure(c, FALSE);
}
}
dims, 4 * screen_num_desktops * screen_num_monitors);
/* the area has changed, adjust all the windows if they need it */
- for (it = client_list; it; it = g_list_next(it)) {
- gint x, y, w, h, lw, lh;
- ObClient *client = it->data;
-
- RECT_TO_DIMS(client->area, x, y, w, h);
- client_try_configure(client, &x, &y, &w, &h, &lw, &lh, FALSE);
- if (!RECT_EQUAL_DIMS(client->area, x, y, w, h)) {
- gulong ignore_start;
-
- ignore_start = event_start_ignore_all_enters();
- client_configure(client, x, y, w, h, FALSE, TRUE);
- event_end_ignore_all_enters(ignore_start);
- }
- }
+ for (it = client_list; it; it = g_list_next(it))
+ client_reconfigure(it->data, FALSE);
g_free(dims);
}