diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-01-20 07:03:38 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-01-20 07:03:38 +0100 |
commit | ea6678b7b321295024a34167c32b4b801f57311d (patch) | |
tree | 44aca484867d775d9edf1e63e4ec05db35a28ed4 /WindowServer/WSWindow.cpp | |
parent | dbe83f3a83001f1ba419b188f41c06054ef54a8e (diff) | |
download | serenity-ea6678b7b321295024a34167c32b4b801f57311d.zip |
LibGUI: Hook up GWindow event dispatch for paint and mouse events.
Diffstat (limited to 'WindowServer/WSWindow.cpp')
-rw-r--r-- | WindowServer/WSWindow.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/WindowServer/WSWindow.cpp b/WindowServer/WSWindow.cpp index b1d7bd8774..d2bb7f5177 100644 --- a/WindowServer/WSWindow.cpp +++ b/WindowServer/WSWindow.cpp @@ -29,10 +29,10 @@ void WSWindow::set_rect(const Rect& rect) { if (m_rect == rect) return; - auto oldRect = m_rect; + auto old_rect = m_rect; m_rect = rect; m_backing = GraphicsBitmap::create(m_process, m_rect.size()); - WSWindowManager::the().notify_rect_changed(*this, oldRect, m_rect); + WSWindowManager::the().notify_rect_changed(*this, old_rect, m_rect); } // FIXME: Just use the same types. @@ -60,16 +60,19 @@ void WSWindow::event(WSEvent& event) gui_event.type = GUI_Event::Type::MouseMove; gui_event.mouse.position = static_cast<MouseEvent&>(event).position(); gui_event.mouse.button = GUI_MouseButton::NoButton; + gui_event.mouse.buttons = static_cast<MouseEvent&>(event).buttons(); break; case WSEvent::MouseDown: gui_event.type = GUI_Event::Type::MouseDown; gui_event.mouse.position = static_cast<MouseEvent&>(event).position(); gui_event.mouse.button = to_api(static_cast<MouseEvent&>(event).button()); + gui_event.mouse.buttons = static_cast<MouseEvent&>(event).buttons(); break; case WSEvent::MouseUp: gui_event.type = GUI_Event::Type::MouseUp; gui_event.mouse.position = static_cast<MouseEvent&>(event).position(); gui_event.mouse.button = to_api(static_cast<MouseEvent&>(event).button()); + gui_event.mouse.buttons = static_cast<MouseEvent&>(event).buttons(); break; case WSEvent::KeyDown: gui_event.type = GUI_Event::Type::KeyDown; |