1
Fork 0
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:
Andreas Kling 2019-02-12 10:45:09 +01:00
parent 4b8133e925
commit e03af1e8b9

View file

@ -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());
};
}