summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-12-31 03:44:39 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-12-31 03:45:54 +0100
commitf908ee34963a841f105f886e3769d6b337faa4ef (patch)
treee76675f8222187bf947f63f9579e9c433de77c5d
parentc9ec415e2f5075f46175f5694fa4a2e91c5deb5d (diff)
downloadserenity-f908ee34963a841f105f886e3769d6b337faa4ef.zip
WindowServer: Don't deactivate windows after moving them
Also make sure we send out the WM event for window deactivations. This fixes an issue where the taskbar button for a window would appear depressed, even after the window was deactivated.
-rw-r--r--Servers/WindowServer/WSWindowManager.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Servers/WindowServer/WSWindowManager.cpp b/Servers/WindowServer/WSWindowManager.cpp
index 74f4a9d56a..b76234213d 100644
--- a/Servers/WindowServer/WSWindowManager.cpp
+++ b/Servers/WindowServer/WSWindowManager.cpp
@@ -963,7 +963,7 @@ void WSWindowManager::process_mouse_event(WSMouseEvent& event, WSWindow*& hovere
});
// Clicked outside of any window
- if (!hovered_window && event.type() == WSEvent::MouseDown)
+ if (!hovered_window && !event_window_with_frame && event.type() == WSEvent::MouseDown)
set_active_window(nullptr);
}
@@ -1109,6 +1109,7 @@ void WSWindowManager::set_active_window(WSWindow* window)
CEventLoop::current().post_event(*previously_active_window, make<WSEvent>(WSEvent::WindowDeactivated));
invalidate(*previously_active_window);
m_active_window = nullptr;
+ tell_wm_listeners_window_state_changed(*previously_active_window);
}
if (window) {
@@ -1120,8 +1121,6 @@ void WSWindowManager::set_active_window(WSWindow* window)
auto* client = window->client();
ASSERT(client);
set_current_menubar(client->app_menubar());
- if (previously_active_window)
- tell_wm_listeners_window_state_changed(*previously_active_window);
tell_wm_listeners_window_state_changed(*m_active_window);
}