diff --git a/Servers/WindowServer/WSWindowFrame.cpp b/Servers/WindowServer/WSWindowFrame.cpp index ba42e4e67e..14e58319d9 100644 --- a/Servers/WindowServer/WSWindowFrame.cpp +++ b/Servers/WindowServer/WSWindowFrame.cpp @@ -257,7 +257,14 @@ void WSWindowFrame::on_mouse_event(const WSMouseEvent& event) auto& wm = WSWindowManager::the(); if (m_window.type() != WSWindowType::Normal) return; - if (title_bar_rect().contains(event.position())) { + + // This is slightly hackish, but expand the title bar rect by one pixel 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); + + if (adjusted_title_bar_rect.contains(event.position())) { wm.clear_resize_candidate(); if (event.type() == WSEvent::MouseDown)