diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2019-08-10 09:35:52 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2019-08-10 09:35:52 +0000 |
| commit | 696d2dcbacc0991b2c91e401e3ba8da3cebbbba1 (patch) | |
| tree | c6434cc9cbacf4f1ba92502e93b16a4b4d0c3bf1 /src | |
| parent | Fix CI errors (diff) | |
| download | inkscape-696d2dcbacc0991b2c91e401e3ba8da3cebbbba1.tar.gz inkscape-696d2dcbacc0991b2c91e401e3ba8da3cebbbba1.zip | |
Fixes to regresion pointed in RC about text and tooltips
Diffstat (limited to 'src')
| -rw-r--r-- | src/conditions.cpp | 8 | ||||
| -rw-r--r-- | src/ui/tools/tool-base.h | 5 | ||||
| -rw-r--r-- | src/widgets/desktop-widget.cpp | 10 |
3 files changed, 10 insertions, 13 deletions
diff --git a/src/conditions.cpp b/src/conditions.cpp index 62c44f660..c5f0d8b2c 100644 --- a/src/conditions.cpp +++ b/src/conditions.cpp @@ -217,8 +217,8 @@ static bool evaluateSVG11Feature(gchar const *feature) { "Extensibility", // not sure }; - for (auto & _supported_feature : _supported_features) { - if ( 0 == strcasecmp(feature, _supported_feature) ) + for ( unsigned int i = 0 ; i < sizeof(_supported_features)/sizeof(_supported_features[0]); i++ ) { + if ( 0 == strcasecmp(feature, _supported_features[i]) ) return true; } return false; @@ -235,8 +235,8 @@ static bool evaluateSVG10Feature(gchar const *feature) { // "svg.all", // "dom.svg.all" }; - for (auto & _supported_feature : _supported_features) { - if ( 0 == strcasecmp(feature, _supported_feature) ) + for ( unsigned int i = 0 ; i < sizeof(_supported_features)/sizeof(_supported_features[0]); i++ ) { + if ( 0 == strcasecmp(feature, _supported_features[i]) ) return true; } return false; diff --git a/src/ui/tools/tool-base.h b/src/ui/tools/tool-base.h index a10c6177c..dc68c4b7f 100644 --- a/src/ui/tools/tool-base.h +++ b/src/ui/tools/tool-base.h @@ -160,7 +160,8 @@ public: gint xp, yp; ///< where drag started gint tolerance; - + bool _button1on; + bool _button3on; bool within_tolerance; ///< are we still within tolerance of origin SPItem *item_to_select; ///< the item where mouse_press occurred, to @@ -229,8 +230,6 @@ public: protected: /// An xpm containing the shape of the tool's cursor. gchar const *const *cursor_shape; - bool _button1on; - bool _button3on; bool sp_event_context_knot_mouseover() const; private: diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp index e6444de55..6035719d8 100644 --- a/src/widgets/desktop-widget.cpp +++ b/src/widgets/desktop-widget.cpp @@ -1002,10 +1002,6 @@ SPDesktopWidget::event(GtkWidget *widget, GdkEvent *event, SPDesktopWidget *dtw) // 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_MOTION_NOTIFY || event->type == GDK_BUTTON_RELEASE) && !dtw->_canvas->_inside) { - return sp_desktop_root_handler(nullptr, event, dtw->desktop); - } - if ((event->type == GDK_KEY_PRESS || event->type == GDK_KEY_RELEASE) && !dtw->_canvas->_current_item) { return sp_desktop_root_handler (nullptr, event, dtw->desktop); @@ -1021,9 +1017,11 @@ SPDesktopWidget::event(GtkWidget *widget, GdkEvent *event, SPDesktopWidget *dtw) gint SPDesktopWidget::eventoutside(GtkWidget *widget, GdkEvent *event, SPDesktopWidget *dtw) { - if ((event->type == GDK_MOTION_NOTIFY || event->type == GDK_BUTTON_RELEASE) && !dtw->_canvas->_inside) { - return sp_desktop_root_handler(nullptr, event, dtw->desktop); + if ((event->type == GDK_MOTION_NOTIFY || event->type == GDK_BUTTON_RELEASE) && !dtw->_canvas->_inside && + dtw->desktop->event_context->_button1on) { + sp_desktop_root_handler(nullptr, event, dtw->desktop); } + return FALSE; } |
