summaryrefslogtreecommitdiff
path: root/WindowServer/WSWindowManager.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-01-26 05:35:45 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-01-26 05:35:45 +0100
commit244d5bcce1b0c1b6926dd74e61ae50934171bd4f (patch)
tree8ae69948469b92eb7d68ac3d5b41a9dd3d0b197c /WindowServer/WSWindowManager.cpp
parentbba21adae377c2b1f1876adb0f877f62cdb075e9 (diff)
downloadserenity-244d5bcce1b0c1b6926dd74e61ae50934171bd4f.zip
WindowServer: More event -> message renaming.
Diffstat (limited to 'WindowServer/WSWindowManager.cpp')
-rw-r--r--WindowServer/WSWindowManager.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/WindowServer/WSWindowManager.cpp b/WindowServer/WSWindowManager.cpp
index f685d197fc..0b25730e0a 100644
--- a/WindowServer/WSWindowManager.cpp
+++ b/WindowServer/WSWindowManager.cpp
@@ -305,7 +305,7 @@ void WSWindowManager::process_mouse_event(WSMouseEvent& event)
// FIXME: Should we just alter the coordinates of the existing MouseEvent and pass it through?
Point position { event.x() - window->rect().x(), event.y() - window->rect().y() };
auto local_event = make<WSMouseEvent>(event.type(), position, event.buttons(), event.button());
- window->event(*local_event);
+ window->on_message(*local_event);
return;
}
}
@@ -387,21 +387,21 @@ void WSWindowManager::draw_cursor()
m_last_cursor_rect = cursor_rect;
}
-void WSWindowManager::event(WSMessage& event)
+void WSWindowManager::on_message(WSMessage& message)
{
ASSERT_INTERRUPTS_ENABLED();
LOCKER(m_lock);
- if (event.is_mouse_event())
- return process_mouse_event(static_cast<WSMouseEvent&>(event));
+ if (message.is_mouse_event())
+ return process_mouse_event(static_cast<WSMouseEvent&>(message));
- if (event.is_key_event()) {
+ if (message.is_key_event()) {
// FIXME: This is a good place to hook key events globally. :)
if (m_active_window)
- return m_active_window->event(event);
+ return m_active_window->on_message(message);
return;
}
- if (event.type() == WSMessage::WM_Compose) {
+ if (message.type() == WSMessage::WM_Compose) {
m_pending_compose_event = false;
compose();
return;
@@ -415,12 +415,12 @@ void WSWindowManager::set_active_window(WSWindow* window)
return;
if (auto* previously_active_window = m_active_window.ptr()) {
- WSMessageLoop::the().post_event(previously_active_window, make<WSMessage>(WSMessage::WindowDeactivated));
+ WSMessageLoop::the().post_message(previously_active_window, make<WSMessage>(WSMessage::WindowDeactivated));
invalidate(*previously_active_window);
}
m_active_window = window->makeWeakPtr();
if (m_active_window) {
- WSMessageLoop::the().post_event(m_active_window.ptr(), make<WSMessage>(WSMessage::WindowActivated));
+ WSMessageLoop::the().post_message(m_active_window.ptr(), make<WSMessage>(WSMessage::WindowActivated));
invalidate(*m_active_window);
}
}
@@ -454,7 +454,7 @@ void WSWindowManager::invalidate(const Rect& a_rect)
if (!m_pending_compose_event) {
ASSERT_INTERRUPTS_ENABLED();
- WSMessageLoop::the().post_event(this, make<WSMessage>(WSMessage::WM_Compose));
+ WSMessageLoop::the().post_message(this, make<WSMessage>(WSMessage::WM_Compose));
m_pending_compose_event = true;
}
}