diff --git a/src/Background/SystemBackground.vala b/src/Background/SystemBackground.vala index 85c0fdd8..34b0f00e 100644 --- a/src/Background/SystemBackground.vala +++ b/src/Background/SystemBackground.vala @@ -1,36 +1,20 @@ /* * Copyright 2014 Tom Beckmann - * Copyright 2023 elementary, Inc. + * Copyright 2023-2024 elementary, Inc. * SPDX-License-Identifier: GPL-3.0-or-later */ public class Gala.SystemBackground : GLib.Object { - private const Clutter.Color DEFAULT_BACKGROUND_COLOR = { 0x2e, 0x34, 0x36, 0xff }; - public Meta.BackgroundActor background_actor { get; construct; } - private static Meta.Background? system_background = null; - public SystemBackground (Meta.Display display) { Object (background_actor: new Meta.BackgroundActor (display, 0)); } construct { - if (system_background == null) { - system_background = new Meta.Background (background_actor.meta_display); - system_background.set_color (DEFAULT_BACKGROUND_COLOR); - } + var system_background = new Meta.Background (background_actor.meta_display); + system_background.set_color ({ 0x2e, 0x34, 0x36, 0xff }); ((Meta.BackgroundContent) background_actor.content).background = system_background; } - - public static void refresh () { - // Meta.Background.refresh_all does not refresh backgrounds with the WALLPAPER style. - // (Last tested with mutter 3.28) - // As a workaround, re-apply the current color again to force the wallpaper texture - // to be rendered from scratch. - if (system_background != null) { - system_background.set_color (DEFAULT_BACKGROUND_COLOR); - } - } } diff --git a/src/WindowManager.vala b/src/WindowManager.vala index ed28642f..a5683efe 100644 --- a/src/WindowManager.vala +++ b/src/WindowManager.vala @@ -155,7 +155,6 @@ namespace Gala { unowned Meta.Display display = get_display (); display.gl_video_memory_purged.connect (() => { Meta.Background.refresh_all (); - SystemBackground.refresh (); }); }