mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:38:12 +00:00
WindowServer: Make it possible to launch a terminal from the system menu.
This commit is contained in:
parent
4b8133e925
commit
e03af1e8b9
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
Add a link
Reference in a new issue