<div dir="ltr"><div>Thanks, Niels! <br></div><div>> you'll get a leave for the first window and an enter for<br>> the second, and from there you can connect the dots</div><div>Right, but it's the connecting the dots part that gives me the trouble. These events aren't connected in any way that I can imagine. The second one may not actually come at all if the user has switched to another app and then never returned to this one.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 22, 2023 at 10:06 PM Niels De Graef <<a href="mailto:ndegraef@redhat.com">ndegraef@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Maxim,<br>
<br>
I asked around a bit, and one of the GTK developers replied that you<br>
might be interested in wl_keyboard's enter [1] and leave [2] events<br>
(note that several other related objects have similar events).<br>
<br>
Basically, you'll get a leave for the first window and an enter for<br>
the second, and from there you can connect the dots<br>
<br>
-- Niels<br>
<br>
[1]: <a href="https://wayland.app/protocols/wayland#wl_keyboard:event:enter" rel="noreferrer" target="_blank">https://wayland.app/protocols/wayland#wl_keyboard:event:enter</a><br>
[2]: <a href="https://wayland.app/protocols/wayland#wl_keyboard:event:leave" rel="noreferrer" target="_blank">https://wayland.app/protocols/wayland#wl_keyboard:event:leave</a><br>
<br>
On Wed, Nov 22, 2023 at 5:22 PM Maxim Kartashev<br>
<<a href="mailto:maxim.kartashev@jetbrains.com" target="_blank">maxim.kartashev@jetbrains.com</a>> wrote:<br>
><br>
> Hi, All!<br>
><br>
> I've got another Wayland-related question:<br>
> In Java, the "window lost focus" event has a property that points to the window that got the focus instead, if any. In essence, an event without that property means that the focus is now in another app, while non-null property means that some other window of our app still got it.<br>
><br>
> I wonder if you could help me to determine if this is implementable in Wayland?<br>
><br>
> Thanks in advance,<br>
><br>
> Maxim.<br>
><br>
<br>
</blockquote></div>