ikz87 / yawns

Your Adaptable Widget Notification System
GNU General Public License v3.0
36 stars 1 forks source link

Wayland Port Thread #1

Open dandenkijin opened 14 hours ago

dandenkijin commented 14 hours ago

I thought to look to mako for inspiration?

ikz87 commented 13 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:

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:

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).

ikz87 commented 13 hours ago

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

eylles commented 11 hours ago

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