From: dvlierop2 Date: Tue, 3 Mar 2009 21:55:48 +0000 (+0000) Subject: Fix bug #291795 again X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=52ba37109b5995059295bc02c2647a2a45e7c320;p=inkscape.git Fix bug #291795 again --- diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp index 38b0ae995..75a1f4e63 100644 --- a/src/display/sp-canvas.cpp +++ b/src/display/sp-canvas.cpp @@ -1609,7 +1609,12 @@ sp_canvas_motion (GtkWidget *widget, GdkEventMotion *event) SPDesktop *dt = SP_ACTIVE_DESKTOP; - if (canvas->context_snap_delay_active && dt && dt->namedview->snap_manager.snapprefs.getSnapEnabledGlobally()) { + // Snapping occurs when dragging with the left mouse button down, or when hovering e.g. in the pen tool with left mouse button up + bool const c1 = event->state & GDK_BUTTON2_MASK; // We shouldn't hold back any events when other mouse buttons have been + bool const c2 = event->state & GDK_BUTTON3_MASK; // pressed, e.g. when scrolling with the middle mouse button; if we do then + // Inkscape will get stuck in an unresponsive state + + if (canvas->context_snap_delay_active && !c1 && !c2 && dt && dt->namedview->snap_manager.snapprefs.getSnapEnabledGlobally()) { // Snap when speed drops below e.g. 0.02 px/msec, or when no motion events have occurred for some period. // i.e. snap when we're at stand still. A speed threshold enforces snapping for tablets, which might never // be fully at stand still and might keep spitting out motion events.