summaryrefslogtreecommitdiff
path: root/Servers/WindowServer/WSScreen.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-04-14 05:23:37 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-04-14 05:23:37 +0200
commit94a5e08faf331234c9e67ed86f780c64c3c721a0 (patch)
tree7b4de49709614bdf2c64bd6b604bec059b8192e1 /Servers/WindowServer/WSScreen.cpp
parentde184d0999018e598daae7cd872b181ca92f5a31 (diff)
downloadserenity-94a5e08faf331234c9e67ed86f780c64c3c721a0.zip
WindowServer: Rename WSMessage* => WSEvent*.
Since I'm on a roll here, I'll just rename WSMessageFoo to WSEventFoo now that these inherit from CEventFoo anyway.
Diffstat (limited to 'Servers/WindowServer/WSScreen.cpp')
-rw-r--r--Servers/WindowServer/WSScreen.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Servers/WindowServer/WSScreen.cpp b/Servers/WindowServer/WSScreen.cpp
index 81ba34ee98..2bff83f290 100644
--- a/Servers/WindowServer/WSScreen.cpp
+++ b/Servers/WindowServer/WSScreen.cpp
@@ -1,6 +1,6 @@
#include "WSScreen.h"
-#include "WSMessageLoop.h"
-#include "WSMessage.h"
+#include "WSEventLoop.h"
+#include "WSEvent.h"
#include "WSWindowManager.h"
#include <unistd.h>
#include <fcntl.h>
@@ -69,15 +69,15 @@ void WSScreen::on_receive_mouse_data(int dx, int dy, unsigned buttons)
auto post_mousedown_or_mouseup_if_needed = [&] (MouseButton button) {
if (!(changed_buttons & (unsigned)button))
return;
- auto message = make<WSMouseEvent>(buttons & (unsigned)button ? WSMessage::MouseDown : WSMessage::MouseUp, m_cursor_location, buttons, button, m_modifiers);
- WSMessageLoop::the().post_event(WSWindowManager::the(), move(message));
+ auto message = make<WSMouseEvent>(buttons & (unsigned)button ? WSEvent::MouseDown : WSEvent::MouseUp, m_cursor_location, buttons, button, m_modifiers);
+ WSEventLoop::the().post_event(WSWindowManager::the(), move(message));
};
post_mousedown_or_mouseup_if_needed(MouseButton::Left);
post_mousedown_or_mouseup_if_needed(MouseButton::Right);
post_mousedown_or_mouseup_if_needed(MouseButton::Middle);
if (m_cursor_location != prev_location) {
- auto message = make<WSMouseEvent>(WSMessage::MouseMove, m_cursor_location, buttons, MouseButton::None, m_modifiers);
- WSMessageLoop::the().post_event(WSWindowManager::the(), move(message));
+ auto message = make<WSMouseEvent>(WSEvent::MouseMove, m_cursor_location, buttons, MouseButton::None, m_modifiers);
+ WSEventLoop::the().post_event(WSWindowManager::the(), move(message));
}
// NOTE: Invalidate the cursor if it moved, or if the left button changed state (for the cursor color inversion.)
if (m_cursor_location != prev_location || changed_buttons & (unsigned)MouseButton::Left)
@@ -87,8 +87,8 @@ void WSScreen::on_receive_mouse_data(int dx, int dy, unsigned buttons)
void WSScreen::on_receive_keyboard_data(KeyEvent kernel_event)
{
m_modifiers = kernel_event.modifiers();
- auto message = make<WSKeyEvent>(kernel_event.is_press() ? WSMessage::KeyDown : WSMessage::KeyUp, kernel_event.key, kernel_event.character, kernel_event.modifiers());
- WSMessageLoop::the().post_event(WSWindowManager::the(), move(message));
+ auto message = make<WSKeyEvent>(kernel_event.is_press() ? WSEvent::KeyDown : WSEvent::KeyUp, kernel_event.key, kernel_event.character, kernel_event.modifiers());
+ WSEventLoop::the().post_event(WSWindowManager::the(), move(message));
}
void WSScreen::set_y_offset(int offset)