Bug 32840 - [GTK] Drag gesture can take mouse grab indefinitely
Summary: [GTK] Drag gesture can take mouse grab indefinitely
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Critical
Assignee: Nobody
URL:
Keywords:
: 27840 (view as bug list)
Depends on: 40143
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-21 13:57 PST by Grant Gayed
Modified: 2010-11-02 17:15 PDT (History)
11 users (show)

See Also:


Attachments
Patch (5.56 KB, patch)
2010-06-03 12:58 PDT, Martin Robinson
no flags Details | Formatted Diff | Diff
Start the drag with the current GTK+ event (2.69 KB, patch)
2010-06-04 14:40 PDT, Martin Robinson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Grant Gayed 2009-12-21 13:57:40 PST
- using WebKit 1.1.16 built from source on Ubuntu 9.10

- run the GtkLauncher app and navigate to a page that shows a static image (eg.- the banner at the top of http://www.slis.indiana.edu/faculty/hrosenba/www/Demo/Demo5.html )
- click quickly and repeatedly on the image while moving the mouse a little bit, and you'll soon (within a few seconds) get into a state where WebKitGTK has taken mouse grab and there's no way to get it to let go
- additionally, when this happens the following is written to stdout:

(GtkLauncher:22437): Gdk-CRITICAL **: gdk_window_get_events: assertion `GDK_IS_WINDOW (window)' failed

(GtkLauncher:22437): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed

(GtkLauncher:22437): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
Comment 1 Grant Gayed 2009-12-21 13:59:31 PST
To clarify, I equated repeated clicking with the drag gesture because when the problem occurs the cursor is left as the drag hand with '+', so I assume that the problem trigger is that a drag is being initiated while clicking and moving the mouse.
Comment 2 David Weinehall 2010-03-03 17:55:08 PST
I've experienced this too, several times.  Seriously annoying bug.  FWIW evolution used to have this kind of bug a long time ago; if you need help to figure out what's wrong, maybe some evolution developer might have some insight (that might of course a totally unrelated issue though).
Comment 3 Jeremy Nickurak 2010-03-15 16:07:43 PDT
Confirming present in 1.1.23. Locks up not just the embedding browser in question, but the entire desktop as a result, until epiphany is manually killed.
Comment 4 Grant Gayed 2010-03-17 06:48:23 PDT
Increasing severity to critical because this is easily hit, and locks the whole desktop.  Surely this puts it among the most significant problems.
Comment 5 Jeremy Nickurak 2010-03-28 12:35:27 PDT
As a workaround, in epiphany anyways I seem to be able to usually get out of this by opening a gtk menu, as in alt+F to open the file menu.
Comment 6 Gauvain Pocentek 2010-05-06 00:23:30 PDT
Hi,

The bug is still present in webkit 1.2.0.

I've seen this on a slow machine, and the problem appears on all the system DND (not the JS ones). If the release event is received before the drag icon (the one that follows the cursor) is realized, then the lock happens.

If I understand the code correctly, a workaround is implemented in firefox for this. It uses a GtkInvisible that is realized immediatly after creation, and dnd events are tracked on this widget (nsDragService constructor in widget/src/gtk2/nsDragService.cpp).

HTH.
Comment 7 Martin Robinson 2010-06-03 10:52:49 PDT
*** Bug 27840 has been marked as a duplicate of this bug. ***
Comment 8 Martin Robinson 2010-06-03 12:58:04 PDT
Created attachment 57806 [details]
Patch
Comment 9 Xan Lopez 2010-06-03 13:03:38 PDT
Comment on attachment 57806 [details]
Patch

Woot.
Comment 10 Martin Robinson 2010-06-03 13:09:13 PDT
Committed r60632: <http://trac.webkit.org/changeset/60632>
Comment 12 Martin Robinson 2010-06-04 14:40:36 PDT
Created attachment 57917 [details]
Start the drag with the current GTK+ event
Comment 13 Martin Robinson 2010-06-04 14:42:19 PDT
Because of recent changes to the GTK+ event sender it is now possible to start the drag with the current GTK+ event. I've attached a patch using this method.
Comment 14 Xan Lopez 2010-06-04 14:45:36 PDT
Comment on attachment 57917 [details]
Start the drag with the current GTK+ event

Oh gods of GTK+, accept this offer.
Comment 15 Martin Robinson 2010-06-04 14:47:47 PDT
Committed r60709: <http://trac.webkit.org/changeset/60709>