Window focus events in Wayland

Michaël Meyer michaelnm.meyer at gmail.com
Sat Jan 13 18:18:11 GMT 2024


Hello,

I have a homemade program that rebinds keyboard shortcuts differently
depending on which application has the focus. To do that, it looks for
modifications to _NET_ACTIVE_WINDOW and then checks WM_CLASS to figure out
which application gained focus.

This stuff no longer works in Wayland, so I am wondering what is the way to
go moving forward. Is there a compatibility layer somewhere that would
implement these X11 interfaces and events? Looking at the KWin scripting
API, I see a signal "clientActivated" that seems relevant. Can this API be
used to implement the functionality I described above?

Thank you, and best wishes,
Michaël
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20240113/06d43575/attachment.htm>


More information about the kwin mailing list