Code

Prevent context menu and keyboard shortcuts from interrupting grabs
authorKrzysztof Kosiński <tweenk.pl@gmail.com>
Sun, 31 Oct 2010 23:17:32 +0000 (00:17 +0100)
committerKrzysztof Kosiński <tweenk.pl@gmail.com>
Sun, 31 Oct 2010 23:17:32 +0000 (00:17 +0100)
src/knot.cpp
src/ui/tool/control-point.cpp

index 10672e0481404092c672e5608e30bb46fdb34cce..824f16c3e596766a995a0f7c2756d57ca5d339b8 100644 (file)
@@ -447,7 +447,7 @@ static int sp_knot_handler(SPCanvasItem */*item*/, GdkEvent *event, SPKnot *knot
 
     g_object_unref(knot);
 
-    return consumed;
+    return consumed || grabbed;
 }
 
 void sp_knot_handler_request_position(GdkEvent *event, SPKnot *knot)
index b74e3bc9c1f9b98089285f329170ca5ee5b0b2b6..28c679985c6b376536aa8184136e43cd80967501 100644 (file)
@@ -329,7 +329,7 @@ bool ControlPoint::_eventHandler(GdkEvent *event)
             _setState(STATE_CLICKED);
             return true;
         }
-        return false;
+        return _event_grab;
 
     case GDK_2BUTTON_PRESS:
         // store the button number for next release
@@ -452,8 +452,9 @@ bool ControlPoint::_eventHandler(GdkEvent *event)
 
     default: break;
     }
-    
-    return false;
+
+    // do not propagate events during grab - it might cause problems
+    return _event_grab;
 }
 
 void ControlPoint::_setMouseover(ControlPoint *p, unsigned state)