summaryrefslogtreecommitdiffstats
path: root/src/spiral-context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/spiral-context.cpp')
-rw-r--r--src/spiral-context.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/spiral-context.cpp b/src/spiral-context.cpp
index bdc7c65c7..1fcbc29a9 100644
--- a/src/spiral-context.cpp
+++ b/src/spiral-context.cpp
@@ -354,6 +354,21 @@ sp_spiral_context_root_handler(SPEventContext *event_context, GdkEvent *event)
case GDK_Escape:
sp_desktop_selection(desktop)->clear();
//TODO: make dragging escapable by Esc
+ break;
+
+ case GDK_space:
+ if (dragging) {
+ sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate),
+ event->button.time);
+ dragging = false;
+ if (!event_context->within_tolerance) {
+ // we've been dragging, finish the rect
+ sp_spiral_finish(sc);
+ }
+ // do not return true, so that space would work switching to selector
+ }
+ break;
+
default:
break;
}