WindowServer: Show window switcher even if fullscreen window is active

This commit is contained in:
John Bundgaard 2023-01-05 05:42:36 +01:00 committed by Sam Atkins
parent 89a8a198b2
commit 091dbec295
Notes: sideshowbarker 2024-07-17 00:17:48 +09:00

View file

@ -13,6 +13,7 @@
#include "Screen.h"
#include "Window.h"
#include "WindowManager.h"
#include "WindowSwitcher.h"
#include <AK/Debug.h>
#include <AK/Memory.h>
#include <AK/ScopeGuard.h>
@ -541,7 +542,8 @@ void Compositor::compose()
// Paint the window stack.
if (m_invalidated_window) {
auto* fullscreen_window = wm.active_fullscreen_window();
if (fullscreen_window && fullscreen_window->is_opaque()) {
// FIXME: Remove the !WindowSwitcher::the().is_visible() check when WindowSwitcher is an overlay
if (fullscreen_window && fullscreen_window->is_opaque() && !WindowSwitcher::the().is_visible()) {
compose_window(*fullscreen_window);
fullscreen_window->clear_dirty_rects();
} else {
@ -1184,7 +1186,8 @@ void Compositor::recompute_occlusions()
bool window_stack_transition_in_progress = m_transitioning_to_window_stack != nullptr;
auto& main_screen = Screen::main();
auto* fullscreen_window = wm.active_fullscreen_window();
if (fullscreen_window) {
// FIXME: Remove the !WindowSwitcher::the().is_visible() check when WindowSwitcher is an overlay
if (fullscreen_window && !WindowSwitcher::the().is_visible()) {
// TODO: support fullscreen windows on all screens
auto screen_rect = main_screen.rect();
wm.for_each_visible_window_from_front_to_back([&](Window& w) {
@ -1214,7 +1217,8 @@ void Compositor::recompute_occlusions()
m_opaque_wallpaper_rects.clear();
}
if (!fullscreen_window || (fullscreen_window && !fullscreen_window->is_opaque())) {
// FIXME: Remove the WindowSwitcher::the().is_visible() check when WindowSwitcher is an overlay
if (!fullscreen_window || WindowSwitcher::the().is_visible() || (fullscreen_window && !fullscreen_window->is_opaque())) {
Gfx::DisjointIntRectSet remaining_visible_screen_rects;
remaining_visible_screen_rects.add_many(Screen::rects());
bool have_transparent = false;