WindowServer: Simplify handling of the window resize candidate

Always clear the current resize candidate when starting new mouse
event processing (instead of trying to be smart about it.)
This commit is contained in:
Andreas Kling 2021-06-18 17:25:15 +02:00
commit 1537172a6b
Notes: sideshowbarker 2024-07-18 12:04:21 +09:00
2 changed files with 4 additions and 7 deletions

View file

@ -682,7 +682,6 @@ bool WindowFrame::handle_titlebar_icon_mouse_event(MouseEvent const& event)
void WindowFrame::handle_titlebar_mouse_event(MouseEvent const& event)
{
auto& wm = WindowManager::the();
wm.clear_resize_candidate();
if (titlebar_icon_rect().contains(event.position())) {
if (handle_titlebar_icon_mouse_event(event))
@ -733,7 +732,6 @@ void WindowFrame::handle_mouse_event(MouseEvent const& event)
}
if (menubar_rect().contains(event.position())) {
wm.clear_resize_candidate();
handle_menubar_mouse_event(event);
return;
}