- /* make sure the window is visible */
- if (ob_state() == OB_STATE_RUNNING)
- client_move_onscreen(self, TRUE);
+ /* make sure the window is visible */
+ client_find_onscreen(self, &x, &y,
+ self->frame->area.width,
+ self->frame->area.height,
+ client_normal(self));
+
+ if (x != ox || y != oy)
+ client_configure(self, OB_CORNER_TOPLEFT, x, y,
+ self->area.width, self->area.height,
+ TRUE, TRUE);
+ }