[Bf-blender-cvs] [a6172fc6b09] override-recursive-resync: Render Window as Non-Child on Win32 platform

Harley Acheson noreply at git.blender.org
Mon Jun 14 16:35:01 CEST 2021


Commit: a6172fc6b09e16b62591d778edbf59641ea96abd
Author: Harley Acheson
Date:   Fri Jun 11 13:05:34 2021 -0700
Branches: override-recursive-resync
https://developer.blender.org/rBa6172fc6b09e16b62591d778edbf59641ea96abd

Render Window as Non-Child on Win32 platform

This patch makes the "Render" window a top-level window, not a child of
the main window, which was the case in blender versions prior to 2.93.
This means it is no longer "on top", nor is the icon grouped on the
taskbar in the same way, but you can Alt-Tab between it and the main
window. This change only affects the Windows platform as the other
platforms behave this way.

See D11576 for links to negative feedback that prompts this change.

Differential Revision: https://developer.blender.org/D11576

Reviewed by Brecht Van Lommel

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

M	source/blender/editors/render/render_view.c
M	source/blender/editors/screen/screen_edit.c
M	source/blender/editors/screen/screen_ops.c
M	source/blender/windowmanager/WM_api.h
M	source/blender/windowmanager/intern/wm_window.c

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

diff --git a/source/blender/editors/render/render_view.c b/source/blender/editors/render/render_view.c
index 465438f814a..eb4a040e891 100644
--- a/source/blender/editors/render/render_view.c
+++ b/source/blender/editors/render/render_view.c
@@ -164,6 +164,7 @@ ScrArea *render_view_open(bContext *C, int mx, int my, ReportList *reports)
                        sizex,
                        sizey,
                        SPACE_IMAGE,
+                       true,
                        false,
                        true,
                        WIN_ALIGN_LOCATION_CENTER) == NULL) {
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 6fb5f33d836..6cb184a3394 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -1585,6 +1585,7 @@ ScrArea *ED_screen_temp_space_open(bContext *C,
                          sizex,
                          sizey,
                          (int)space_type,
+                         false,
                          dialog,
                          true,
                          WIN_ALIGN_LOCATION_CENTER)) {
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index b41b54fee1f..373bde99e24 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -1362,6 +1362,7 @@ static int area_dupli_invoke(bContext *C, wmOperator *op, const wmEvent *event)
                                     area->winx,
                                     area->winy,
                                     SPACE_EMPTY,
+                                    false,
                                     true,
                                     false,
                                     WIN_ALIGN_ABSOLUTE);
@@ -4955,6 +4956,7 @@ static int userpref_show_exec(bContext *C, wmOperator *op)
                      sizey,
                      SPACE_USERPREF,
                      false,
+                     false,
                      true,
                      WIN_ALIGN_LOCATION_CENTER) != NULL) {
     /* The header only contains the editor switcher and looks empty.
@@ -5021,6 +5023,7 @@ static int drivers_editor_show_exec(bContext *C, wmOperator *op)
                      sizey,
                      SPACE_GRAPH,
                      false,
+                     false,
                      true,
                      WIN_ALIGN_LOCATION_CENTER) != NULL) {
     ED_drivers_editor_init(C, CTX_wm_area(C));
@@ -5089,6 +5092,7 @@ static int info_log_show_exec(bContext *C, wmOperator *op)
                      sizey,
                      SPACE_INFO,
                      false,
+                     false,
                      true,
                      WIN_ALIGN_LOCATION_CENTER) != NULL) {
     return OPERATOR_FINISHED;
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index eebd6e16dd7..3525502a6dc 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -190,6 +190,7 @@ struct wmWindow *WM_window_open(struct bContext *C,
                                 int sizex,
                                 int sizey,
                                 int space_type,
+                                bool toplevel,
                                 bool dialog,
                                 bool temp,
                                 WindowAlignment alignment);
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index cdd5ea12df8..f55dc886950 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -756,6 +756,7 @@ static bool wm_window_update_size_position(wmWindow *win)
 
 /**
  * \param space_type: SPACE_VIEW3D, SPACE_INFO, ... (eSpace_Type)
+ * \param toplevel: Not a child owned by other windows. A peer of main window.
  * \param dialog: whether this should be made as a dialog-style window
  * \param temp: whether this is considered a short-lived window
  * \param alignment: how this window is positioned relative to its parent
@@ -768,6 +769,7 @@ wmWindow *WM_window_open(bContext *C,
                          int sizex,
                          int sizey,
                          int space_type,
+                         bool toplevel,
                          bool dialog,
                          bool temp,
                          WindowAlignment alignment)
@@ -822,7 +824,7 @@ wmWindow *WM_window_open(bContext *C,
 
   /* add new window? */
   if (win == NULL) {
-    win = wm_window_new(bmain, wm, win_prev, dialog);
+    win = wm_window_new(bmain, wm, toplevel ? NULL : win_prev, dialog);
     win->posx = rect.xmin;
     win->posy = rect.ymin;
     *win->stereo3d_format = *win_prev->stereo3d_format;
@@ -925,6 +927,7 @@ int wm_window_new_exec(bContext *C, wmOperator *UNUSED(op))
                             area->spacetype,
                             false,
                             false,
+                            false,
                             WIN_ALIGN_PARENT_CENTER) != NULL);
 
   return ok ? OPERATOR_FINISHED : OPERATOR_CANCELLED;



More information about the Bf-blender-cvs mailing list