Add support for client-side-decoration in XFCE 4.18
Closed this issue · 10 comments
I must admit, currently I don't have a clue.
Let me try to figure this out.
As a work around you could turn off CSD for Firefox.
I think this happens because of two things:
- You force the server-side decoration with
window.change_property(MOTIF_WM_HINTS, MOTIF_WM_HINTS, 32, hints)
in the set_decoration method, even if the window originally didn't have server-side decoration. - The window has an invisible border (gtk3/4?) which causes the "inner" window not to fit in the tile.
I'm completely new to Python, GTK3, xlib and stuff. So that are wild guesses 🤷
I would say you are absolutely right!
To check this out, you can modify xpytile.py and add a return statement in set_window_decoration() as the first statement to let the function return immediately without doing anything. The extra border wont appear, but of course you can't toggle border on/off any more.
Unfortunately this is only one part of the problem. As you can see, the size of the CSD-window is not set correctly because of that 'invisible border'.
So there are two things to be figured out:
- how to find out whether a window has CSD or SSD
- how to cope with the invisible border of CSD windows in order to set their position and size correctly
I think the first part would be "easy" to fix. My suggestion would be: Don't force the window decoration.
On toggling the borders, just look, if the windows has the MOTIF_WM_HINTS for decoration, if not, don't touch it. If it has: save the window id in an array. If the user toggles back, just reset the hints to the original state.
Same on window creation. Just make a backup and put it back on toggle.
The second part could be a GTK problem, not xlib.
The script now checks whether a windows uses client-side-decoration and if so doesn't toggle the borders.
Damn, it works like charm. Thank you!
Oh, next problem. What about Qt applications with CSD? They have the same problem.
Hi j-zero,
can you tell me which (preferably) small Qt application with CSD causes the same problem?
For me it's the original Telegram client.
In the config-file you can now define which (Qt-)applications have client-side decoration and should not be (un)decorated by xpytile.