diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-01-12 04:16:40 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-01-12 04:16:40 +0100 |
commit | 52e019f9aa39be08ac3c178f046e60841159c0aa (patch) | |
tree | eb7ea6bd5d4219cfe72e541c0a62e78180cc9ba6 /Widgets/WindowManager.cpp | |
parent | db0dbbd97991fc98979b62c017f1f161ef509c0a (diff) | |
download | serenity-52e019f9aa39be08ac3c178f046e60841159c0aa.zip |
Only initiate window title bar drags for left mouse button clicks.
Diffstat (limited to 'Widgets/WindowManager.cpp')
-rw-r--r-- | Widgets/WindowManager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Widgets/WindowManager.cpp b/Widgets/WindowManager.cpp index 9404d863d0..a2b5ff8274 100644 --- a/Widgets/WindowManager.cpp +++ b/Widgets/WindowManager.cpp @@ -167,7 +167,7 @@ void WindowManager::notifyRectChanged(Window& window, const Rect& old_rect, cons void WindowManager::handleTitleBarMouseEvent(Window& window, MouseEvent& event) { - if (event.type() == Event::MouseDown) { + if (event.type() == Event::MouseDown && event.button() == MouseButton::Left) { printf("[WM] Begin dragging Window{%p}\n", &window); m_dragWindow = window.makeWeakPtr();; m_dragOrigin = event.position(); @@ -180,7 +180,7 @@ void WindowManager::handleTitleBarMouseEvent(Window& window, MouseEvent& event) void WindowManager::processMouseEvent(MouseEvent& event) { - if (event.type() == Event::MouseUp) { + if (event.type() == Event::MouseUp && event.button() == MouseButton::Left) { if (m_dragWindow) { printf("[WM] Finish dragging Window{%p}\n", m_dragWindow.ptr()); invalidate(m_dragStartRect); |