[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60348] trunk/blender/source/blender: Fix #36783: click outside splash screen to close it would not highlight the

Brecht Van Lommel brechtvanlommel at pandora.be
Tue Sep 24 01:31:43 CEST 2013


Revision: 60348
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60348
Author:   blendix
Date:     2013-09-23 23:31:42 +0000 (Mon, 23 Sep 2013)
Log Message:
-----------
Fix #36783: click outside splash screen to close it would not highlight the
button under the mouse, and so clicking the button failed without first
moving the mouse. Similar issues could happen with popups and switching
windows.

The problem is that a notifier was being used to deactivate possible other
activated buttons, but as notifiers are delayed it could undo the correct
activation too. If anyone notices hanging tooltips or other issues after this
fix, please report them.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/interface/interface_handlers.c
    trunk/blender/source/blender/editors/screen/screen_edit.c
    trunk/blender/source/blender/windowmanager/WM_types.h

Modified: trunk/blender/source/blender/editors/interface/interface_handlers.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_handlers.c	2013-09-23 23:01:13 UTC (rev 60347)
+++ trunk/blender/source/blender/editors/interface/interface_handlers.c	2013-09-23 23:31:42 UTC (rev 60348)
@@ -7728,6 +7728,8 @@
 		}
 		else if (temp.cancel_func)
 			temp.cancel_func(C, temp.popup_arg);
+
+		WM_event_add_mousemove(C);
 	}
 	else {
 		/* re-enable tooltips */

Modified: trunk/blender/source/blender/editors/screen/screen_edit.c
===================================================================
--- trunk/blender/source/blender/editors/screen/screen_edit.c	2013-09-23 23:01:13 UTC (rev 60347)
+++ trunk/blender/source/blender/editors/screen/screen_edit.c	2013-09-23 23:31:42 UTC (rev 60348)
@@ -1009,8 +1009,6 @@
 			win->screen->do_draw = TRUE;
 			break;
 		case NC_SCREEN:
-			if (note->data == ND_SUBWINACTIVE)
-				uiFreeActiveButtons(C, win->screen);
 			if (note->action == NA_EDITED)
 				win->screen->do_draw = win->screen->do_refresh = TRUE;
 			break;
@@ -1335,7 +1333,11 @@
 			/* notifier invokes freeing the buttons... causing a bit too much redraws */
 			if (oldswin != scr->subwinactive) {
 				region_cursor_set(win, scr->subwinactive, TRUE);
-				WM_event_add_notifier(C, NC_SCREEN | ND_SUBWINACTIVE, scr);
+
+				/* this used to be a notifier, but needs to be done immediate
+				 * because it can undo setting the right button as active due
+				 * to delayed notifier handling */
+				uiFreeActiveButtons(C, win->screen);
 			}
 			else
 				region_cursor_set(win, scr->subwinactive, FALSE);

Modified: trunk/blender/source/blender/windowmanager/WM_types.h
===================================================================
--- trunk/blender/source/blender/windowmanager/WM_types.h	2013-09-23 23:01:13 UTC (rev 60347)
+++ trunk/blender/source/blender/windowmanager/WM_types.h	2013-09-23 23:31:42 UTC (rev 60348)
@@ -261,7 +261,6 @@
 #define ND_EDITOR_CHANGED	(6<<16) /*sent to new editors after switching to them*/
 #define ND_SCREENSET		(7<<16)
 #define ND_SKETCH			(8<<16)
-#define ND_SUBWINACTIVE		(9<<16)
 
 	/* NC_SCENE Scene */
 #define ND_SCENEBROWSE		(1<<16)




More information about the Bf-blender-cvs mailing list