place_client(self, &x, &y);
- /* make sure the window is visible.
-
- this is about the rude parameter:
- non-normal clients has less rules, and
- windows that are being restored from a session
- do also. we can assume you want it back where
- you saved it */
- client_move_onscreen(self, client_normal(self) && !self->session);
+ /* make sure the window is visible. */
+ client_find_onscreen(self, &x, &y,
+ self->frame->area.width,
+ self->frame->area.height,
+ /* non-normal clients has less rules, and
+ windows that are being restored from a session
+ do also. we can assume you want it back where
+ you saved it */
+ client_normal(self) && !self->session);
+ if (x != ox || y != oy)
+ client_move(self, x, y);
}
keyboard_grab_for_client(self, TRUE);
else if (self->type == OB_CLIENT_TYPE_DESKTOP)
l = OB_STACKING_LAYER_DESKTOP;
else if (self->type == OB_CLIENT_TYPE_DOCK) {
- if (self->above) l = OB_STACKING_LAYER_DOCK_ABOVE;
- else if (self->below) l = OB_STACKING_LAYER_DOCK_BELOW;
- else l = OB_STACKING_LAYER_DOCK_NORMAL;
+ if (self->below) l = OB_STACKING_LAYER_NORMAL;
+ else l = OB_STACKING_LAYER_ABOVE;
}
else if (self->above) l = OB_STACKING_LAYER_ABOVE;
else if (self->below) l = OB_STACKING_LAYER_BELOW;
if (self->undecorated != undecorated) {
self->undecorated = undecorated;
client_setup_decor_and_functions(self);
+ // Make sure the client knows it might have moved. Maybe there is a
+ // better way of doing this so only one client_configure is sent, but
+ // since 125 of these are sent per second when moving the window (with
+ // user = FALSE) i doubt it matters much.
+ client_configure(self, OB_CORNER_TOPLEFT, self->area.x, self->area.y,
+ self->area.width, self->area.height, TRUE, TRUE);
client_change_state(self); /* reflect this in the state hints */
}
}