From e03af1e8b9fc6759e6b78effda8511413e84087e Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 12 Feb 2019 10:45:09 +0100 Subject: [PATCH] WindowServer: Make it possible to launch a terminal from the system menu. --- WindowServer/WSWindowManager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/WindowServer/WSWindowManager.cpp b/WindowServer/WSWindowManager.cpp index 5931a1899f..3ae90b58d5 100644 --- a/WindowServer/WSWindowManager.cpp +++ b/WindowServer/WSWindowManager.cpp @@ -193,6 +193,11 @@ WSWindowManager::WSWindowManager() m_system_menu->add_item(make(WSMenuItem::Separator)); m_system_menu->add_item(make(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()); }; }