mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-23 04:55:15 +00:00
WindowServer: Make it possible to launch a terminal from the system menu.
This commit is contained in:
parent
4b8133e925
commit
e03af1e8b9
Notes:
sideshowbarker
2024-07-19 15:46:38 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/e03af1e8b9f
1 changed files with 5 additions and 0 deletions
|
@ -193,6 +193,11 @@ WSWindowManager::WSWindowManager()
|
|||
m_system_menu->add_item(make<WSMenuItem>(WSMenuItem::Separator));
|
||||
m_system_menu->add_item(make<WSMenuItem>(4, "About..."));
|
||||
m_system_menu->on_item_activation = [] (WSMenuItem& item) {
|
||||
if (item.identifier() == 0) {
|
||||
int error;
|
||||
Process::create_user_process("/bin/Terminal", 100, 100, current->pid(), error);
|
||||
return;
|
||||
}
|
||||
kprintf("WSMenu 1 item activated: '%s'\n", item.text().characters());
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue