Override redirect windows with keyboard grabs on Xwayland

Adam Jackson ajax at nwnk.net
Fri Jul 1 20:33:43 UTC 2016


On Fri, 2016-06-17 at 03:49 -0400, Olivier Fourdan wrote:
> Hi all,
> 
> First of all, sorry for cross posting, but I am not really sure where
> the issue is to be addressed...
> 
> I am looking into https://bugs.freedesktop.org/show_bug.cgi?id=96547
> and concluded this is actually the same as  https://bugzilla.gnome.or
> g/show_bug.cgi?id=752956
> 
> Basically, long story short, we have clients in X that map a full-
> screen override redirect window with a keyboard/mouse active grab for
> the user to enter a password.
> 
> Because override redirect windows are not managed by X11 window
> managers, these won't focus the O-R window by themselves but that's
> not a problem on X11 thanks to the active grab.
> 
> Things get more complicated with those clients on Xwayland, because
> the X11 active grab cannot be honoured in Wayland, and therefore the
> window may or may not get focused automatically, depending on the
> compositor/WM. In the worst case, the user might type his/her
> password in some other (focused but hidden underneath) window without
> even knowing it!

This feels a lot like any other "app wants attention" case where you
should just get a pulsing button or bouncing icon in the taskbar. The
o-r window might be mapped and focused from Xwayland's perspective but
there's nothing compelling wayland to actually show or focus it
promptly, you know it's o-r, you know it's full-screen sized, and you
have control of the display so when you _do_ put it up you can vignette
it and add a Get Me Out Of Here checkbox in the upper-right or
whatever.

I guess the thing you don't really get is a GrabNotify to let the wm
know what's going on, though maybe you could infer it from FocusOut.
There also appears to be no "wants attention" request in any wayland
protocol, which is perhaps suboptimal. But if we had that, xserver
could just emit that when an active grab fires, and then once the
window gets focus the grab works just as well as it ever would.

- ajax


More information about the xorg-devel mailing list