mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
constraints: Fix titlebars going off the bottom
The "current" rect includes the frame, so in order to keep the titlebar on screen, window movement must be restricted to at most (height - titlebar_height) past the work area bottom. https://gitlab.gnome.org/GNOME/mutter/merge_requests/391
This commit is contained in:
parent
22f865122c
commit
a0909c3440
@ -1594,7 +1594,7 @@ constrain_titlebar_visible (MetaWindow *window,
|
||||
MetaFrameBorders borders;
|
||||
meta_frame_calc_borders (window->frame, &borders);
|
||||
|
||||
bottom_amount = info->current.height + borders.visible.bottom;
|
||||
bottom_amount = info->current.height - borders.visible.top;
|
||||
vert_amount_onscreen = borders.visible.top;
|
||||
}
|
||||
else
|
||||
@ -1673,7 +1673,7 @@ constrain_partially_onscreen (MetaWindow *window,
|
||||
MetaFrameBorders borders;
|
||||
meta_frame_calc_borders (window->frame, &borders);
|
||||
|
||||
bottom_amount = info->current.height + borders.visible.bottom;
|
||||
bottom_amount = info->current.height - borders.visible.top;
|
||||
vert_amount_onscreen = borders.visible.top;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user