WindowServer: Paint background when a fullscreen window is transparent

The windows in the background are ignored when the window is fullscreen.
However, we still would like to see the background if that window is
transparent.
This commit is contained in:
Aziz Berkay Yesilyurt 2021-07-06 21:59:58 +02:00 committed by Ali Mohammad Pur
parent 6f594b36f5
commit dc833e49b0
Notes: sideshowbarker 2024-07-18 10:01:19 +09:00

View file

@ -504,7 +504,8 @@ void Compositor::compose()
// Paint the window stack.
if (m_invalidated_window) {
if (auto* fullscreen_window = wm.active_fullscreen_window()) {
auto* fullscreen_window = wm.active_fullscreen_window();
if (fullscreen_window && fullscreen_window->is_opaque()) {
compose_window(*fullscreen_window);
fullscreen_window->clear_dirty_rects();
} else {
@ -1071,7 +1072,8 @@ void Compositor::recompute_occlusions()
bool window_stack_transition_in_progress = m_transitioning_to_window_stack != nullptr;
auto& main_screen = Screen::main();
if (auto* fullscreen_window = wm.active_fullscreen_window()) {
auto* fullscreen_window = wm.active_fullscreen_window();
if (fullscreen_window) {
// TODO: support fullscreen windows on all screens
auto screen_rect = main_screen.rect();
wm.for_each_visible_window_from_front_to_back([&](Window& w) {
@ -1099,7 +1101,8 @@ void Compositor::recompute_occlusions()
});
m_opaque_wallpaper_rects.clear();
} else {
}
if (!fullscreen_window || (fullscreen_window && !fullscreen_window->is_opaque())) {
Gfx::DisjointRectSet visible_rects;
visible_rects.add_many(Screen::rects());
bool have_transparent = false;