diff --git a/src/node-context.cpp b/src/node-context.cpp
index 6ad7b85d429b8762cee096ba267a233608b12cc6..7efa57290832fb23565c020ddf57e4f448cc8183 100644 (file)
--- a/src/node-context.cpp
+++ b/src/node-context.cpp
SPEventContext *ec = SP_EVENT_CONTEXT(object);
ec->enableGrDrag(false);
+
+ if (nc->grabbed) {
+ sp_canvas_item_ungrab(nc->grabbed, GDK_CURRENT_TIME);
+ nc->grabbed = NULL;
+ }
nc->sel_changed_connection.disconnect();
nc->sel_changed_connection.~connection();
nc->remove_flash_counter--;
}
- sp_event_context_snap_window_open(event_context, false); // Just put the snap window open, bluntly. Will be closed when we have left the context
-
gint ret = FALSE;
switch (event->type) {
case GDK_BUTTON_PRESS:
event->button.y);
Geom::Point const button_dt(desktop->w2d(button_w));
Inkscape::Rubberband::get(desktop)->start(desktop, button_dt);
+
+ if (nc->grabbed) {
+ sp_canvas_item_ungrab(nc->grabbed, event->button.time);
+ nc->grabbed = NULL;
+ }
+
+ sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate),
+ GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK,
+ NULL, event->button.time);
+ nc->grabbed = SP_CANVAS_ITEM(desktop->acetate);
+
nc->current_state = SP_NODE_CONTEXT_INACTIVE;
desktop->updateNow();
ret = TRUE;
desktop->updateNow();
}
Inkscape::Rubberband::get(desktop)->stop();
+ if (nc->grabbed) {
+ sp_canvas_item_ungrab(nc->grabbed, event->button.time);
+ nc->grabbed = NULL;
+ }
ret = TRUE;
break;
}
}
ret = TRUE;
Inkscape::Rubberband::get(desktop)->stop();
+
+ if (nc->grabbed) {
+ sp_canvas_item_ungrab(nc->grabbed, event->button.time);
+ nc->grabbed = NULL;
+ }
+
desktop->updateNow();
nc->rb_escaped = false;
nc->drag = FALSE;