Fix T49045: splash not working correctly on OS X, after recent bugfix.
This commit is contained in:
parent
f3bff6a1a1
commit
bac1279b03
Notes:
blender-bot
2023-02-14 07:42:04 +01:00
Referenced by issue #49117, Frame counter while rendering does not respect blender's DPI setting Referenced by issue #49087, Alembic Realflow problem Referenced by issue #49045, Splash screen only shows up very quickly Referenced by issue #49046, Big speed regression in the OpenCL kernel (between 50% and 6x slower)
|
@ -1197,23 +1197,26 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr
|
|||
}
|
||||
case GHOST_kEventNativeResolutionChange:
|
||||
{
|
||||
// printf("change, pixel size %f\n", GHOST_GetNativePixelSize(win->ghostwin));
|
||||
|
||||
// only update if the actual pixel size changes
|
||||
float prev_pixelsize = U.pixelsize;
|
||||
U.pixelsize = wm_window_pixelsize(win);
|
||||
BKE_blender_userdef_refresh();
|
||||
|
||||
// close all popups since they are positioned with the pixel
|
||||
// size baked in and it's difficult to correct them
|
||||
wmWindow *oldWindow = CTX_wm_window(C);
|
||||
CTX_wm_window_set(C, win);
|
||||
UI_popup_handlers_remove_all(C, &win->modalhandlers);
|
||||
CTX_wm_window_set(C, oldWindow);
|
||||
if (U.pixelsize != prev_pixelsize) {
|
||||
BKE_blender_userdef_refresh();
|
||||
|
||||
wm_window_make_drawable(wm, win);
|
||||
wm_draw_window_clear(win);
|
||||
// close all popups since they are positioned with the pixel
|
||||
// size baked in and it's difficult to correct them
|
||||
wmWindow *oldWindow = CTX_wm_window(C);
|
||||
CTX_wm_window_set(C, win);
|
||||
UI_popup_handlers_remove_all(C, &win->modalhandlers);
|
||||
CTX_wm_window_set(C, oldWindow);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL);
|
||||
WM_event_add_notifier(C, NC_WINDOW | NA_EDITED, NULL);
|
||||
wm_window_make_drawable(wm, win);
|
||||
wm_draw_window_clear(win);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL);
|
||||
WM_event_add_notifier(C, NC_WINDOW | NA_EDITED, NULL);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue