diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-05-07 17:10:46 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-05-07 17:11:28 +0200 |
commit | 5b2e1226247a50cc23bd281de3d9d2038f8fa17b (patch) | |
tree | d4e534d37fa62251ab6c3a571148cc9705266ef3 /Servers | |
parent | e8d395b14dff73e0e0c271e7d412e05ae50c5539 (diff) | |
download | serenity-5b2e1226247a50cc23bd281de3d9d2038f8fa17b.zip |
WindowServer: Don't launch a terminal when clicking system menu separators.
The menu item for launching a terminal was sharing ID's with the separators.
Diffstat (limited to 'Servers')
-rw-r--r-- | Servers/WindowServer/WSWindowManager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Servers/WindowServer/WSWindowManager.cpp b/Servers/WindowServer/WSWindowManager.cpp index e3728c29cf..957015f359 100644 --- a/Servers/WindowServer/WSWindowManager.cpp +++ b/Servers/WindowServer/WSWindowManager.cpp @@ -95,8 +95,8 @@ WSWindowManager::WSWindowManager() { byte system_menu_name[] = { 0xf8, 0 }; m_system_menu = make<WSMenu>(nullptr, -1, String((const char*)system_menu_name)); - m_system_menu->add_item(make<WSMenuItem>(*m_system_menu, 0, "Open Terminal...")); - m_system_menu->add_item(make<WSMenuItem>(*m_system_menu, 1, "Open ProcessManager...")); + m_system_menu->add_item(make<WSMenuItem>(*m_system_menu, 1, "Open Terminal...")); + m_system_menu->add_item(make<WSMenuItem>(*m_system_menu, 2, "Open ProcessManager...")); m_system_menu->add_item(make<WSMenuItem>(*m_system_menu, WSMenuItem::Separator)); m_system_menu->add_item(make<WSMenuItem>(*m_system_menu, 100, "640x480")); m_system_menu->add_item(make<WSMenuItem>(*m_system_menu, 101, "800x600")); @@ -107,14 +107,14 @@ WSWindowManager::WSWindowManager() m_system_menu->add_item(make<WSMenuItem>(*m_system_menu, WSMenuItem::Separator)); m_system_menu->add_item(make<WSMenuItem>(*m_system_menu, 200, "About...")); m_system_menu->on_item_activation = [this] (WSMenuItem& item) { - if (item.identifier() == 0) { + if (item.identifier() == 1) { if (fork() == 0) { execl("/bin/Terminal", "/bin/Terminal", nullptr); ASSERT_NOT_REACHED(); } return; } - if (item.identifier() == 1) { + if (item.identifier() == 2) { if (fork() == 0) { execl("/bin/ProcessManager", "/bin/ProcessManager", nullptr); ASSERT_NOT_REACHED(); |