diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-08-12 02:19:22 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-08-12 02:19:22 +0300 |
commit | bac1279b031f9b3996c4691e948d941e4dcfaea1 (patch) | |
tree | 5ee45578e8ddba2c98304faf7ec2eef80caf4f90 /source/blender/windowmanager | |
parent | f3bff6a1a1cb05bcc6a540461f7a282da7bb3dae (diff) |
Fix T49045: splash not working correctly on OS X, after recent bugfix.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 425287993d9..2d43c47679d 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -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_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); + WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL); + WM_event_add_notifier(C, NC_WINDOW | NA_EDITED, NULL); + } break; } |