diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-02-20 13:59:13 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-02-20 13:59:13 +0100 |
commit | a9911fca80254bb571dfe96419772d726ceb92cf (patch) | |
tree | 635f2f0c69d449f49d87824f08dd5600caa68d50 | |
parent | 96943dbad1cce0c087cbc00531e3895c0fd7245b (diff) | |
download | serenity-a9911fca80254bb571dfe96419772d726ceb92cf.zip |
WindowServer: Minor style tweak.
-rw-r--r-- | WindowServer/WSWindowManager.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/WindowServer/WSWindowManager.cpp b/WindowServer/WSWindowManager.cpp index d1272deb0d..c4c97a8cb7 100644 --- a/WindowServer/WSWindowManager.cpp +++ b/WindowServer/WSWindowManager.cpp @@ -491,8 +491,8 @@ void WSWindowManager::process_mouse_event(WSMouseEvent& event, WSWindow*& event_ { event_window = nullptr; - if (event.type() == WSMessage::MouseUp && event.button() == MouseButton::Left) { - if (m_drag_window) { + if (m_drag_window) { + if (event.type() == WSMessage::MouseUp && event.button() == MouseButton::Left) { #ifdef DRAG_DEBUG printf("[WM] Finish dragging WSWindow{%p}\n", m_drag_window.ptr()); #endif @@ -501,10 +501,8 @@ void WSWindowManager::process_mouse_event(WSMouseEvent& event, WSWindow*& event_ m_drag_window = nullptr; return; } - } - if (event.type() == WSMessage::MouseMove) { - if (m_drag_window) { + if (event.type() == WSMessage::MouseMove) { auto old_window_rect = m_drag_window->rect(); Point pos = m_drag_window_origin; #ifdef DRAG_DEBUG |