Closed
Bug 290862
Opened 19 years ago
Closed 17 years ago
Keybindings not disabled in parent of a modal dialog using gtk2 build
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: readams, Assigned: kinetik)
References
(Blocks 1 open bug, )
Details
(Keywords: crash, Whiteboard: [no l10n impact])
Attachments
(1 file)
1.54 KB,
patch
|
karlt
:
review+
roc
:
superreview+
pavlov
:
approval1.9+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.6) Gecko/20050405 Firefox/1.0 (Ubuntu package 1.0.2) Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.6) Gecko/20050405 Firefox/1.0 (Ubuntu package 1.0.2) WHen a modal dialog is open, the parent should ignore all input, including keybindings. Keybindings are currently not ignored Reproducible: Always Steps to Reproduce: 1. Open modal dialog 2. Use keybinding in parent, such as Ctrl-W to close the window 3. Bad things now happen Actual Results: Parent window closes Expected Results: Parent window ignores keybinding gtk2 build, linux, trunk, xulrunner
Comment 1•19 years ago
|
||
Confirming. "Bad things" here means a crash. This is specific to GTK2 builds, looks like. bryner, blizzard, any idea what could be up here or who has time to deal with this? This is something we really want to fix, imo.
Severity: normal → critical
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking1.8b2?
Keywords: crash
Comment 2•19 years ago
|
||
doesn't look like anything's happening here for beta2
Flags: blocking1.8b3?
Flags: blocking1.8b2?
Flags: blocking1.8b2-
Updated•19 years ago
|
Flags: blocking1.8b3? → blocking1.8b3-
Updated•19 years ago
|
Whiteboard: [no l10n impact]
Updated•19 years ago
|
Flags: blocking1.8b4? → blocking1.8b4+
Comment 5•19 years ago
|
||
if this is limited to the gtk2 filepicker (I can't tell, the bug has no steps to reproduce), then this may be identical to the (now fixed) bug 301004.
Comment 6•19 years ago
|
||
> the bug has no steps to reproduce
(no detailed enough ones, that is)
Any modal XUL dialog where the parent window has keybindings configured. The firefox preferences dialog is one example.
Comment 8•19 years ago
|
||
Steps to reproduce: 1) Click the "URL" link in this bug. 2) Use keybindings in the window while the modal alert is up.
Comment 9•19 years ago
|
||
Where does it crash? I'd like to see if this is in our topcrash data or not.
Comment 10•19 years ago
|
||
It's not crashing with current trunk in a simple testcase, just asserting a lot. That said, unless we're sure all of our chrome deals with this situation (which it's not expecting to happen), we should really fix this. I'm assuming we don't care about content script being broken by this, of course.
Comment 11•19 years ago
|
||
not a topcrash. we'd consider a reviewed patch if it was low risk.
Flags: blocking1.8b5+ → blocking1.8b5-
Assignee | ||
Comment 12•17 years ago
|
||
I can reproduce this on trunk, but it doesn't crash for me. Also, this bug looks identical to bug 280895. We are using gtk_grab_add/remove in nsWindow::SetModal to block events to the parent window. This affects GTK widget behaviour but not the window manager behaviour. The grab causes events to the parent widget to be redirected to the (modal) child widget, but our code dispatches key press events to gFocusWindow. gFocusWindow tracks the focused window via focus events, so what happens when a modal dialog is up and the focus changes to the parent window is that we receive events for the modal child widget (due to grab redirection) and redispatch them to the parent window.
Assignee | ||
Comment 13•17 years ago
|
||
Two pronged approach to fix this. Use gtk_window_set_modal instead of gtk_grab_add. set_modal sets the WM modality hint as well as adding a grab. For WMs that honour the modality hint, this stops the parent window from receiving focus. For WMs that do not honour the modality hint, block focus changes (i.e. gFocusWindow changes) internally by setting mContainerBlockFocus on the parent of modal dialogs.
Comment on attachment 283634 [details] [diff] [review] patch I'd like Karl to check this too, since my GTK knowledge is sketchy, but it looks good.
Attachment #283634 -
Flags: superreview+
Attachment #283634 -
Flags: review?(mozbugz)
Attachment #283634 -
Flags: approval1.9?
Comment 15•17 years ago
|
||
gtk_window_set_modal doesn't affect the event loop in that, e.g. network loads in the window that has a modal child will still happen, right?
Assignee | ||
Comment 16•17 years ago
|
||
Correct--gtk_window_set_modal is a wrapper around calls to gdk_window_set_modal_hint + gtk_grab_add/remove, so the behaviour of the event loop is unaffected.
Comment 17•17 years ago
|
||
Comment on attachment 283634 [details] [diff] [review] patch Looks good to me.
Attachment #283634 -
Flags: review?(mozbugz) → review+
This is a rather bad bug. Now that we have a patch, I see no need to not treat it as a blocker.
Flags: blocking1.9?
Updated•17 years ago
|
Attachment #283634 -
Flags: approval1.9? → approval1.9+
Comment 20•17 years ago
|
||
Did this get checked in and fixed?
No, I'm going to check it now.
checked in.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment 23•16 years ago
|
||
Using Firefox 3.0b5 and the following STR, I can reproduce this bug... 1. Open firefox 2. Open a new tab 3. Open Help>About dialog or Tools>Addons dialog 4. Click on content area of the new tab 5. Press CTRL+W RESULT: The tab is closed. EXPECTED RESULT: Shortcut should do nothing. Perhaps I am wrong in what this bug was about?
Assignee | ||
Comment 24•16 years ago
|
||
The about and addons dialogs are not modal, you're free to interact with the parent browser window while they are open.
Comment 25•16 years ago
|
||
Kindly provide me with some dialogs that are modal than. Thank you.
Comment 26•16 years ago
|
||
Please see comment 8.
Assignee | ||
Updated•15 years ago
|
Assignee: caillon → kinetik
Flags: blocking1.9?
Updated•14 years ago
|
Flags: in-testsuite?
You need to log in
before you can comment on or make changes to this bug.
Description
•