Closed Bug 390589 Opened 17 years ago Closed 17 years ago

[X11] keyboard grab continues while executing menu command

Categories

(Core :: XUL, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dbaron, Assigned: enndeakin)

References

Details

Attachments

(1 file, 1 obsolete file)

I think this is a regression from bug 279703 -- I've been noticing it for a while.

When I have a lot of browser windows open and choose File | Quit, it's always taken a while to quit.  However, since around the time the popup rewrite landed, it's changed so that the keyboard grab done by the menus lasts until the app quits, which means that I can't use any other programs while Firefox is quitting.  (And occasionally by using the keyboard I've managed to cause crashes, and I may have occasionally also noticed weird painting at the location where the file menu was as though a widget were still there.)

Steps to reproduce:
 1. open a lot of firefox windows
 2. do File | Quit
 3. try to switch to another virtual desktop and use other apps

Actual results: keyboard doesn't work

Expected results: keyboard works in other apps
Flags: blocking1.9?
Note that the keyboard grab doesn't always continue very long -- I think it usually stops while the windows are closing -- although maybe only if I click the mouse.

I've also seen the menu popup that had previously gone away before the windows started closing reappear after things are down to one window, and then finally go away again just after that last window closes.
Attached patch possible fix (obsolete) — Splinter Review
Haven't been able to test this on Linux, but it fixes a focus issue on Mac due to the mouse capture state still being set after selecting a command from a menu. With this patch, the capture state should be removed earlier causing the keyboard grab to be released.

Can someone with linux confirm whether this bug fixes this issue?
Assignee: nobody → enndeakin
Status: NEW → ASSIGNED
Blocks: 391388
Attached patch better patchSplinter Review
This patch does two things:
 - makes sure that SetCaptureState is called when hiding a popup in all situations so the keyboard grab is released. It also ensures that a rollup widget isn't still active so that the platform widget code doesn't still think a popup is open
 - skips over invisible popups when iterating over the popup lists in most cases, the exceptions are when the popup list is being adjusted.
Attachment #275914 - Attachment is obsolete: true
attachment 276524 [details] [diff] [review] does fix the bug 391000 symptom (tested with tbird edit -> accts + n for preferences
Attachment #276524 - Flags: superreview?(bzbarsky)
Attachment #276524 - Flags: review?(bzbarsky)
Comment on attachment 276524 [details] [diff] [review]
better patch

Hmm.... Makes sense, I guess....
Attachment #276524 - Flags: superreview?(bzbarsky)
Attachment #276524 - Flags: superreview+
Attachment #276524 - Flags: review?(bzbarsky)
Attachment #276524 - Flags: review+
Attachment #276524 - Flags: approval1.9?
Comment on attachment 276524 [details] [diff] [review]
better patch

a1.9=dbaron
Attachment #276524 - Flags: approval1.9? → approval1.9+
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: blocking1.9? → in-testsuite?
Resolution: --- → FIXED
Component: XP Toolkit/Widgets: Menus → XUL
QA Contact: xptoolkit.menus → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: