diff options
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/WM_api.h | 1 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 5 |
2 files changed, 5 insertions, 1 deletions
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; |