[gnome-shell/wip/fmuellner/wayland-status-icons: 87/87] gtk-embed: Hide window actors from pick



commit ae07aa786458759bbf81e49bb88bd933e1a95ec4
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Feb 15 17:04:10 2019 +0100

    gtk-embed: Hide window actors from pick
    
    Since we started to support tray icons on wayland, the icon we show
    is not the actual XEmbed window. Instead, we let mutter create a
    MetaWindow for it, then use its window actor as source for a clone
    we (or nowadays: extensions) can add, remove and destroy freely.
    
    To not let the real icon get in the way, we set an empty input shape
    and make its window actor fully transparent. This works OK on X11,
    but on wayland all events still go through Clutter, so any reactive
    surface actor inside the window actor will block events for any actors
    underneath (and status icons go into the top-windows group, so almost
    all actors are affected).
    
    Luckily we can pile another hack onto the pile of status icon hacks ...
    
    https://gitlab.gnome.org/GNOME/gnome-shell/issues/191

 src/shell-gtk-embed.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/shell-gtk-embed.c b/src/shell-gtk-embed.c
index 54061046b..057f877cb 100644
--- a/src/shell-gtk-embed.c
+++ b/src/shell-gtk-embed.c
@@ -4,6 +4,7 @@
 
 #include "shell-embedded-window-private.h"
 #include "shell-global.h"
+#include "shell-util.h"
 
 #include <gdk/gdkx.h>
 #include <meta/display.h>
@@ -94,6 +95,10 @@ shell_gtk_embed_window_created_cb (MetaDisplay   *display,
          as a normal window */
       clutter_actor_set_opacity (window_actor, 0);
 
+      /* Also make sure it (or any of its children) doesn't block
+         events on wayland */
+      shell_util_set_hidden_from_pick (window_actor, TRUE);
+
       /* Set an empty input shape on the window so that it can't get
          any input. This probably isn't the ideal way to achieve this.
          It would probably be better to force the window to go behind


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]