emvaized / kde-snap-assist

KWin script for KDE Plasma which suggests other window thumbnails on snap
https://store.kde.org/p/1875687
GNU General Public License v3.0
97 stars 6 forks source link

Is It Possbile To Implement Snap Groups On Wayland? #29

Closed semarainc closed 1 year ago

semarainc commented 1 year ago

About the experimental feature snap groups, currently works for X11 only Is it possible to make it work on Wayland?

Thanks

emvaized commented 1 year ago

Well, if it was that easy, I wouldn't have placed the "X11" label in the first place :) I already gave it a try to rework the feature so that it could function on Wayland, but had no luck yet.

semarainc commented 1 year ago

Ok, thank you for the explanation :D i'm sorry if my question offended you

semarainc commented 1 year ago

Just curious, what makes this feature not yet applicable in wayland? Thanks

emvaized commented 1 year ago

At first I thought that it's because of absence of workspace.getClient() method on Wayland, but replacing it with this logically identical line does not help.

Then I suggested that the reason could be that windowId property itself is not reliable on Wayland to identify the windows, so I tried to rewrite the snappedWindowGroups variable and all the related methods to store the client objects itself instead of only their windowIds, but it didn't help either.

semarainc commented 1 year ago

I guess kwin wayland currently is not capable of doing that :( i think this also explained why exquisite cannot snap window when minimized?

Thank you for your detailed and helpful information :D

emvaized commented 1 year ago

I'm not sure. Maybe this issue will attract attention of someone more experienced with KWin Scripting and Wayland in particular, but for now I'm out of ideas of what else to try.

emvaized commented 1 year ago

Well, it turns out you can replace windowId everywhere with internalId, and after a few more changes here and there snap group features seems to be working on Wayland! As well as sorting by latest active window.

Would be glad if you could test the latest code from the dev branch.

emvaized commented 1 year ago

New patches are now merged to the main branch and included in 1.6 release. If you face some snap groups features not working under Wayland, please feel free to open a new issue.