summaryrefslogtreecommitdiff
path: root/Services
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-05-12 20:30:33 +0200
committerAndreas Kling <kling@serenityos.org>2020-05-12 20:31:16 +0200
commit977863ea078e829df10d351a2e9ac3097fb8f5d9 (patch)
tree5ea075feaa74d0ff74381399c85cae1bfbaaa6b0 /Services
parent3a905aed063e84331aec82826926cdb89d777892 (diff)
downloadserenity-977863ea078e829df10d351a2e9ac3097fb8f5d9.zip
LibGUI: Include keyboard modifier state with button on_click calls
This will allow you us to implement special behavior when Ctrl+clicking a button.
Diffstat (limited to 'Services')
-rw-r--r--Services/SystemMenu/PowerDialog.cpp4
-rw-r--r--Services/Taskbar/TaskbarWindow.cpp2
-rw-r--r--Services/Taskbar/WindowList.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/Services/SystemMenu/PowerDialog.cpp b/Services/SystemMenu/PowerDialog.cpp
index f1416a73fc..0aa7f5a14b 100644
--- a/Services/SystemMenu/PowerDialog.cpp
+++ b/Services/SystemMenu/PowerDialog.cpp
@@ -102,13 +102,13 @@ PowerDialog::PowerDialog()
button_box.layout()->set_spacing(8);
auto& ok_button = button_box.add<GUI::Button>();
- ok_button.on_click = [this] {
+ ok_button.on_click = [this](auto) {
done(ExecResult::ExecOK);
};
ok_button.set_text("OK");
auto& cancel_button = button_box.add<GUI::Button>();
- cancel_button.on_click = [this] {
+ cancel_button.on_click = [this](auto) {
done(ExecResult::ExecCancel);
};
cancel_button.set_text("Cancel");
diff --git a/Services/Taskbar/TaskbarWindow.cpp b/Services/Taskbar/TaskbarWindow.cpp
index 92b49f7914..d287583cd7 100644
--- a/Services/Taskbar/TaskbarWindow.cpp
+++ b/Services/Taskbar/TaskbarWindow.cpp
@@ -116,7 +116,7 @@ void TaskbarWindow::create_quick_launch_bar()
button.set_icon(Gfx::Bitmap::load_from_file(app_icon_path));
button.set_tooltip(name);
- button.on_click = [app_executable] {
+ button.on_click = [app_executable](auto) {
pid_t pid = fork();
if (pid < 0) {
perror("fork");
diff --git a/Services/Taskbar/WindowList.cpp b/Services/Taskbar/WindowList.cpp
index 948dcb0452..1a60990286 100644
--- a/Services/Taskbar/WindowList.cpp
+++ b/Services/Taskbar/WindowList.cpp
@@ -50,7 +50,7 @@ Window& WindowList::ensure_window(const WindowIdentifier& identifier)
return *it->value;
auto window = make<Window>(identifier);
window->set_button(aid_create_button(identifier));
- window->button()->on_click = [window = window.ptr(), identifier] {
+ window->button()->on_click = [window = window.ptr(), identifier](auto) {
if (window->is_minimized() || !window->is_active()) {
GUI::WindowServerConnection::the().post_message(Messages::WindowServer::WM_SetActiveWindow(identifier.client_id(), identifier.window_id()));
} else {