Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_init_exit.c
| Context not available. | |||||
| if (G.background) { | if (G.background) { | ||||
| /* Ghost is still not init elsewhere in background mode. */ | /* Ghost is still not init elsewhere in background mode. */ | ||||
| wm_ghost_init(NULL); | wm_window_init(NULL); | ||||
| } | } | ||||
| /* Needs to be first to have an ogl context bound. */ | /* Needs to be first to have an ogl context bound. */ | ||||
| Context not available. | |||||
| { | { | ||||
| if (!G.background) { | if (!G.background) { | ||||
| wm_ghost_init(C); /* note: it assigns C to ghost! */ | wm_window_init(C); /* note: it assigns C to ghost! */ | ||||
| wm_init_cursor_data(); | wm_init_cursor_data(); | ||||
| } | } | ||||
| Context not available. | |||||
| WM_jobs_kill_all(wm); | WM_jobs_kill_all(wm); | ||||
| for (win = wm->windows.first; win; win = win->next) { | for (win = wm->windows.first; win; win = win->next) { | ||||
| CTX_wm_window_set(C, win); | |||||
| // TODO: wm_window_close() is not called on OSX so saving position for the main window | |||||
| // needs to be done here.. | |||||
| wm_window_set_preferred_window_position(win); | |||||
| CTX_wm_window_set(C, win); /* needed by operator close callbacks */ | |||||
| WM_event_remove_handlers(C, &win->handlers); | WM_event_remove_handlers(C, &win->handlers); | ||||
| WM_event_remove_handlers(C, &win->modalhandlers); | WM_event_remove_handlers(C, &win->modalhandlers); | ||||
| ED_screen_exit(C, win, WM_window_get_active_screen(win)); | ED_screen_exit(C, win, WM_window_get_active_screen(win)); | ||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||
| RNA_exit(); /* should be after BPY_python_end so struct python slots are cleared */ | RNA_exit(); /* should be after BPY_python_end so struct python slots are cleared */ | ||||
| wm_ghost_exit(); | wm_window_exit(); | ||||
| CTX_free(C); | CTX_free(C); | ||||
| Context not available. | |||||