Add support for splash screen image transparency

This commit is contained in:
Robin Gareus 2024-04-11 19:42:14 +02:00
parent a69ca86944
commit b8c474ff32
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
1 changed files with 4 additions and 0 deletions

View File

@ -238,6 +238,10 @@ Splash::expose (GdkEventExpose* ev)
{
RefPtr<Gdk::Window> window = darea.get_window();
/* clear background (for transparent splash images */
Glib::RefPtr<Gdk::GC> bg = get_style()->get_bg_gc (STATE_NORMAL);
window->draw_rectangle(bg, true, ev->area.x, ev->area.y, ev->area.width, ev->area.height)
/* note: height & width need to be constrained to the pixbuf size
in case a WM provides us with a screwy allocation
*/