Window focus events in Wayland

MichaĆ«l Meyer <[email protected]> Sat, 13 Jan 2024 19:18:11 +0100
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <CANYWBZepoyOAAdiv39t0WZ4=rs7yH513h9jHFTTy=3ZgaSUZ9Q@mail.gmail.com>
--0000000000005f9dac060ed7ce53
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

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=C3=ABl

--0000000000005f9dac060ed7ce53
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hello,<div><br></div><div>I have a homemade program that r=
ebinds keyboard shortcuts differently depending on which application has th=
e focus. To do that, it looks for modifications to _NET_ACTIVE_WINDOW and t=
hen checks=C2=A0WM_CLASS to figure out which application gained focus.</div=
><div><br></div><div>This stuff no longer works in Wayland, so I am wonderi=
ng what is the way to go moving forward. Is there a compatibility layer som=
ewhere that would implement these X11 interfaces and events? Looking at the=
 KWin scripting API, I see a signal &quot;clientActivated&quot; that seems =
relevant. Can this API be used to implement the functionality I described a=
bove?</div><div><br></div><div>Thank you, and best wishes,</div><div>Micha=
=C3=ABl</div></div>

--0000000000005f9dac060ed7ce53--