Commit: d045feca5bd89854171d531d81c3778aac06810a
Author: Julian Eisel
Date:   Tue Mar 28 23:33:13 2017 +0200
Branches: workspaces
https://developer.blender.org/rBd045feca5bd89854171d531d81c3778aac06810a

Merge branch 'blender2.8' into workspaces

Conflicts:
        source/blender/blenloader/intern/readfile.c
        source/blender/makesrna/intern/rna_userdef.c
        source/blender/windowmanager/intern/wm_window.c

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



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

diff --cc source/blender/blenloader/intern/readfile.c
index 0f62314047e,4309bc071b7..394575eb538
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@@ -6461,13 -6344,11 +6458,14 @@@ static void lib_link_windowmanager(File
        
        for (wm = main->wm.first; wm; wm = wm->id.next) {
                if (wm->id.tag & LIB_TAG_NEED_LINK) {
 -                      /* Note: WM IDProperties are never written to file, 
hence no need to read/link them here. */
                        for (win = wm->windows.first; win; win = win->next) {
++                              /* Note: WM IDProperties are never written to 
file, hence no need to read/link them here. */
 +                              win->scene = newlibadr(fd, wm->id.lib, 
win->scene);
 +                              lib_link_workspace_instance_hook(fd, 
win->workspace_hook, &wm->id);
 +                              /* deprecated, but needed for versioning (will 
be NULL'ed then) */
                                win->screen = newlibadr(fd, NULL, win->screen);
                        }
 -                      
 +
                        wm->id.tag &= ~LIB_TAG_NEED_LINK;
                }
        }
@@@ -6546,16 -6426,18 +6543,14 @@@ static void direct_link_gpencil(FileDat
   * check lib pointers in call below */
  static void lib_link_screen(FileData *fd, Main *main)
  {
-       bScreen *sc;
-       ScrArea *sa;
-       
-       for (sc = main->screen.first; sc; sc = sc->id.next) {
+       for (bScreen *sc = main->screen.first; sc; sc = sc->id.next) {
                if (sc->id.tag & LIB_TAG_NEED_LINK) {
+                       IDP_LibLinkProperty(sc->id.properties, (fd->flags & 
FD_FLAGS_SWITCH_ENDIAN), fd);
                        id_us_ensure_real(&sc->id);
  
 +                      /* deprecated, but needed for versioning (will be 
NULL'ed then) */
                        sc->scene = newlibadr(fd, sc->id.lib, sc->scene);
  
 -                      /* this should not happen, but apparently it does 
somehow. Until we figure out the cause,
 -                       * just assign first available scene */
 -                      if (!sc->scene)
 -                              sc->scene = main->scene.first;
 -
                        sc->animtimer = NULL; /* saved in rare cases */
                        sc->scrubbing = false;
                        
@@@ -8719,11 -8593,8 +8731,9 @@@ static void lib_link_all(FileData *fd, 
        lib_link_linestyle(fd, main);
        lib_link_gpencil(fd, main);
        lib_link_cachefiles(fd, main);
 +      lib_link_workspaces(fd, main);
  
-       lib_link_mesh(fd, main);                /* as last: tpage images with 
users at zero */
-       
-       lib_link_library(fd, main);             /* only init users */
+       lib_link_library(fd, main);    /* only init users */
  }
  
  static void direct_link_keymapitem(FileData *fd, wmKeyMapItem *kmi)
diff --cc source/blender/windowmanager/intern/wm_window.c
index 27b6b35c93b,49fe3a1d015..d534d1939e8
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@@ -684,11 -691,8 +707,10 @@@ wmWindow *WM_window_open_temp(bContext 
                win->posy = rect.ymin;
        }
  
 +      screen = WM_window_get_active_screen(win);
 +
-       /* multiply with virtual pixelsize, ghost handles native one (e.g. for 
retina) */
-       win->sizex = BLI_rcti_size_x(&rect) * px_virtual;
-       win->sizey = BLI_rcti_size_y(&rect) * px_virtual;
+       win->sizex = BLI_rcti_size_x(&rect);
+       win->sizey = BLI_rcti_size_y(&rect);
  
        if (win->ghostwin) {
                wm_window_set_size(win, win->sizex, win->sizey);
@@@ -1177,8 -1143,10 +1198,10 @@@ static int ghost_event_proc(GHOST_Event
  
                                /* stop screencast if resize */
                                if (type == GHOST_kEventWindowSize) {
 -                                      WM_jobs_stop(wm, win->screen, NULL);
 +                                      WM_jobs_stop(wm, 
WM_window_get_active_screen(win), NULL);
                                }
+ 
+                               wm_window_set_dpi(win);
                                
                                /* win32: gives undefined window size when 
minimized */
                                if (state != GHOST_kWindowStateMinimized) {
@@@ -1265,7 -1231,19 +1288,19 @@@
                                }
                                break;
                        }
-                               
+ 
+                       case GHOST_kEventWindowDPIHintChanged:
+                       {
+                               wm_window_set_dpi(win);
+                               /* font's are stored at each DPI level, without 
this we can easy load 100's of fonts */
+                               BLF_cache_clear();
+ 
+                               BKE_blender_userdef_refresh();
+                               WM_main_add_notifier(NC_WINDOW, NULL);      /* 
full redraw */
 -                              WM_main_add_notifier(NC_SCREEN | NA_EDITED, 
NULL);    /* refresh region sizes */
++                              WM_main_add_notifier(NC_WORKSPACE | NA_EDITED, 
NULL);    /* refresh region sizes */
+                               break;
+                       }
+ 
                        case GHOST_kEventOpenMainFile:
                        {
                                PointerRNA props_ptr;
@@@ -1346,11 -1324,10 +1381,10 @@@
                        {
                                // only update if the actual pixel size changes
                                float prev_pixelsize = U.pixelsize;
-                               U.pixelsize = wm_window_pixelsize(win);
+                               wm_window_set_dpi(win);
  
                                if (U.pixelsize != prev_pixelsize) {
-                                       BKE_blender_userdef_refresh();
 -                                      
BKE_icon_changed(win->screen->id.icon_id);
 +                                      
BKE_icon_changed(WM_window_get_active_screen(win)->id.icon_id);
  
                                        // close all popups since they are 
positioned with the pixel
                                        // size baked in and it's difficult to 
correct them

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to