mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:57:44 +00:00
WindowServer: Don't allow resize-grabbing window underneath title bar
This commit is contained in:
parent
2921793c01
commit
a639172760
1 changed files with 2 additions and 2 deletions
|
@ -362,11 +362,11 @@ void WindowFrame::on_mouse_event(const MouseEvent& event)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is slightly hackish, but expand the title bar rect by one pixel downwards,
|
// This is slightly hackish, but expand the title bar rect by two pixels downwards,
|
||||||
// so that mouse events between the title bar and window contents don't act like
|
// so that mouse events between the title bar and window contents don't act like
|
||||||
// mouse events on the border.
|
// mouse events on the border.
|
||||||
auto adjusted_title_bar_rect = title_bar_rect();
|
auto adjusted_title_bar_rect = title_bar_rect();
|
||||||
adjusted_title_bar_rect.set_height(adjusted_title_bar_rect.height() + 1);
|
adjusted_title_bar_rect.set_height(adjusted_title_bar_rect.height() + 2);
|
||||||
|
|
||||||
if (adjusted_title_bar_rect.contains(event.position())) {
|
if (adjusted_title_bar_rect.contains(event.position())) {
|
||||||
wm.clear_resize_candidate();
|
wm.clear_resize_candidate();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue