GNOME Bugzilla – Bug 97370
can't move detached handleboxes offscreen
Last modified: 2004-12-22 21:47:04 UTC
While metacity 2.4.2 lets me move regular toplevels partially offscreen, it refuses to do so with the undecorated detached handleboxes. This can can annoying situations where it is impossible to re-dock the handlebox even though the dock is onscreen (but moving the handleboxes handle over the dock would require to move the box partially offscreen). If you want to see this in action, open the handle box example of testgtk, use the properties editor to change the handle_position to right and detach the handle box. This causes the toplevel containing the dock to shrink a lot, moving the dock to the left part of the screen, where the handleboxes snap_edge can't reach it without moving the box partially offscreen. Annoying. Window managers shouldn't get in the way of the user. Not letting me move my windows as I want is pretty bad, even from the "wm for the adult in you".
The problem code is: /* FIXME note this means framed windows can go off the left * but not unframed windows. */ if (window->frame) { /* Must keep TITLEBAR_LENGTH_ONSCREEN onscreen when moving left */ nw_x -= fgeom->left_width + window->rect.width + fgeom->right_width - TITLEBAR_LENGTH_ONSCREEN; /* Can't move off the top */ nw_y += fgeom->top_height; } Should be a simple fix but I don't really want to bother tweaking constrain_position more before doing bug #107010
Moving detached handleboxes offscreen seems to work fine now. One odd thing I have seen though is that detaching the handlebox can move the window containing it offscreen. To repeat, bring up testgtk, use flipping to select global text direction RTL, then bring up the handle box example, move it partially offscreen to the left (to bring the handle at the far right onscreen), then detach the handlebox: the toplevel will shrink far enough to move completely offscreen. This also exposes some odd behaviour of libwnck, since the toplevel now seems to be on the workspace to the left (the workspace switcher displays it), but when moving to that workspace, the window obviously isn't there)
This seems to work OK for me now, but I'm not sure I'm following your instructions properly.
theoretically if the app tries to resize itself off the screen it'll get pushed back onto the screen.
Let's assume fixed since it seems to work, if reopened please help me figure out how to see the bug in more detail.