mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:17:44 +00:00
WindowServer: Add an Overlay class for flicker-free overlay rendering
An Overlay is similar to a transparent window, but has less overhead and does not get rendered within the window stack. Basically, the area that an Overlay occupies forces transparency rendering for any window underneath, which allows us to render them flicker-free. This also adds a new API that allows displaying the screen numbers, e.g. while the user configures the screen layout in DisplaySettings Because other things like drag&drop or the window-size label are not yet converted to use this new mechanism, they will be drawn over the screen-number currently.
This commit is contained in:
parent
42cb38b71a
commit
41859ad3fe
14 changed files with 638 additions and 7 deletions
|
@ -85,6 +85,18 @@ void WindowManager::reload_config()
|
|||
reload_cursor(m_wait_cursor, "Wait");
|
||||
reload_cursor(m_crosshair_cursor, "Crosshair");
|
||||
|
||||
auto reload_graphic = [&](RefPtr<MultiScaleBitmaps>& bitmap, String const& name) {
|
||||
if (bitmap) {
|
||||
if (!bitmap->load(name))
|
||||
bitmap = nullptr;
|
||||
} else {
|
||||
bitmap = MultiScaleBitmaps::create(name);
|
||||
}
|
||||
};
|
||||
|
||||
reload_graphic(m_overlay_rect_shadow, m_config->read_entry("Graphics", "OverlayRectShadow"));
|
||||
Compositor::the().invalidate_after_theme_or_font_change();
|
||||
|
||||
WindowFrame::reload_config();
|
||||
}
|
||||
|
||||
|
@ -1531,8 +1543,7 @@ void WindowManager::invalidate_after_theme_or_font_change()
|
|||
});
|
||||
MenuManager::the().did_change_theme();
|
||||
AppletManager::the().did_change_theme();
|
||||
Compositor::the().invalidate_occlusions();
|
||||
Compositor::the().invalidate_screen();
|
||||
Compositor::the().invalidate_after_theme_or_font_change();
|
||||
}
|
||||
|
||||
bool WindowManager::update_theme(String theme_path, String theme_name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue