Am 2018-07-03 18:58, schrieb David Edmundson:


Ideally this needs to be standardized so that it does not only work
with our applications but with any.

Even within just KDE apps, we have code like QDesktopServices spawning
links in code we can't manipulate. Anything non standard, simply isn't
worth merging.

But I don't think standardising anything would be too hard.

Effectively we want something like xdg-foreign which exists. The
difference is that it lasts temporarily and it's not manipulating
parents.

xdg-foreign is pretty much the "token" idea :-)


There are two interesting questions:

Do we want/need to support wayland window sending activating an
xwayland window?

short term: yes, long term: no. Ideally would be a mapping to the startup notifications used on X11.


Would we need a serial of the user event (xdg_popup style)? It would
which kinda matches the X event timestamps?
 It's trickier as you'd need a protocol to generate a UUID for both
that and the surface to sidechannel, but it's not impossible.

I don't think that the serial is needed as the compositor would only pass on focus if the app which generated the token has currently the focus. Given that the serial does not provide any additional advantage. And I don't like just using the serial as that could be guessed.


---

The other potential solution that I was wondering about, that's waaay
simpler, definitely waaay crappier, but possibly simple enough to just
work without really having issues.

Could client A just release focus (somehow) when spawning an app? If
nothing has focus and toplevel B appears, it seems sensible that kwin
would focus it.

Won't work for the "discover already running" usecase.

Cheers
Martin

Reply via email to