[Bf-blender-cvs] [bac1279] master: Fix T49045: splash not working correctly on OS X, after recent bugfix.

Brecht Van Lommel noreply at git.blender.org
Fri Aug 12 01:21:01 CEST 2016


Commit: bac1279b031f9b3996c4691e948d941e4dcfaea1
Author: Brecht Van Lommel
Date:   Fri Aug 12 01:19:22 2016 +0200
Branches: master
https://developer.blender.org/rBbac1279b031f9b3996c4691e948d941e4dcfaea1

Fix T49045: splash not working correctly on OS X, after recent bugfix.

===================================================================

M	source/blender/windowmanager/intern/wm_window.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 4252879..2d43c47 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;
 			}




More information about the Bf-blender-cvs mailing list