diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-05-12 21:32:02 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-05-12 21:32:02 +0200 |
commit | 641893104ae28392c3b5c1502370982d060d67b7 (patch) | |
tree | 601caad7e002fc085830e5d43d6c3f30e0c605a3 /Servers/WindowServer/WSButton.cpp | |
parent | dddf45f56367b6e9e3a6740fe9bf70d81b4d6b1a (diff) | |
download | serenity-641893104ae28392c3b5c1502370982d060d67b7.zip |
WindowServer: Add a maximize/unmaximize button to windows.
Diffstat (limited to 'Servers/WindowServer/WSButton.cpp')
-rw-r--r-- | Servers/WindowServer/WSButton.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Servers/WindowServer/WSButton.cpp b/Servers/WindowServer/WSButton.cpp index 24e639164f..bf26ffb552 100644 --- a/Servers/WindowServer/WSButton.cpp +++ b/Servers/WindowServer/WSButton.cpp @@ -5,7 +5,7 @@ #include <SharedGraphics/StylePainter.h> #include <SharedGraphics/CharacterBitmap.h> -WSButton::WSButton(WSWindowFrame& frame, Retained<CharacterBitmap>&& bitmap, Function<void()>&& on_click_handler) +WSButton::WSButton(WSWindowFrame& frame, Retained<CharacterBitmap>&& bitmap, Function<void(WSButton&)>&& on_click_handler) : on_click(move(on_click_handler)) , m_frame(frame) , m_bitmap(move(bitmap)) @@ -47,7 +47,7 @@ void WSButton::on_mouse_event(const WSMouseEvent& event) m_pressed = false; if (rect().contains(event.position())) { if (on_click) - on_click(); + on_click(*this); } if (old_pressed != m_pressed) wm.invalidate(screen_rect()); |