diff --git a/Applications/Launcher/main.cpp b/Applications/Launcher/main.cpp index f72fac8c32..464763a79b 100644 --- a/Applications/Launcher/main.cpp +++ b/Applications/Launcher/main.cpp @@ -72,6 +72,7 @@ GWindow* make_launcher_window() int launcher_size = (config->groups().size() - 1) * 50; window->set_rect(50, 50, vertical ? 50 : launcher_size, vertical ? launcher_size : 50); window->set_show_titlebar(false); + window->set_window_type(GWindowType::Launcher); auto* widget = new GWidget; widget->set_fill_with_background_color(true); diff --git a/Libraries/LibGUI/GWindowType.h b/Libraries/LibGUI/GWindowType.h index d620889249..04985b230d 100644 --- a/Libraries/LibGUI/GWindowType.h +++ b/Libraries/LibGUI/GWindowType.h @@ -1,5 +1,6 @@ #pragma once +// Keep this in sync with WSWindowType. enum class GWindowType { Invalid = 0, Normal, @@ -7,4 +8,6 @@ enum class GWindowType { WindowSwitcher, Taskbar, Tooltip, + Menubar, + Launcher, }; diff --git a/Servers/WindowServer/WSAPITypes.h b/Servers/WindowServer/WSAPITypes.h index 412c18c607..62c22a2b9e 100644 --- a/Servers/WindowServer/WSAPITypes.h +++ b/Servers/WindowServer/WSAPITypes.h @@ -28,6 +28,7 @@ enum WSAPI_WindowType { Taskbar, Tooltip, Menubar, + Launcher, }; struct WSAPI_WindowBackingStoreInfo { diff --git a/Servers/WindowServer/WSEventLoop.cpp b/Servers/WindowServer/WSEventLoop.cpp index 9c93e090c0..7e46c6f311 100644 --- a/Servers/WindowServer/WSEventLoop.cpp +++ b/Servers/WindowServer/WSEventLoop.cpp @@ -211,6 +211,9 @@ bool WSEventLoop::on_receive_from_client(int client_id, const WSAPI_ClientMessag case WSAPI_WindowType::Menubar: ws_window_type = WSWindowType::Menubar; break; + case WSAPI_WindowType::Launcher: + ws_window_type = WSWindowType::Launcher; + break; case WSAPI_WindowType::Invalid: default: dbgprintf("Unknown WSAPI_WindowType: %d\n", message.window.type); diff --git a/Servers/WindowServer/WSWindow.cpp b/Servers/WindowServer/WSWindow.cpp index 6b66e4262e..b06c70ff60 100644 --- a/Servers/WindowServer/WSWindow.cpp +++ b/Servers/WindowServer/WSWindow.cpp @@ -140,6 +140,8 @@ static WSAPI_WindowType to_api(WSWindowType ws_type) return WSAPI_WindowType::Tooltip; case WSWindowType::Menubar: return WSAPI_WindowType::Menubar; + case WSWindowType::Launcher: + return WSAPI_WindowType::Launcher; default: ASSERT_NOT_REACHED(); } diff --git a/Servers/WindowServer/WSWindowManager.h b/Servers/WindowServer/WSWindowManager.h index 43e30bba9f..ab41c318d5 100644 --- a/Servers/WindowServer/WSWindowManager.h +++ b/Servers/WindowServer/WSWindowManager.h @@ -277,6 +277,8 @@ IterationDecision WSWindowManager::for_each_visible_window_of_type_from_back_to_ template IterationDecision WSWindowManager::for_each_visible_window_from_back_to_front(Callback callback) { + if (for_each_visible_window_of_type_from_back_to_front(WSWindowType::Launcher, callback) == IterationDecision::Break) + return IterationDecision::Break; if (for_each_visible_window_of_type_from_back_to_front(WSWindowType::Normal, callback) == IterationDecision::Break) return IterationDecision::Break; if (for_each_visible_window_of_type_from_back_to_front(WSWindowType::Taskbar, callback) == IterationDecision::Break) @@ -326,7 +328,9 @@ IterationDecision WSWindowManager::for_each_visible_window_from_front_to_back(Ca return IterationDecision::Break; if (for_each_visible_window_of_type_from_front_to_back(WSWindowType::Tooltip, callback) == IterationDecision::Break) return IterationDecision::Break; - return for_each_visible_window_of_type_from_front_to_back(WSWindowType::Normal, callback); + if (for_each_visible_window_of_type_from_front_to_back(WSWindowType::Normal, callback) == IterationDecision::Break) + return IterationDecision::Break; + return for_each_visible_window_of_type_from_front_to_back(WSWindowType::Launcher, callback); } template diff --git a/Servers/WindowServer/WSWindowType.h b/Servers/WindowServer/WSWindowType.h index 9f1528ad84..8080d41774 100644 --- a/Servers/WindowServer/WSWindowType.h +++ b/Servers/WindowServer/WSWindowType.h @@ -1,5 +1,6 @@ #pragma once +// Keep this in sync with GWindowType. enum class WSWindowType { Invalid = 0, Normal, @@ -8,4 +9,5 @@ enum class WSWindowType { Taskbar, Tooltip, Menubar, + Launcher, };