summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-02-20 13:59:13 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-02-20 13:59:13 +0100
commita9911fca80254bb571dfe96419772d726ceb92cf (patch)
tree635f2f0c69d449f49d87824f08dd5600caa68d50
parent96943dbad1cce0c087cbc00531e3895c0fd7245b (diff)
downloadserenity-a9911fca80254bb571dfe96419772d726ceb92cf.zip
WindowServer: Minor style tweak.
-rw-r--r--WindowServer/WSWindowManager.cpp8
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