Skip to content

Commit 1001242

Browse files
committed
cinnamon-gtk-embed: Clamp transparency of the tray icon's underlying
MetaWindowActor. Fixes #10830
1 parent e7d83d9 commit 1001242

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/cinnamon-gtk-embed.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,17 @@ cinnamon_gtk_embed_remove_window_actor (CinnamonGtkEmbed *embed)
5757
clutter_clone_set_source (CLUTTER_CLONE (embed), NULL);
5858
}
5959

60+
static void
61+
maintain_transparency (ClutterActor *actor,
62+
GParamSpec *pspec,
63+
gpointer user_data)
64+
{
65+
if (clutter_actor_get_opacity (actor) != 0) {
66+
g_signal_stop_emission_by_name (actor, "notify::opacity");
67+
g_object_set (actor, "opacity", 0, NULL);
68+
}
69+
}
70+
6071
static void
6172
cinnamon_gtk_embed_window_created_cb (MetaDisplay *display,
6273
MetaWindow *window,
@@ -93,6 +104,7 @@ cinnamon_gtk_embed_window_created_cb (MetaDisplay *display,
93104
/* Hide the original actor otherwise it will appear in the scene
94105
as a normal window */
95106
clutter_actor_set_opacity (window_actor, 0);
107+
g_signal_connect (window_actor, "notify::opacity", G_CALLBACK (maintain_transparency), NULL);
96108

97109
/* Also make sure it (or any of its children) doesn't block
98110
events on wayland */

0 commit comments

Comments
 (0)