summaryrefslogtreecommitdiffstats
path: root/src/display/sp-canvas.cpp
diff options
context:
space:
mode:
authorJabiertxof <jabier.arraiza@marker.es>2019-08-02 16:37:57 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2019-08-02 21:26:28 +0000
commitf3ecf7a2de4a54b11603849501087aec13de9548 (patch)
treecbc201e9109d545eef13e41495c043b23e41266d /src/display/sp-canvas.cpp
parentFix coding style (diff)
downloadinkscape-f3ecf7a2de4a54b11603849501087aec13de9548.tar.gz
inkscape-f3ecf7a2de4a54b11603849501087aec13de9548.zip
Allow tools sensitive when overflow canvas area also fix a bug i couldent remember about ruberband selection
Diffstat (limited to 'src/display/sp-canvas.cpp')
-rw-r--r--src/display/sp-canvas.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp
index cb42f2daf..71478eaeb 100644
--- a/src/display/sp-canvas.cpp
+++ b/src/display/sp-canvas.cpp
@@ -1012,6 +1012,7 @@ static void sp_canvas_init(SPCanvas *canvas)
canvas->_xray = false;
canvas->_xray_orig = Geom::Point();
canvas->_changecursor = 0;
+ canvas->_inside = false; // this could be wrong on start but we update it as far we bo to the other side.
bool _is_dragging;
#if defined(HAVE_LIBLCMS2)
@@ -1167,7 +1168,7 @@ void SPCanvas::handle_size_allocate(GtkWidget *widget, GtkAllocation *allocation
// Allocation does not depend on device scale.
GtkAllocation old_allocation;
gtk_widget_get_allocation(widget, &old_allocation);
-
+
// For HiDPI monitors.
canvas->_device_scale = gtk_widget_get_scale_factor( widget );
@@ -2318,7 +2319,11 @@ gint SPCanvas::handle_crossing(GtkWidget *widget, GdkEventCrossing *event)
if (event->window != getWindow(canvas)) {
return FALSE;
}
-
+ if (event->type == GDK_LEAVE_NOTIFY) {
+ canvas->_inside = false;
+ } else {
+ canvas->_inside = true;
+ }
canvas->_state = event->state;
return canvas->pickCurrentItem(reinterpret_cast<GdkEvent *>(event));
}