diff options
Diffstat (limited to 'source/blender/editors/screen/screen_edit.c')
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 02b1e002d86..841792d5f2d 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -57,6 +57,7 @@ #include "UI_interface.h" #include "WM_message.h" +#include "WM_toolsystem.h" #include "DEG_depsgraph_query.h" @@ -645,10 +646,14 @@ void ED_screen_refresh(wmWindowManager *wm, wmWindow *win) { bScreen *screen = WM_window_get_active_screen(win); - /* exception for bg mode, we only need the screen context */ + /* Exception for background mode, we only need the screen context. */ if (!G.background) { - /* header size depends on DPI, let's verify */ - WM_window_set_dpi(win); + + /* Called even when creating the ghost window fails in #WM_window_open. */ + if (win->ghostwin) { + /* Header size depends on DPI, let's verify. */ + WM_window_set_dpi(win); + } ED_screen_global_areas_refresh(win); @@ -686,7 +691,7 @@ void ED_screens_init(Main *bmain, wmWindowManager *wm) ED_screen_refresh(wm, win); if (win->eventstate) { - ED_screen_set_active_region(NULL, win, &win->eventstate->x); + ED_screen_set_active_region(NULL, win, win->eventstate->xy); } } @@ -959,7 +964,7 @@ int ED_screen_area_active(const bContext *C) ScrArea *area = CTX_wm_area(C); if (win && screen && area) { - AZone *az = ED_area_actionzone_find_xy(area, &win->eventstate->x); + AZone *az = ED_area_actionzone_find_xy(area, win->eventstate->xy); if (az && az->type == AZONE_REGION) { return 1; @@ -1235,7 +1240,10 @@ static void screen_set_3dview_camera(Scene *scene, } } -void ED_screen_scene_change(bContext *C, wmWindow *win, Scene *scene) +void ED_screen_scene_change(bContext *C, + wmWindow *win, + Scene *scene, + const bool refresh_toolsystem) { #if 0 ViewLayer *view_layer_old = WM_window_get_active_view_layer(win); @@ -1273,6 +1281,10 @@ void ED_screen_scene_change(bContext *C, wmWindow *win, Scene *scene) } } } + + if (refresh_toolsystem) { + WM_toolsystem_refresh_screen_window(win); + } } ScrArea *ED_screen_full_newspace(bContext *C, ScrArea *area, int type) |