summaryrefslogtreecommitdiff
path: root/Servers/WindowServer/WSButton.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-05-12 21:32:02 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-05-12 21:32:02 +0200
commit641893104ae28392c3b5c1502370982d060d67b7 (patch)
tree601caad7e002fc085830e5d43d6c3f30e0c605a3 /Servers/WindowServer/WSButton.cpp
parentdddf45f56367b6e9e3a6740fe9bf70d81b4d6b1a (diff)
downloadserenity-641893104ae28392c3b5c1502370982d060d67b7.zip
WindowServer: Add a maximize/unmaximize button to windows.
Diffstat (limited to 'Servers/WindowServer/WSButton.cpp')
-rw-r--r--Servers/WindowServer/WSButton.cpp4
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());