summaryrefslogtreecommitdiff
path: root/Servers/WindowServer/WSWindow.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-04-20 14:40:38 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-04-20 14:40:59 +0200
commit49e7ffc06a51632fc6210660d7765f2dfbe408d7 (patch)
treed7ec639f172d1ef6eac05a301985e950764744a6 /Servers/WindowServer/WSWindow.cpp
parentab94a6be00ecd48575653e5d0ab3b2f21d131836 (diff)
downloadserenity-49e7ffc06a51632fc6210660d7765f2dfbe408d7.zip
WindowServer: Introduce a WM event mask so Taskbar can ignore window rects.
Taskbar was waking up to do nothing every time a window rect changed.
Diffstat (limited to 'Servers/WindowServer/WSWindow.cpp')
-rw-r--r--Servers/WindowServer/WSWindow.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/Servers/WindowServer/WSWindow.cpp b/Servers/WindowServer/WSWindow.cpp
index b8f3df4ca8..4bb1e16cd8 100644
--- a/Servers/WindowServer/WSWindow.cpp
+++ b/Servers/WindowServer/WSWindow.cpp
@@ -38,8 +38,10 @@ WSWindow::WSWindow(WSClientConnection& client, WSWindowType window_type, int win
, m_frame(*this)
{
// FIXME: This should not be hard-coded here.
- if (m_type == WSWindowType::Taskbar)
+ if (m_type == WSWindowType::Taskbar) {
+ m_wm_event_mask = WSAPI_WMEventMask::WindowStateChanges | WSAPI_WMEventMask::WindowRemovals | WSAPI_WMEventMask::WindowIconChanges;
m_listens_to_wm_events = true;
+ }
WSWindowManager::the().add_window(*this);
}
@@ -210,6 +212,15 @@ void WSWindow::event(CEvent& event)
break;
}
+ case WSEvent::WM_WindowRectChanged: {
+ auto& changed_event = static_cast<const WSWMWindowRectChangedEvent&>(event);
+ server_message.type = WSAPI_ServerMessage::Type::WM_WindowRectChanged;
+ server_message.wm.client_id = changed_event.client_id();
+ server_message.wm.window_id = changed_event.window_id();
+ server_message.wm.rect = changed_event.rect();
+ break;
+ }
+
default:
break;
}