[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26370] trunk/blender/source/blender/ windowmanager/intern/wm_event_system.c: Bug fix: the new code that allows button highlights in other windows, should

Ton Roosendaal ton at blender.org
Thu Jan 28 17:57:38 CET 2010


Revision: 26370
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26370
Author:   ton
Date:     2010-01-28 17:57:37 +0100 (Thu, 28 Jan 2010)

Log Message:
-----------
Bug fix: the new code that allows button highlights in other windows, should 
not do this while modal handlers are running

Modified Paths:
--------------
    trunk/blender/source/blender/windowmanager/intern/wm_event_system.c

Modified: trunk/blender/source/blender/windowmanager/intern/wm_event_system.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_event_system.c	2010-01-28 16:18:46 UTC (rev 26369)
+++ trunk/blender/source/blender/windowmanager/intern/wm_event_system.c	2010-01-28 16:57:37 UTC (rev 26370)
@@ -1916,13 +1916,21 @@
 	/* top window bar... */
 	if(mx<0 || my<0 || mx>win->sizex || my>win->sizey+30) {	
 		wmWindow *owin;
+		wmEventHandler *handler;
 		
+		/* let's skip windows having modal handlers now */
+		/* potential XXX ugly... I wouldn't have added a modalhandlers list (introduced in rev 23331, ton) */
+		for(handler= win->modalhandlers.first; handler; handler= handler->next)
+			if(handler->ui_handle)
+				return NULL;
+		
 		/* to desktop space */
 		mx+= win->posx;
 		my+= win->posy;
 		
 		/* check other windows to see if it has mouse inside */
 		for(owin= wm->windows.first; owin; owin= owin->next) {
+			
 			if(owin!=win) {
 				if(mx-owin->posx >= 0 && my-owin->posy >= 0 &&
 				   mx-owin->posx <= owin->sizex && my-owin->posy <= owin->sizey) {





More information about the Bf-blender-cvs mailing list