summaryrefslogtreecommitdiffstats
path: root/src/widgets/desktop-widget.cpp
diff options
context:
space:
mode:
authorJohn Smith <john.smith7545@yahoo.com>2013-02-02 07:18:34 +0000
committerJohn Smith <john.smith7545@yahoo.com>2013-02-02 07:18:34 +0000
commitbc5979b0e1e7ab3b9279e8f9ef58255f139937be (patch)
tree19655bf756c2fbc2bc0c3b77af071065379d4e77 /src/widgets/desktop-widget.cpp
parentAdd internal support for CorelDRAW files (import), based on libcdr (diff)
downloadinkscape-bc5979b0e1e7ab3b9279e8f9ef58255f139937be.tar.gz
inkscape-bc5979b0e1e7ab3b9279e8f9ef58255f139937be.zip
Fix for 1091582 : Problem with key release when pressing space with cursor off canvas.
(bzr r12088)
Diffstat (limited to 'src/widgets/desktop-widget.cpp')
-rw-r--r--src/widgets/desktop-widget.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp
index 95ac7f949..9e078cabb 100644
--- a/src/widgets/desktop-widget.cpp
+++ b/src/widgets/desktop-widget.cpp
@@ -998,12 +998,13 @@ sp_desktop_widget_event (GtkWidget *widget, GdkEvent *event, SPDesktopWidget *dt
if (GTK_WIDGET_CLASS (dtw_parent_class)->event) {
return (* GTK_WIDGET_CLASS (dtw_parent_class)->event) (widget, event);
} else {
- // The keypress events need to be passed to desktop handler explicitly,
- // because otherwise the event contexts only receive keypresses when the mouse cursor
- // is over the canvas. This redirection is only done for keypresses and only if there's no
+ // The key press/release events need to be passed to desktop handler explicitly,
+ // because otherwise the event contexts only receive key events when the mouse cursor
+ // is over the canvas. This redirection is only done for key events and only if there's no
// current item on the canvas, because item events and all mouse events are caught
// and passed on by the canvas acetate (I think). --bb
- if (event->type == GDK_KEY_PRESS && !dtw->canvas->current_item) {
+ if ((event->type == GDK_KEY_PRESS || event->type == GDK_KEY_RELEASE)
+ && !dtw->canvas->current_item) {
return sp_desktop_root_handler (NULL, event, dtw->desktop);
}
}