mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:47:44 +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:
parent
4386182be1
commit
70f7c10ab9
11 changed files with 105 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2023, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
* Copyright (c) 2023, David Ganz <david.g.ganz@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -73,6 +74,7 @@ public:
|
|||
WM_SuperDigitKeyPressed,
|
||||
WM_WorkspaceChanged,
|
||||
WM_KeymapChanged,
|
||||
WM_AddToQuickLaunch,
|
||||
__End_WM_Events,
|
||||
};
|
||||
|
||||
|
@ -264,6 +266,20 @@ private:
|
|||
const DeprecatedString m_keymap;
|
||||
};
|
||||
|
||||
class WMAddToQuickLaunchEvent : public WMEvent {
|
||||
public:
|
||||
explicit WMAddToQuickLaunchEvent(int client_id, pid_t pid)
|
||||
: WMEvent(Event::Type::WM_AddToQuickLaunch, client_id, 0)
|
||||
, m_pid(pid)
|
||||
{
|
||||
}
|
||||
|
||||
pid_t pid() const { return m_pid; }
|
||||
|
||||
private:
|
||||
pid_t m_pid;
|
||||
};
|
||||
|
||||
class MultiPaintEvent final : public Event {
|
||||
public:
|
||||
explicit MultiPaintEvent(Vector<Gfx::IntRect, 32> rects, Gfx::IntSize window_size)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue