Fix #19479: ctrl+N could temporarily freeze the window when user
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 28 Sep 2009 15:34:15 +0000 (15:34 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 28 Sep 2009 15:34:15 +0000 (15:34 +0000)
preferences were saved from a separate window. Missing transfor of
active window state to the new window.

source/blender/windowmanager/intern/wm_files.c

index 9694a8fa1c6d21b31f238328fb107f53deae1778..1aca9a66e579d90b851a9b8af7e7a86d1aca9ba5 100644 (file)
@@ -195,6 +195,7 @@ static void wm_window_match_do(bContext *C, ListBase *oldwmlist)
 
                        /* ensure making new keymaps and set space types */
                        wm->initialized= 0;
+                       wm->winactive= NULL;
                        
                        /* only first wm in list has ghostwins */
                        for(win= wm->windows.first; win; win= win->next) {
@@ -202,6 +203,10 @@ static void wm_window_match_do(bContext *C, ListBase *oldwmlist)
                                        
                                        if(oldwin->winid == win->winid ) {
                                                win->ghostwin= oldwin->ghostwin;
+                                               win->active= oldwin->active;
+                                               if(win->active)
+                                                       wm->winactive= win;
+
                                                GHOST_SetWindowUserData(win->ghostwin, win);    /* pointer back */
                                                oldwin->ghostwin= NULL;