Re: [Inkscape-devel] gdk_pointer_ungrab() not working in middle-mouse-drag
<message ignored, maybe due to attached patch>
For some reason, I've been having a lot of mouse hangups in Node and Pen (Bezier) tools in the SVN. I found it easier to reproduce in some drawings than in others, but I was able to reproduce it even on a blank canvas.
Mid-drag, the canvas stops being dragged around, but now all mouse buttons are ignored forever, and the mouse cursor remains in Inkscape's shapes even outside Inkscape's window. Some people say they figured out work- arounds that released the mouse buttons, but none worked for me.
(I'm on MacOS X using X11.app.)
I found https://bugs.launchpad.net/inkscape/+bug/291795 and it seemed similar, so I started trying to determine how the panning feature worked. I appended my one-line patch to that bug report.
In essence, some versions of Gdk seem to be unreliable at maintaining the button state while middle-mouse dragging. There is a check for this in the src/event_state.cpp to account for this, and it aborts the drag for safety reasons. But it calls gdk_pointer_ungrab() with a specific time that *should* match the time it was grabbed. In most cases, this appears to work, but not always.
http://ftp.moblin.org/moblin/releases/test/alpha1/doc/gdk/gdk-General.html#g...
I found that giving the generic GDK_CURRENT_TIME is more reliable in actually releasing the mouse, than trying to remember what time was given to the gdk_pointer_grab(). Since this is a safety-oriented release, I think that ensuring the mouse is ungrabbed is more important than the bookkeeping of time values.
Any comments? Any reason not to commit the patch?
-- [ e d @ h a l l e y . c c ]
participants (1)
-
Ed Halley