Closed Bug 407633 Opened 17 years ago Closed 13 years ago

Can't close window via close widget after dragging in bookmark menu

Categories

(Core :: Widget: Gtk, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b12

People

(Reporter: kinetik, Assigned: karlt)

References

Details

Attachments

(1 file, 2 obsolete files)

S.T.R.
1. Click and drag bookmark out of bookmarks menu
2. Drop bookmark on browser or cancel drag by pressing escape key
3. Close browser with window decoration close widget or right clicking window decoration and selecting close

E.R.
Normal window close behaviour

A.R.
Close request ignored

Closing via File->Quit or Ctrl-W works fine, so it seems like we get stuck blocking the close/destroy events from the window manager.
The problem is that the menu popup acquires a GTK widget grab when it appears, but does not release the GTK widget grab when it hides if a drag event is in progress when the popup rolls up.

http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/widget/src/gtk2/nsWindow.cpp&rev=1.251&root=/cvsroot&mark=1505,1506,1512,1514#1504

I think we should release the GTK widget grab irrespective of a drag being in progress.  I've been testing that change here and it does not seem to break any other DnD behaviour so far, but I'll test further before posting the patch.  We must retain the grabs acquired via GrabPointer/GrabKeyboard in this situation, however, because otherwise events are delivered to the wrong widget during the drag.
Marking dependent for the time being, per bug 418156 comment 30.
Depends on: 418156
Clearing dep on bug 418156.  I can still reproduce this using a build with that patch applied.  Applying my patch resolves the problem.
No longer depends on: 418156
Requesting blocking since bug 418156 was blocking, but maybe it's too late in the game for this one.

The fix suggested in comment #1 is trivial, but I want to debug this further to make sure that's the correct fix (and the problem isn't to do with the order grabs are acquired and released).
Flags: blocking1.9?
Don't think it blocks, but we'd take a fix.
Flags: wanted-next+
Flags: blocking1.9?
Flags: blocking1.9-
Assignee: kinetik → nobody
Blocks: 179078
Attachment #510861 - Flags: review? → review?(kinetik)
Comment on attachment 510861 [details] [diff] [review]
ensure to remove widget grabs from CaptureRollupEvents even when a drag has since started

(wrong patch)
Attachment #510861 - Attachment is obsolete: true
Attachment #510861 - Flags: review?(kinetik)
Attachment #510862 - Attachment is obsolete: true
Attachment #510863 - Flags: review?(kinetik)
Attachment #510862 - Flags: review?(kinetik)
Attachment #510863 - Flags: review?(kinetik) → review+
Comment on attachment 510863 [details] [diff] [review]
ensure to remove widget grabs from CaptureRollupEvents even when a drag has since started

This very low risk patch resolves this unfortunate unable-to-close behaviour that is hard to associate with its cause (dragging from bookmarks).
Attachment #510863 - Flags: approval2.0?
http://hg.mozilla.org/mozilla-central/rev/48ef0691b70c
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b12
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: