From eae8322c8b968bbf076323eb68707124bfc810d9 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sat, 18 Jul 2009 12:56:25 +0000 Subject: Make the snap delay mechanism easier to implement for the devs, and get rid of the related warning messages (bzr r8302) --- src/node-context.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/node-context.cpp') diff --git a/src/node-context.cpp b/src/node-context.cpp index 6ad7b85d4..a0fb78ba1 100644 --- a/src/node-context.cpp +++ b/src/node-context.cpp @@ -300,8 +300,6 @@ sp_node_context_root_handler(SPEventContext *event_context, GdkEvent *event) 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: -- cgit v1.2.3 From 9403760eddc285464243365298cf6424ce916924 Mon Sep 17 00:00:00 2001 From: bulia byak Date: Tue, 11 Aug 2009 01:40:49 +0000 Subject: patch 168780 (bzr r8464) --- src/node-context.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/node-context.cpp') diff --git a/src/node-context.cpp b/src/node-context.cpp index a0fb78ba1..3535ae9e0 100644 --- a/src/node-context.cpp +++ b/src/node-context.cpp @@ -117,6 +117,11 @@ sp_node_context_dispose(GObject *object) 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(); @@ -327,6 +332,12 @@ sp_node_context_root_handler(SPEventContext *event_context, GdkEvent *event) event->button.y); Geom::Point const button_dt(desktop->w2d(button_w)); Inkscape::Rubberband::get(desktop)->start(desktop, button_dt); + + 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; @@ -483,6 +494,12 @@ sp_node_context_root_handler(SPEventContext *event_context, GdkEvent *event) } 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; -- cgit v1.2.3 From d0360261daf192a5bc8a015bfc2273bf81d49faa Mon Sep 17 00:00:00 2001 From: bulia byak Date: Mon, 17 Aug 2009 13:47:20 +0000 Subject: some more ungrabbing needed (bzr r8497) --- src/node-context.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/node-context.cpp') diff --git a/src/node-context.cpp b/src/node-context.cpp index 3535ae9e0..7efa57290 100644 --- a/src/node-context.cpp +++ b/src/node-context.cpp @@ -332,6 +332,11 @@ sp_node_context_root_handler(SPEventContext *event_context, GdkEvent *event) 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, @@ -471,6 +476,10 @@ sp_node_context_root_handler(SPEventContext *event_context, GdkEvent *event) 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; } -- cgit v1.2.3