MPX features & popups

Peter Hutterer peter.hutterer at who-t.net
Mon Feb 15 18:10:52 PST 2010


Hi Marc,

On Tue, Feb 16, 2010 at 02:34:28AM +0100, Marc Weber wrote:
> The MPX (multi point extension) feature of xorg is great.

thank you :)
 
> However there is a big problem with popups.
> Eg if you start typing some characters in the Firefox address input a
> popup occurs. It grabs keyboard (but the wrong one!).
> 
> The problem is described here as well:
>  http://www.x.org/wiki/Development/Documentation/MPX
> 
> Now one could start fixing all the applications using the advertised
> XSetClientPointer.

not quite, XSetClientPointer is a feature for a window manager to work
around the issue you're describing in case the applications haven't been
fixed yet. The right way to fix an application is to make it use the XI2 api
for input events instead of core events. That's a lot more work of course
(hence XSetClientPointer might be a quickfix for now) but it also enables
some more possibilities.

> However could'nt X notice that the popup belongs to the same application
> (X-connection) as a window which has had keyboard focus and reuse that
> keyboard in this case?

which keyboard if there's multiple ones that have focus?

it's not a trivial problem, at any point in time there may be multiple
keyboard foci in a window and even the last one to type is not always the
right one. The current approach is somewhat of a least common denominator,
aimed mostly at being predictable and less at being overly smart - being
overly smart often has the side-effect of being overly stupid in
corner-cases.

couple that with the problem that an application is not restricted to a
single client connection and client connections aren't limited to windows.
IIRC firefox uses a single connection for all windows wich doesn't help when
you have two users typing (though that's problematic anyway).

Aside from that, it's not actually the popup window that's the issue it's
the active grab. And active grabs have multiple purposes and there's cases
where you cannot map a grab to an preceding interaction. At which point it's
becomes quite unpredictable which keyboard a grab will act on. In this case,
I'd argue that predictablility is better than guesswork (even if it is
correct in _most_ cases).

> The problem is not about FireFox. With some effort you can fix it there.
> But what about close source software such as Opera?

poke the opera guys :)

Cheers,
  Peter



More information about the xorg mailing list