2.5
authorTon Roosendaal <ton@blender.org>
Tue, 6 Jan 2009 19:49:45 +0000 (19:49 +0000)
committerTon Roosendaal <ton@blender.org>
Tue, 6 Jan 2009 19:49:45 +0000 (19:49 +0000)
Small context bug when switching screens, Context didn't get updated
well. (solves crash in windows, on exit full screen file browser)

source/blender/editors/screen/screen_edit.c

index f89ef34e6300af6d0d76ff30258a10f6a23c1769..536ce9cee74bf8843767a56ba6471fc37ba1f71c 100644 (file)
@@ -1204,17 +1204,19 @@ void ed_screen_set(bContext *C, bScreen *sc)
        }
        
        if (oldscreen != sc) {
+               wmWindow *win= CTX_wm_window(C);
                wmTimer *wt= oldscreen->animtimer;
                
                /* we put timer to sleep, so screen_exit has to think there's no timer */
                oldscreen->animtimer= NULL;
                if(wt)
-                       WM_event_window_timer_sleep(CTX_wm_window(C), wt, 1);
+                       WM_event_window_timer_sleep(win, wt, 1);
                
-               ED_screen_exit(C, CTX_wm_window(C), oldscreen);
+               ED_screen_exit(C, win, oldscreen);
                oldscreen->animtimer= wt;
                
-               CTX_wm_window(C)->screen= sc;
+               win->screen= sc;
+               CTX_wm_window_set(C, win);      // stores C->wm.screen... hrmf
                
                ED_screen_refresh(CTX_wm_manager(C), CTX_wm_window(C));
                WM_event_add_notifier(C, NC_WINDOW, NULL);