[Bf-blender-cvs] [6c348bc] wiggly-widgets: Enable continuous grab for widget tweaking

Julian Eisel noreply at git.blender.org
Fri Jun 10 18:42:59 CEST 2016


Commit: 6c348bcab32547ee89aca132fa9ef93816b0d446
Author: Julian Eisel
Date:   Fri Jun 10 18:42:10 2016 +0200
Branches: wiggly-widgets
https://developer.blender.org/rB6c348bcab32547ee89aca132fa9ef93816b0d446

Enable continuous grab for widget tweaking

===================================================================

M	source/blender/windowmanager/widgets/intern/wm_widgetmap.c

===================================================================

diff --git a/source/blender/windowmanager/widgets/intern/wm_widgetmap.c b/source/blender/windowmanager/widgets/intern/wm_widgetmap.c
index 822a3f3..ceaa214 100644
--- a/source/blender/windowmanager/widgets/intern/wm_widgetmap.c
+++ b/source/blender/windowmanager/widgets/intern/wm_widgetmap.c
@@ -718,10 +718,12 @@ void wm_widgetmap_set_active_widget(wmWidgetMap *wmap, bContext *C, const wmEven
 				widget->invoke(C, event, widget);
 			}
 		}
+		WM_cursor_grab_enable(CTX_wm_window(C), true, true, NULL);
 	}
 	else {
 		widget = wmap->wmap_context.active_widget;
 
+
 		/* deactivate, widget but first take care of some stuff */
 		if (widget) {
 			widget->flag &= ~WM_WIDGET_ACTIVE;
@@ -734,6 +736,7 @@ void wm_widgetmap_set_active_widget(wmWidgetMap *wmap, bContext *C, const wmEven
 		wmap->wmap_context.active_widget = NULL;
 
 		if (C) {
+			WM_cursor_grab_disable(CTX_wm_window(C), NULL);
 			ED_region_tag_redraw(CTX_wm_region(C));
 			WM_event_add_mousemove(C);
 		}




More information about the Bf-blender-cvs mailing list