mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
Relax the partially onscreen constraint to allow the titlebar to touch the
2005-11-21 Elijah Newren <newren@gmail.com> * src/constraints.c (constrain_partially_onscreen): Relax the partially onscreen constraint to allow the titlebar to touch the bottom panel in order to make the new constraints code function the same as the old version. Fixes #322071.
This commit is contained in:
parent
20e6b8d2f8
commit
b03d82661f
@ -1,8 +1,15 @@
|
|||||||
|
2005-11-21 Elijah Newren <newren@gmail.com>
|
||||||
|
|
||||||
|
* src/constraints.c (constrain_partially_onscreen): Relax the
|
||||||
|
partially onscreen constraint to allow the titlebar to touch the
|
||||||
|
bottom panel in order to make the new constraints code function
|
||||||
|
the same as the old version. Fixes #322071.
|
||||||
|
|
||||||
2005-11-21 Elijah Newren <newren@gmail.com>
|
2005-11-21 Elijah Newren <newren@gmail.com>
|
||||||
|
|
||||||
* src/constraints.c (place_window_if_needed): When updating the
|
* src/constraints.c (place_window_if_needed): When updating the
|
||||||
xinerama due to placement, update which maximal/spanning rect set
|
xinerama due to placement, update which maximal/spanning rect set
|
||||||
to use as well
|
to use as well. Fixes #322068.
|
||||||
|
|
||||||
2005-11-21 Elijah Newren <newren@gmail.com>
|
2005-11-21 Elijah Newren <newren@gmail.com>
|
||||||
|
|
||||||
|
@ -1058,12 +1058,21 @@ constrain_partially_onscreen (MetaWindow *window,
|
|||||||
* Then, the amount that is allowed off is just the window size minus
|
* Then, the amount that is allowed off is just the window size minus
|
||||||
* this amount.
|
* this amount.
|
||||||
*/
|
*/
|
||||||
|
int top_amount, bottom_amount;
|
||||||
int horiz_amount = info->current.width / 4;
|
int horiz_amount = info->current.width / 4;
|
||||||
int vert_amount = info->current.height / 4;
|
int vert_amount = info->current.height / 4;
|
||||||
horiz_amount = CLAMP (horiz_amount, 10, 75);
|
horiz_amount = CLAMP (horiz_amount, 10, 75);
|
||||||
vert_amount = CLAMP (vert_amount, 10, 75);
|
vert_amount = CLAMP (vert_amount, 10, 75);
|
||||||
horiz_amount = info->current.width - horiz_amount;
|
horiz_amount = info->current.width - horiz_amount;
|
||||||
vert_amount = info->current.height - vert_amount;
|
vert_amount = info->current.height - vert_amount;
|
||||||
|
top_amount = vert_amount;
|
||||||
|
/* Allow the titlebar to touch the bottom panel; If there is no titlebar,
|
||||||
|
* require vert_amount to remain on the screen.
|
||||||
|
*/
|
||||||
|
if (window->frame)
|
||||||
|
bottom_amount = info->current.height + info->fgeom->bottom_height;
|
||||||
|
else
|
||||||
|
bottom_amount = vert_amount;
|
||||||
|
|
||||||
/* Extend the region, have a helper function handle the constraint,
|
/* Extend the region, have a helper function handle the constraint,
|
||||||
* then return the region to its original size.
|
* then return the region to its original size.
|
||||||
@ -1071,8 +1080,8 @@ constrain_partially_onscreen (MetaWindow *window,
|
|||||||
meta_rectangle_expand_region (info->usable_screen_region,
|
meta_rectangle_expand_region (info->usable_screen_region,
|
||||||
horiz_amount,
|
horiz_amount,
|
||||||
horiz_amount,
|
horiz_amount,
|
||||||
vert_amount,
|
top_amount,
|
||||||
vert_amount);
|
bottom_amount);
|
||||||
gboolean retval =
|
gboolean retval =
|
||||||
do_screen_and_xinerama_relative_constraints (window,
|
do_screen_and_xinerama_relative_constraints (window,
|
||||||
info->usable_screen_region,
|
info->usable_screen_region,
|
||||||
@ -1081,8 +1090,8 @@ constrain_partially_onscreen (MetaWindow *window,
|
|||||||
meta_rectangle_expand_region (info->usable_screen_region,
|
meta_rectangle_expand_region (info->usable_screen_region,
|
||||||
-horiz_amount,
|
-horiz_amount,
|
||||||
-horiz_amount,
|
-horiz_amount,
|
||||||
-vert_amount,
|
-top_amount,
|
||||||
-vert_amount);
|
-bottom_amount);
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user