From 696d2dcbacc0991b2c91e401e3ba8da3cebbbba1 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Sat, 10 Aug 2019 09:35:52 +0000 Subject: Fixes to regresion pointed in RC about text and tooltips --- src/conditions.cpp | 8 ++++---- src/ui/tools/tool-base.h | 5 ++--- src/widgets/desktop-widget.cpp | 10 ++++------ 3 files changed, 10 insertions(+), 13 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3