If you have a panel/any UI elements, then you most probably have a protocol to communicate that the UI element surface is a special surface. You could then just extend this protocol so that you specify Z-ordering of these surfaces, and then the compositor should respect that.
If it might help here is the wlr-layer-shell protocol: https://github.com/swaywm/wlr-protocols/blob/master/unstable/wlr-layer-shell-unstable-v1.xml With it, you basically have several layers where you can put the UI elements that you have drawn outside of the compositor, and then you can use the `namespace` to adjust ordering within the specific layer. However, if you implement the window switcher in-compositor, I see no problem in just making the compositor dim the background (or the whole desktop) internally. On Wed, May 22, 2019 at 8:46 PM adlo <[email protected]> wrote: > > On 24 May 2017, at 19:41, Quentin Glidic < > [email protected]> wrote: > > > > On 5/24/17 8:37 PM, adlo wrote: > >> What I would like to do is get the desktop window so that I can display > a fake live image of the empty desktop as a background to my full-screen > window switcher, so that I can imply that the windows have flown up and > rearranged themselves on the window switcher, similar to GNOME Shell, but > without the 3D effects or GL stuff. > >> At the moment I have something like this: > >> WnckWindow * lightdash_compositor_get_root_window (LightdashCompositor > *compositor) > >> { > >> GList *li; > >> > >> for (li = wnck_screen_get_windows (compositor->screen); li != NULL; > li = li->next) > >> { > >> WnckWindow *win = WNCK_WINDOW (li->data); > >> if (wnck_window_get_window_type (win) == WNCK_WINDOW_DESKTOP) > >> { > >> return win; > >> } > >> } > >> return NULL; > >> } > >> How could I do this? > > > > You don’t, the compositor does. If you need that, you ask the compositor > to do it, because only the compositor knows the content of other clients’ > surfaces. > > That would require additions to the protocol. If you are interested, > please file an issue on GitHub so we can discuss the details. > > I would like my window switcher client to draw a semitransparent > background over my fake desktop image, so that it basically looks like > GNOME Shell's Activities Overview. It will then draw the UI elements on top > of the background. Basically like this: > > UI elements (top) > Semitransparent UI background > Fake full-screen live desktop image (bottom) > > If some elements are rendered by my client and some are rendered by the > compositor, how do I ensure they are always rendered in the right order, > i.e. that the fake desktop image does not obscure the UI chrome? > > Regards > > adlo > _______________________________________________ > wayland-devel mailing list > [email protected] > https://lists.freedesktop.org/mailman/listinfo/wayland-devel
_______________________________________________ wayland-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/wayland-devel
