mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +00:00
WindowServer: Don't allow resize-grabbing window underneath title bar
This commit is contained in:
parent
2921793c01
commit
a639172760
Notes:
sideshowbarker
2024-07-19 07:21:52 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/a6391727600
1 changed files with 2 additions and 2 deletions
|
@ -362,11 +362,11 @@ void WindowFrame::on_mouse_event(const MouseEvent& event)
|
|||
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
|
||||
// mouse events on the border.
|
||||
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())) {
|
||||
wm.clear_resize_candidate();
|
||||
|
|
Loading…
Add table
Reference in a new issue