summaryrefslogtreecommitdiff
path: root/WindowServer/WSScreen.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/WSScreen.cpp
parentbba21adae377c2b1f1876adb0f877f62cdb075e9 (diff)
downloadserenity-244d5bcce1b0c1b6926dd74e61ae50934171bd4f.zip
WindowServer: More event -> message renaming.
Diffstat (limited to 'WindowServer/WSScreen.cpp')
-rw-r--r--WindowServer/WSScreen.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/WindowServer/WSScreen.cpp b/WindowServer/WSScreen.cpp
index 483396dda2..4c4fb88aca 100644
--- a/WindowServer/WSScreen.cpp
+++ b/WindowServer/WSScreen.cpp
@@ -47,20 +47,20 @@ void WSScreen::on_receive_mouse_data(int dx, int dy, bool left_button, bool righ
if (right_button)
buttons |= (unsigned)MouseButton::Right;
if (m_cursor_location != prev_location) {
- auto event = make<WSMouseEvent>(WSMessage::MouseMove, m_cursor_location, buttons);
- WSMessageLoop::the().post_event(&WSWindowManager::the(), move(event));
+ auto message = make<WSMouseEvent>(WSMessage::MouseMove, m_cursor_location, buttons);
+ WSMessageLoop::the().post_message(&WSWindowManager::the(), move(message));
}
bool prev_left_button = m_left_mouse_button_pressed;
bool prev_right_button = m_right_mouse_button_pressed;
m_left_mouse_button_pressed = left_button;
m_right_mouse_button_pressed = right_button;
if (prev_left_button != left_button) {
- auto event = make<WSMouseEvent>(left_button ? WSMessage::MouseDown : WSMessage::MouseUp, m_cursor_location, buttons, MouseButton::Left);
- WSMessageLoop::the().post_event(&WSWindowManager::the(), move(event));
+ auto message = make<WSMouseEvent>(left_button ? WSMessage::MouseDown : WSMessage::MouseUp, m_cursor_location, buttons, MouseButton::Left);
+ WSMessageLoop::the().post_message(&WSWindowManager::the(), move(message));
}
if (prev_right_button != right_button) {
- auto event = make<WSMouseEvent>(right_button ? WSMessage::MouseDown : WSMessage::MouseUp, m_cursor_location, buttons, MouseButton::Right);
- WSMessageLoop::the().post_event(&WSWindowManager::the(), move(event));
+ auto message = make<WSMouseEvent>(right_button ? WSMessage::MouseDown : WSMessage::MouseUp, m_cursor_location, buttons, MouseButton::Right);
+ WSMessageLoop::the().post_message(&WSWindowManager::the(), move(message));
}
if (m_cursor_location != prev_location || prev_left_button != left_button)
WSWindowManager::the().draw_cursor();
@@ -68,9 +68,9 @@ void WSScreen::on_receive_mouse_data(int dx, int dy, bool left_button, bool righ
void WSScreen::on_receive_keyboard_data(Keyboard::Event kernel_event)
{
- auto event = make<WSKeyEvent>(kernel_event.is_press() ? WSMessage::KeyDown : WSMessage::KeyUp, kernel_event.key, kernel_event.character);
- event->m_shift = kernel_event.shift();
- event->m_ctrl = kernel_event.ctrl();
- event->m_alt = kernel_event.alt();
- WSMessageLoop::the().post_event(&WSWindowManager::the(), move(event));
+ auto message = make<WSKeyEvent>(kernel_event.is_press() ? WSMessage::KeyDown : WSMessage::KeyUp, kernel_event.key, kernel_event.character);
+ message->m_shift = kernel_event.shift();
+ message->m_ctrl = kernel_event.ctrl();
+ message->m_alt = kernel_event.alt();
+ WSMessageLoop::the().post_message(&WSWindowManager::the(), move(message));
}