224 lines
8.5 KiB
Diff
224 lines
8.5 KiB
Diff
From 7525f5b32799328ef2a2e8509b64dd6b7c264e15 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
|
Date: Fri, 7 Nov 2025 15:31:55 +0100
|
|
Subject: [PATCH] Revert "background: Plumb color state through backgrounds"
|
|
|
|
This reverts commit e1a1247fb5889181fc64367798b08b54260853cc.
|
|
---
|
|
src/compositor/meta-background-actor.c | 25 ------------------
|
|
.../meta-background-content-private.h | 2 --
|
|
src/compositor/meta-background-content.c | 12 +--------
|
|
.../meta-background-image-private.h | 26 -------------------
|
|
src/compositor/meta-background-image.c | 11 +-------
|
|
src/compositor/meta-background-private.h | 2 --
|
|
src/compositor/meta-background.c | 17 +-----------
|
|
7 files changed, 3 insertions(+), 92 deletions(-)
|
|
delete mode 100644 src/compositor/meta-background-image-private.h
|
|
|
|
diff --git a/src/compositor/meta-background-actor.c b/src/compositor/meta-background-actor.c
|
|
index cf3d6a037e..71591a7e0f 100644
|
|
--- a/src/compositor/meta-background-actor.c
|
|
+++ b/src/compositor/meta-background-actor.c
|
|
@@ -22,7 +22,6 @@
|
|
#include "config.h"
|
|
|
|
#include "compositor/meta-background-content-private.h"
|
|
-#include "compositor/meta-background-private.h"
|
|
#include "compositor/meta-cullable.h"
|
|
#include "meta/meta-background-actor.h"
|
|
|
|
@@ -47,26 +46,6 @@ static void cullable_iface_init (MetaCullableInterface *iface);
|
|
G_DEFINE_TYPE_WITH_CODE (MetaBackgroundActor, meta_background_actor, CLUTTER_TYPE_ACTOR,
|
|
G_IMPLEMENT_INTERFACE (META_TYPE_CULLABLE, cullable_iface_init));
|
|
|
|
-static void
|
|
-on_background_changed (MetaBackgroundContent *content,
|
|
- GParamSpec *pspec,
|
|
- gpointer data)
|
|
-{
|
|
- MetaBackgroundActor *self = META_BACKGROUND_ACTOR (data);
|
|
- MetaBackground *background;
|
|
- ClutterColorState *color_state;
|
|
-
|
|
- background = meta_background_content_get_background (content);
|
|
- if (!background)
|
|
- return;
|
|
-
|
|
- color_state = meta_background_get_color_state (background);
|
|
- if (!color_state)
|
|
- return;
|
|
-
|
|
- clutter_actor_set_color_state (CLUTTER_ACTOR (self), color_state);
|
|
-}
|
|
-
|
|
static void
|
|
maybe_create_content (MetaBackgroundActor *self)
|
|
{
|
|
@@ -78,10 +57,6 @@ maybe_create_content (MetaBackgroundActor *self)
|
|
content = meta_background_content_new (self->display, self->monitor);
|
|
self->content = META_BACKGROUND_CONTENT (content);
|
|
clutter_actor_set_content (CLUTTER_ACTOR (self), content);
|
|
- g_signal_connect_object (content, "notify::background",
|
|
- G_CALLBACK (on_background_changed), self,
|
|
- G_CONNECT_DEFAULT);
|
|
- on_background_changed (self->content, NULL, self);
|
|
}
|
|
|
|
static void
|
|
diff --git a/src/compositor/meta-background-content-private.h b/src/compositor/meta-background-content-private.h
|
|
index ac83784768..36031a43e1 100644
|
|
--- a/src/compositor/meta-background-content-private.h
|
|
+++ b/src/compositor/meta-background-content-private.h
|
|
@@ -11,5 +11,3 @@ void meta_background_content_cull_unobscured (MetaBackgroundContent *self,
|
|
|
|
void meta_background_content_cull_redraw_clip (MetaBackgroundContent *self,
|
|
MtkRegion *clip_region);
|
|
-
|
|
-MetaBackground * meta_background_content_get_background (MetaBackgroundContent *self);
|
|
diff --git a/src/compositor/meta-background-content.c b/src/compositor/meta-background-content.c
|
|
index 918d5f8112..481765c8e9 100644
|
|
--- a/src/compositor/meta-background-content.c
|
|
+++ b/src/compositor/meta-background-content.c
|
|
@@ -303,7 +303,6 @@ on_background_changed (MetaBackground *background,
|
|
{
|
|
invalidate_pipeline (self, CHANGED_BACKGROUND);
|
|
clutter_content_invalidate (CLUTTER_CONTENT (self));
|
|
- g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_BACKGROUND]);
|
|
}
|
|
|
|
static CoglPipeline *
|
|
@@ -970,9 +969,7 @@ meta_background_content_class_init (MetaBackgroundContentClass *klass)
|
|
properties[PROP_BACKGROUND] =
|
|
g_param_spec_object ("background", NULL, NULL,
|
|
META_TYPE_BACKGROUND,
|
|
- G_PARAM_READWRITE |
|
|
- G_PARAM_STATIC_STRINGS |
|
|
- G_PARAM_EXPLICIT_NOTIFY);
|
|
+ G_PARAM_READWRITE);
|
|
|
|
properties[PROP_GRADIENT] =
|
|
g_param_spec_boolean ("gradient", NULL, NULL,
|
|
@@ -1075,7 +1072,6 @@ meta_background_content_set_background (MetaBackgroundContent *self,
|
|
|
|
invalidate_pipeline (self, CHANGED_BACKGROUND);
|
|
clutter_content_invalidate (CLUTTER_CONTENT (self));
|
|
- g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_BACKGROUND]);
|
|
}
|
|
|
|
void
|
|
@@ -1233,9 +1229,3 @@ meta_background_content_cull_redraw_clip (MetaBackgroundContent *self,
|
|
{
|
|
set_clip_region (self, clip_region);
|
|
}
|
|
-
|
|
-MetaBackground *
|
|
-meta_background_content_get_background (MetaBackgroundContent *self)
|
|
-{
|
|
- return self->background;
|
|
-}
|
|
diff --git a/src/compositor/meta-background-image-private.h b/src/compositor/meta-background-image-private.h
|
|
deleted file mode 100644
|
|
index d29260d389..0000000000
|
|
--- a/src/compositor/meta-background-image-private.h
|
|
+++ /dev/null
|
|
@@ -1,26 +0,0 @@
|
|
-/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
-/*
|
|
- * Copyright 2025 Red Hat, Inc.
|
|
- *
|
|
- * This program is free software; you can redistribute it and/or
|
|
- * modify it under the terms of the GNU General Public License as
|
|
- * published by the Free Software Foundation; either version 2 of the
|
|
- * License, or (at your option) any later version.
|
|
- *
|
|
- * This program is distributed in the hope that it will be useful, but
|
|
- * WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
- * General Public License for more details.
|
|
- *
|
|
- * You should have received a copy of the GNU General Public License
|
|
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
- *
|
|
- * Author: Matthias Clasen <mclasen@redhat.com>
|
|
- */
|
|
-
|
|
-#pragma once
|
|
-
|
|
-#include "clutter/clutter.h"
|
|
-#include "meta/meta-background-image.h"
|
|
-
|
|
-ClutterColorState * meta_background_image_get_color_state (MetaBackgroundImage *self);
|
|
diff --git a/src/compositor/meta-background-image.c b/src/compositor/meta-background-image.c
|
|
index e5c879c892..9ac93fd636 100644
|
|
--- a/src/compositor/meta-background-image.c
|
|
+++ b/src/compositor/meta-background-image.c
|
|
@@ -18,7 +18,7 @@
|
|
|
|
#include "config.h"
|
|
|
|
-#include "compositor/meta-background-image-private.h"
|
|
+#include "meta/meta-background-image.h"
|
|
|
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
|
#include <gio/gio.h>
|
|
@@ -365,12 +365,3 @@ meta_background_image_get_texture (MetaBackgroundImage *image)
|
|
|
|
return image->texture;
|
|
}
|
|
-
|
|
-ClutterColorState *
|
|
-meta_background_image_get_color_state (MetaBackgroundImage *image,
|
|
- ClutterContext *ctx)
|
|
-{
|
|
- g_return_val_if_fail (META_IS_BACKGROUND_IMAGE (image), NULL);
|
|
-
|
|
- return NULL;
|
|
-}
|
|
diff --git a/src/compositor/meta-background-private.h b/src/compositor/meta-background-private.h
|
|
index 056e274dba..dca3a5d94b 100644
|
|
--- a/src/compositor/meta-background-private.h
|
|
+++ b/src/compositor/meta-background-private.h
|
|
@@ -9,5 +9,3 @@ CoglTexture * meta_background_get_texture (MetaBackground *self,
|
|
int monitor_index,
|
|
MtkRectangle *texture_area,
|
|
CoglPipelineWrapMode *wrap_mode);
|
|
-
|
|
-ClutterColorState * meta_background_get_color_state (MetaBackground *self);
|
|
diff --git a/src/compositor/meta-background.c b/src/compositor/meta-background.c
|
|
index 18833ff2e8..7e33bc1a9a 100644
|
|
--- a/src/compositor/meta-background.c
|
|
+++ b/src/compositor/meta-background.c
|
|
@@ -24,11 +24,9 @@
|
|
#include <string.h>
|
|
|
|
#include "backends/meta-backend-private.h"
|
|
-#include "clutter/clutter-color-state.h"
|
|
#include "compositor/cogl-utils.h"
|
|
-#include "compositor/meta-background-image-private.h"
|
|
-#include "meta/compositor.h"
|
|
#include "meta/display.h"
|
|
+#include "meta/meta-background-image.h"
|
|
#include "meta/meta-background.h"
|
|
#include "meta/meta-monitor-manager.h"
|
|
#include "meta/util.h"
|
|
@@ -1034,16 +1032,3 @@ meta_background_refresh_all (void)
|
|
for (l = all_backgrounds; l; l = l->next)
|
|
mark_changed (l->data);
|
|
}
|
|
-
|
|
-ClutterColorState *
|
|
-meta_background_get_color_state (MetaBackground *self)
|
|
-{
|
|
- g_return_val_if_fail (META_IS_BACKGROUND (self), NULL);
|
|
-
|
|
- if (self->background_image1)
|
|
- return meta_background_image_get_color_state (self->background_image1);
|
|
- else if (self->background_image2)
|
|
- return meta_background_image_get_color_state (self->background_image2);
|
|
- else
|
|
- return NULL;
|
|
-}
|
|
--
|
|
2.51.1
|
|
|