Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm.c
| Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | |||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_screen.h" | #include "BKE_screen.h" | ||||
| #include "BKE_report.h" | #include "BKE_report.h" | ||||
| #include "BKE_global.h" | #include "BKE_global.h" | ||||
| #include "BKE_workspace.h" | #include "BKE_workspace.h" | ||||
| #include "WM_api.h" | #include "WM_api.h" | ||||
| #include "WM_types.h" | #include "WM_types.h" | ||||
| #include "WM_message.h" | |||||
| #include "wm_window.h" | #include "wm_window.h" | ||||
| #include "wm_event_system.h" | #include "wm_event_system.h" | ||||
| #include "wm_draw.h" | #include "wm_draw.h" | ||||
| #include "wm.h" | #include "wm.h" | ||||
| #include "ED_screen.h" | #include "ED_screen.h" | ||||
| #ifdef WITH_PYTHON | #ifdef WITH_PYTHON | ||||
| ▲ Show 20 Lines • Show All 324 Lines • ▼ Show 20 Lines | if ((wm->initialized & WM_WINDOW_IS_INITIALIZED) == 0) { | ||||
| WM_keymap_init(C); | WM_keymap_init(C); | ||||
| WM_autosave_init(wm); | WM_autosave_init(wm); | ||||
| } | } | ||||
| /* case: no open windows at all, for old file reads */ | /* case: no open windows at all, for old file reads */ | ||||
| wm_window_ghostwindows_ensure(wm); | wm_window_ghostwindows_ensure(wm); | ||||
| } | } | ||||
| if (wm->message_bus == NULL) { | |||||
| wm->message_bus = WM_msgbus_create(); | |||||
| } | |||||
| /* case: fileread */ | /* case: fileread */ | ||||
| /* note: this runs in bg mode to set the screen context cb */ | /* note: this runs in bg mode to set the screen context cb */ | ||||
| if ((wm->initialized & WM_WINDOW_IS_INITIALIZED) == 0) { | if ((wm->initialized & WM_WINDOW_IS_INITIALIZED) == 0) { | ||||
| ED_screens_initialize(wm); | ED_screens_initialize(wm); | ||||
| wm->initialized |= WM_WINDOW_IS_INITIALIZED; | wm->initialized |= WM_WINDOW_IS_INITIALIZED; | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | while ((op = BLI_pophead(&wm->operators))) { | ||||
| WM_operator_free(op); | WM_operator_free(op); | ||||
| } | } | ||||
| while ((keyconf = BLI_pophead(&wm->keyconfigs))) { | while ((keyconf = BLI_pophead(&wm->keyconfigs))) { | ||||
| WM_keyconfig_free(keyconf); | WM_keyconfig_free(keyconf); | ||||
| } | } | ||||
| BLI_freelistN(&wm->queue); | BLI_freelistN(&wm->queue); | ||||
| if (wm->message_bus != NULL) { | |||||
| WM_msgbus_destroy(wm->message_bus); | |||||
| } | |||||
| BLI_freelistN(&wm->paintcursors); | BLI_freelistN(&wm->paintcursors); | ||||
| WM_drag_free_list(&wm->drags); | WM_drag_free_list(&wm->drags); | ||||
| wm_reports_free(wm); | wm_reports_free(wm); | ||||
| if (C && CTX_wm_manager(C) == wm) CTX_wm_manager_set(C, NULL); | if (C && CTX_wm_manager(C) == wm) CTX_wm_manager_set(C, NULL); | ||||
| } | } | ||||
| Show All 36 Lines | |||||