Open dandenkijin opened 14 hours ago
I honestly had no experience using Wayland until some days ago, and I've come to the realization that porting this will be much harder to do than I thought for one sole reason: the lack of standardization.
There are two parts to Yawns that are X11 dependent:
_NET_WM_WINDOW_TYPE_NOTIFICATION
In Wayland, managing things such as surfaces (Wayland windows) fullscreen events or surface "types" (if that's even a thing) is completely dependent on the compositor being used (for example, mako
is specifically developed for sway
)
So there are two possibilities for porting yawns:
sway
and hyprland
)I'm guessing the later is far more likely.
I'll check how I could make a sway
build of yawns in the following days.
For now, I'll add some simple code to detect the session (either Wayland or X11) and the compositor being used (if any).
Kinda done, I still need to figure out a good way to detect the compositor that's being run. I commited it in the main repo because adding a nice message explaining that Wayland isn't supported yet seems like the right thing to do here for now. See 02dd27b
as a suggestion, implement the per compositor specific parts as "backends", say have shim functions to handle the full screen, window typing and whatever else compositor specific that just calls the actual function from the backend.
for handling that during the wayland server checks and once the compositor is detected determine if it is a supported compositor, else just exit and show a message like "the compositor {comp} is not supported yet, exiting"
as for getting the name of the current compositor, there is no "official" "standar" way to get that on the spec that will work for all compositors, however as always in a very unix manner there IS some using and abusing of the display file descriptor to yank the PID of the compositor, from then a simple read of /proc/PID/comm
will reveal the compositor name. source
I thought to look to mako for inspiration?