1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:07:34 +00:00

WindowServer: Add WindowStack concept

This patch moves the window stack out of WindowManager and into its own
WindowStack class.

A WindowStack is an ordered list of windows with an optional highlight
window. The highlight window mechanism is used during Super+Tab window
switching to temporarily bring a window to the front.

This is mostly mechanical, just moving the code to its own class.
This commit is contained in:
Andreas Kling 2021-06-17 17:28:14 +02:00
parent 906d3e9f44
commit d257f58306
8 changed files with 267 additions and 197 deletions

View file

@ -202,7 +202,7 @@ void WindowSwitcher::refresh()
m_selected_index = 0;
int window_count = 0;
int longest_title_width = 0;
wm.for_each_window_of_type_from_front_to_back(
wm.window_stack().for_each_window_of_type_from_front_to_back(
WindowType::Normal, [&](Window& window) {
if (window.is_frameless())
return IterationDecision::Continue;