[Bug 224475] Re: Pressing volume/brightness key changes window focus (e.g. makes Flash exit full screen)

Havoc Pennington hp at litl.com
Wed Dec 2 20:29:57 UTC 2009


I think we're confusing Adobe - both here, and due to people piling on
to the Adobe bug with "me too!" comments that conceal the content-
containing comments over on the Adobe site.

This is a Flash bug. There may _also_ be a GNOME bug or bugs.

The way X works is that if client xyz is going to get key events, then
it has to have key focus. The FocusIn / FocusOut events are delivered so
clients can track who is going to get the events.

The volume, etc. shortcuts are implemented with a "passive keygrab"
which grabs focus when the volume keys are pressed, for example.

The 15-ish-years-old X spec isn't going to change here; the same focus
in/out events will be sent, etc., or lots of things would break.

There are two basic ways to fix the issues: 1) never use passive
keygrabs; requires fixing settings daemon, window managers, etc. to work
differently 2) fix toolkits and Flash to properly handle FocusOut from
passive keygrabs.

Now, even if 1) is done someday, Flash should really still be fixed, and
can be fixed in a simple way, to avoid going bonkers when it gets a
FocusOut with NotifyGrab. So, we should be sure that technical info is
available to Adobe over on their site, and please stop adding useless "I
saw the bug too" and "Adobe is bad" comments to their site.

I believe GTK+ has a deliberate decision to show that focus has moved in
this case, but GTK could be fixed to track "user-visible idea of focus"
instead, probably. This would need to be a GTK bug report. Good chance
said bug already exists even. One tradeoff could be that *active* grabs
(like open menus) might no longer dim text entries. I don't really know
all the issues though.

To implement 1) you can probably do something nuts with Xkb instead of
using passive keygrabs. The only downside is that it might test
previously-untested X server codepaths, and might not work on some scary
old X terminals or something. It would need investigation.

Anyway, there are certainly various things that could be done in how GNOME does global keybindings, and how GTK deals with grab-related FocusOut, and so on. All these things are kind of thorny and hard to think through, and they also are not especially important end-user-wise. I would guess they should be separate bugs, not part of this bug against flash plugin. 
The GTK and GNOME stuff should really be discussed on bugzilla.gnome.org or it's a waste of time, anyhow.

However, the Flash bug is very _easy_ to fix, and also has a nasty end-
user impact. So, let's not lose track in all this that there's a very
small change to Flash here, and we need to communicate that change
clearly to Adobe. Flash simply should not unfullscreen due to FocusOut
events with NotifyGrab.

-- 
Pressing volume/brightness key changes window focus (e.g. makes Flash exit full screen)
https://bugs.launchpad.net/bugs/224475
You received this bug notification because you are a member of Mozilla
Bugs, which is subscribed to flashplugin-nonfree in ubuntu.




More information about the Ubuntu-mozillateam-bugs mailing list