Apparently the windows in that bug are DnD detection windows created by vmware-tools. On Wayland these windows are created as regular windows and would have a background color depending on the theme. Then this code tries to make them invisible using set_opacity() which does nothing on Wayland.
An alternative that should work on Wayland is to use CSS to make the background transparent:
during the DnD plugin initialization (or somewhere that only gets run once) create and add a global CSS provider:
gtk_css_provider_new()
gtk_css_provider_load_from_*() with the following content: .dnd-detection-window { background: transparent; }
@sbstnk Thank you for reporting this issue and for identifying the problem! An internal bug has been filed with our graphics team to address the problem.
We got this bug reported against gnome-shell when running on Wayland under VMware about small empty square windows popping up in some situations: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4601
Apparently the windows in that bug are DnD detection windows created by vmware-tools. On Wayland these windows are created as regular windows and would have a background color depending on the theme. Then this code tries to make them invisible using
set_opacity()
which does nothing on Wayland.An alternative that should work on Wayland is to use CSS to make the background transparent:
gtk_css_provider_new()
gtk_css_provider_load_from_*()
with the following content:.dnd-detection-window { background: transparent; }
gtk_style_context_add_provider_for_screen(gdk_screen_get_default(), ..., GTK_STYLE_PROVIDER_PRIORITY_APPLICATION)
gtk_widget_get_style_context(...)
gtk_style_context_add_class(..., "dnd-detection-window")
This is untested and I'm not a gtk expert, so maybe there are better ways to do this, but it should at least point you in the right direction.