diff options
author | Rob Adams <robadams@ucla.edu> | 2003-03-16 00:13:58 +0000 |
---|---|---|
committer | Rob Adams <readams@src.gnome.org> | 2003-03-16 00:13:58 +0000 |
commit | 2d662f67a56fc68881776365de0686500fbafd05 (patch) | |
tree | dd2f4325bbd1f95dd7e13226fbd127b48143cfe6 /src | |
parent | 67cbbeb6c15e056d920cfbae69074676689ad880 (diff) | |
download | metacity-2d662f67a56fc68881776365de0686500fbafd05.tar.gz |
Don't try to force a window onscreen by more than its width. Fix for
2003-03-14 Rob Adams <robadams@ucla.edu>
* contraints.c (get_outermost_screen_positions): Don't try to
force a window onscreen by more than its width. Fix for #94815.
Diffstat (limited to 'src')
-rw-r--r-- | src/constraints.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/constraints.c b/src/constraints.c index 96535cd2..a4b2c8a9 100644 --- a/src/constraints.c +++ b/src/constraints.c @@ -352,10 +352,11 @@ get_outermost_onscreen_positions (MetaWindow *window, int *bottommost_y) { if (leftmost_x) - *leftmost_x = info->nw_x + TITLEBAR_LENGTH_ONSCREEN - orig->width; + *leftmost_x = info->nw_x - orig->width + + MIN (TITLEBAR_LENGTH_ONSCREEN, orig->width); if (rightmost_x) - *rightmost_x = info->se_x - TITLEBAR_LENGTH_ONSCREEN; + *rightmost_x = info->se_x - MIN (TITLEBAR_LENGTH_ONSCREEN, orig->width); if (topmost_y) *topmost_y = info->nw_y + info->fgeom.top_height; @@ -368,7 +369,8 @@ get_outermost_onscreen_positions (MetaWindow *window, if (window->frame) *bottommost_y = info->se_y; else - *bottommost_y = info->se_y - TITLEBAR_LENGTH_ONSCREEN; + *bottommost_y = info->se_y - + MIN (TITLEBAR_LENGTH_ONSCREEN, orig->height); } } |