xfway: added support for alt-tab switcher
adloconwy at gmail.com
Thu Jul 21 10:41:16 CEST 2022
> On 21 Jul 2022, at 08:41, Olivier Fourdan <fourdan at gmail.com> wrote:
> I think you're confusing client side decorations and server side decorations.
> Client side decorations are handled by the clients, so that's the easy part. As for server side decorations, Wayland doesn't require it, even though KDE folks insisted on adding xdg-decoration, this is an optional protocol and Wayland clients must be able to draw their decorations themselves - And for those clients who cannot, there's libdecor.
I’m talking about two different types of client here. There’s actual clients, i.e. application windows, and then there’s the singular special helper client that’s functionally part of the server.
The helper client and the compositor talk to each other using a private protocol. The Wayland compositor fulfils the role of the X server, and the helper client fulfils the role of an X11 window manager.
The tabwin is drawn using GTK, which means that the code for it has to go in a special helper client, because it’s impossible to run a GTK mainloop inside the compositor. The other option could be drawing the tabwin server-side using Cairo or something, but that might possibly mean throwing away most of the original xfwm4 code to the point where it wouldn’t really have anything in common with the X11 version?
I’m trying to write the code in a way that avoids changing things too much.
What I’m asking is, should I draw server-side decorations client-side or server-side?
xfwm4 on X11 draws server-side decorations client-side, because xfwm4 is a client of the X server. They’re called server-side decorations, but in this case the program drawing them is a client. One client of the X server is having its decorations drawn by another client of the X server.
More information about the Xfce4-dev