mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
Fix computation of window positions for StaticGravity
When adjust_for_gravity() was simplified (01b6445708
), the correct
handling of StaticGravity dropped out - fix adjust_for_gravity() to do
nothing in that case.
https://bugzilla.gnome.org/show_bug.cgi?id=736719
This commit is contained in:
parent
1250afef7b
commit
89ffcee7ca
@ -270,6 +270,17 @@ adjust_for_gravity (MetaWindow *window,
|
|||||||
int frame_width, frame_height;
|
int frame_width, frame_height;
|
||||||
MetaFrameBorders borders;
|
MetaFrameBorders borders;
|
||||||
|
|
||||||
|
/* We're computing position to pass to window_move, which is
|
||||||
|
* the position of the client window (StaticGravity basically)
|
||||||
|
*
|
||||||
|
* (see WM spec description of gravity computation, but note that
|
||||||
|
* their formulas assume we're honoring the border width, rather
|
||||||
|
* than compensating for having turned it off)
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (gravity == StaticGravity)
|
||||||
|
return;
|
||||||
|
|
||||||
if (coords_assume_border)
|
if (coords_assume_border)
|
||||||
bw = priv->border_width;
|
bw = priv->border_width;
|
||||||
else
|
else
|
||||||
@ -282,14 +293,6 @@ adjust_for_gravity (MetaWindow *window,
|
|||||||
frame_width = child_x + rect->width + borders.visible.right;
|
frame_width = child_x + rect->width + borders.visible.right;
|
||||||
frame_height = child_y + rect->height + borders.visible.bottom;
|
frame_height = child_y + rect->height + borders.visible.bottom;
|
||||||
|
|
||||||
/* We're computing position to pass to window_move, which is
|
|
||||||
* the position of the client window (StaticGravity basically)
|
|
||||||
*
|
|
||||||
* (see WM spec description of gravity computation, but note that
|
|
||||||
* their formulas assume we're honoring the border width, rather
|
|
||||||
* than compensating for having turned it off)
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Calculate the the reference point, which is the corner of the
|
/* Calculate the the reference point, which is the corner of the
|
||||||
* outer window specified by the gravity. So, NorthEastGravity
|
* outer window specified by the gravity. So, NorthEastGravity
|
||||||
* would have the reference point as the top-right corner of the
|
* would have the reference point as the top-right corner of the
|
||||||
|
Loading…
Reference in New Issue
Block a user