mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 17:10:40 -05:00
change so that window can be offscreen to the bottom or the right, as long
2001-11-27 Havoc Pennington <hp@pobox.com> * src/window.c (constrain_position): change so that window can be offscreen to the bottom or the right, as long as a small top-left corner of the window remains onscreen. However, windows still can't go off the left or top.
This commit is contained in:
parent
420c29dea9
commit
248487a63c
@ -1,3 +1,10 @@
|
||||
2001-11-27 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* src/window.c (constrain_position): change so that window can be
|
||||
offscreen to the bottom or the right, as long as a small top-left
|
||||
corner of the window remains onscreen. However, windows still
|
||||
can't go off the left or top.
|
||||
|
||||
2001-11-26 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* src/window.c (window_query_root_pointer): add error trap
|
||||
|
28
src/window.c
28
src/window.c
@ -4778,6 +4778,9 @@ constrain_position (MetaWindow *window,
|
||||
if (offscreen_h > 0)
|
||||
nw_y -= offscreen_h;
|
||||
|
||||
#if 0
|
||||
/* This is the old don't-allow-off-screen-at-all constraint */
|
||||
|
||||
/* Convert se_x, se_y to the most bottom-right position
|
||||
* the window can occupy - don't allow offscreen
|
||||
*/
|
||||
@ -4796,14 +4799,29 @@ constrain_position (MetaWindow *window,
|
||||
se_x += offscreen_w;
|
||||
if (offscreen_h > 0)
|
||||
se_y += offscreen_h;
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/* this is the old allow-offscreen-to-se constraint */
|
||||
#if 1
|
||||
/* Require the top-left corner of the frame to be onscreen,
|
||||
* so people can't lose the menu control. (FIXME
|
||||
* instead of TITLEBAR_LENGTH_ONSCREEN, get the actual size
|
||||
* of the menu control?).
|
||||
*
|
||||
* Remember, we're constraining StaticGravity position.
|
||||
*/
|
||||
if (window->frame)
|
||||
{
|
||||
#define TITLEBAR_LENGTH_ONSCREEN 10
|
||||
se_x -= (fgeom->left_width + TITLEBAR_LENGTH_ONSCREEN);
|
||||
se_y -= fgeom->top_height;
|
||||
#define TITLEBAR_LENGTH_ONSCREEN 15
|
||||
se_x -= TITLEBAR_LENGTH_ONSCREEN;
|
||||
se_y -= 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* for frameless windows, just require an arbitrary little
|
||||
* chunk to be onscreen
|
||||
*/
|
||||
se_x -= TITLEBAR_LENGTH_ONSCREEN;
|
||||
se_y -= TITLEBAR_LENGTH_ONSCREEN;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user