Hi! I am currently working on resolving "per screen virtual desktops"
bug¹. It's a very popular bug and is one of the blockers for me to
migrate to Wayland (this has always worked on X11 KDE by using i3wm),
and I figured it could be achievable via API.

Now, long story short, I went through multiple ideas and
implementations and research, and I found that the easiest way to
achieve this is as implemented by i3²: set "normal" WM_STATE if a
window supposed to be visible, and "withdrawn" state if it should be
hidden.

It indeed seems to be the easiest way to implement this feature. Some
other ideas I've considered:

1. Physically moving windows — complicated and also seems to have
issues with "inactive windows" highlight getting lost
2. Showing a window on multiple desktops simultaneously: still requires
manual windows tracking, and have issues with rendering window
rectangle on the panel, which would show it in multiple places.

Setting "withdrawn" vs "normal" (offhand at least) allows to do as
little tracking as possible: we just check what screen we're on and
hide older desktop windows with "withdrawn" and newer desktop windows
with "normal".

Now, the question is: how do I set these states on Wayland? I looked
through KWin API, but haven't found any of these mentioned.

1: https://bugs.kde.org/show_bug.cgi?id=107302
2: https://github.com/i3/i3/discussions/6589#discussioncomment-15493207

Reply via email to