Merge branch 'master' into blender2.8
[blender.git] / source / blender / windowmanager / intern / wm.c
index 9100e47d820b21933d403a95a0691508562b2f17..6a42bf26a97b59a0be5f51cd7e1dee3935fca3b8 100644 (file)
@@ -106,7 +106,7 @@ void WM_operator_free(wmOperator *op)
                        WM_operator_free(opm);
                }
        }
-       
+
        MEM_freeN(op);
 }
 
@@ -192,11 +192,11 @@ void wm_operator_register(bContext *C, wmOperator *op)
 void WM_operator_stack_clear(wmWindowManager *wm)
 {
        wmOperator *op;
-       
+
        while ((op = BLI_pophead(&wm->operators))) {
                WM_operator_free(op);
        }
-       
+
        WM_main_add_notifier(NC_WM | ND_HISTORY, NULL);
 }
 
@@ -372,7 +372,7 @@ void WM_keymap_init(bContext *C)
                wm->addonconf = WM_keyconfig_new(wm, "Blender Addon");
        if (!wm->userconf)
                wm->userconf = WM_keyconfig_new(wm, "Blender User");
-       
+
        /* initialize only after python init is done, for keymaps that
         * use python operators */
        if (CTX_py_init_get(C) && (wm->initialized & WM_KEYMAP_IS_INITIALIZED) == 0) {
@@ -396,7 +396,7 @@ void WM_check(bContext *C)
 {
        Main *bmain = CTX_data_main(C);
        wmWindowManager *wm = CTX_wm_manager(C);
-       
+
        /* wm context */
        if (wm == NULL) {
                wm = CTX_data_main(C)->wm.first;
@@ -434,7 +434,7 @@ void wm_clear_default_size(bContext *C)
 {
        wmWindowManager *wm = CTX_wm_manager(C);
        wmWindow *win;
-       
+
        /* wm context */
        if (wm == NULL) {
                wm = CTX_data_main(C)->wm.first;
@@ -444,7 +444,7 @@ void wm_clear_default_size(bContext *C)
        if (wm == NULL || BLI_listbase_is_empty(&wm->windows)) {
                return;
        }
-       
+
        for (win = wm->windows.first; win; win = win->next) {
                win->sizex = 0;
                win->sizey = 0;
@@ -490,7 +490,7 @@ void wm_close_and_free(bContext *C, wmWindowManager *wm)
                WM_window_set_active_workspace(win, NULL); /* prevent draw clear to use screen */
                wm_window_free(C, wm, win);
        }
-       
+
        while ((op = BLI_pophead(&wm->operators))) {
                WM_operator_free(op);
        }
@@ -508,7 +508,7 @@ void wm_close_and_free(bContext *C, wmWindowManager *wm)
        BLI_freelistN(&wm->paintcursors);
 
        WM_drag_free_list(&wm->drags);
-       
+
        wm_reports_free(wm);
 
        if (wm->undo_stack) {
@@ -538,16 +538,16 @@ void WM_main(bContext *C)
        wm_event_do_refresh_wm_and_depsgraph(C);
 
        while (1) {
-               
+
                /* get events from ghost, handle window events, add to window queues */
-               wm_window_process_events(C); 
-               
+               wm_window_process_events(C);
+
                /* per window, all events to the window, screen, area and region handlers */
                wm_event_do_handlers(C);
-               
+
                /* events have left notes about changes, we handle and cache it */
                wm_event_do_notifiers(C);
-               
+
                /* execute cached changes draw */
                wm_draw_update(C);
        }