Comment 14 for bug 1165649

Revision history for this message
In , Karlt (karlt) wrote :

Comment on attachment 652764
Add filter removing offending events

Thanks very much for everyone's analysis here.

Bear in mind that GrabKeyboard can also cause a FocusOut event with NotifyGrab
mode. While passive grabs are typically short, GrabKeyboard would normally be
for longer.

I see that Flash remains fullscreen after FocusOut with NotifyGrab, but it
does exit fullscreen on a subsequent FocusOut with NotifyWhileGrabbed.

Unfortunately, we can't just ignore NotifyGrab because GDK will ignore NotifyWhileGrabbed and we won't get a FocusOut event if focus changes during the grab.

Perhaps this approach could be adjusted to synthesize a NotifyGrab FocusOut
when one with NotifyWhileGrabbed is received, but I fear that the change in
focus behaviour could confuse GTK widgets and menus that use gdk_keyboard_grab
and may expect the grab window to have focus. These are used only in dialogs
that Gecko opens.

My preferred fix here would be to fix bug 724554 by not exiting fullscreen on
focus out. (Even if a message is shown on focus in, that need not require
explicit acceptance of fullscreen again and so could be transient, or it could even be shown only if focus is lost for some period of time.)

If that doesn't work out, I'd prefer a timeout in browser-fullScreen.js, so
that it only exits fullscreen if focus is lost for some period of time.