mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-25 09:04:53 +00:00
Taskbar+WindowServer: Adding to Quick Launch via windows :^)
You can now add applications to Quick Launch via the context menu option of their windows. Clicking it creates an event with the stored PID of the process that created the window. The Taskbar receives the event and tells the QuickLaunchWidget to add the PID, which then gets the executable using /sys/kernel/processes. It also looks for an AppFile using the name from the process object and if there is one, it uses that, since it should contain a better formatted name.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2021, the SerenityOS developers.
|
||||
* Copyright (c) 2023, David Ganz <david.g.ganz@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
@@ -87,4 +88,10 @@ void ConnectionToWindowManagerServer::keymap_changed(i32 wm_id, DeprecatedString
|
||||
Core::EventLoop::current().post_event(*window, make<WMKeymapChangedEvent>(wm_id, keymap));
|
||||
}
|
||||
|
||||
void ConnectionToWindowManagerServer::add_to_quick_launch(i32 wm_id, pid_t pid)
|
||||
{
|
||||
if (auto* window = Window::from_window_id(wm_id))
|
||||
Core::EventLoop::current().post_event(*window, make<WMAddToQuickLaunchEvent>(wm_id, pid));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user