diff options
author | Harley Acheson <harley.acheson@gmail.com> | 2021-02-10 03:14:31 +0300 |
---|---|---|
committer | Harley Acheson <harley.acheson@gmail.com> | 2021-02-10 03:14:31 +0300 |
commit | 1c4ae8a11c820e33da725816d7cccb2668680e51 (patch) | |
tree | a073665ca1d502e12ea90eeba3a9f1064aa01c39 /source/blender | |
parent | 5bddfde217b1477c02de9dcfa8c078969d432519 (diff) |
UI: Removal of GHOST_CreateDialogWindow
Simplification of window creation code to allow greater flexibility.
Differential Revision: https://developer.blender.org/D10311
Reviewed by Brecht Van Lommel
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/windowmanager/intern/wm_playanim.c | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 43 |
2 files changed, 13 insertions, 32 deletions
diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c index 60bcb687dbf..1b1ebc70fd9 100644 --- a/source/blender/windowmanager/intern/wm_playanim.c +++ b/source/blender/windowmanager/intern/wm_playanim.c @@ -1097,6 +1097,7 @@ static void playanim_window_open(const char *title, int posx, int posy, int size posy = (scr_h - posy - sizey); g_WS.ghost_window = GHOST_CreateWindow(g_WS.ghost_system, + NULL, title, posx, posy, @@ -1104,6 +1105,7 @@ static void playanim_window_open(const char *title, int posx, int posy, int size sizey, /* could optionally start fullscreen */ GHOST_kWindowStateNormal, + false, GHOST_kDrawingContextTypeOpenGL, glsettings); } diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index c4b50f1c889..6433cd7d12d 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -560,14 +560,6 @@ static void wm_window_ghostwindow_add(wmWindowManager *wm, wmWindow *win, bool is_dialog) { - /* On Windows, if there is a parent window then force is_dialog. Otherwise the parent - handle is not used in window creation and they do not stay on top of parents. */ -#ifdef WIN32 - if (win->parent) { - is_dialog = true; - } -#endif - /* a new window is created when pageflip mode is required for a window */ GHOST_GLSettings glSettings = {0}; if (win->stereo3d_format->display_mode == S3D_DISPLAY_PAGEFLIP) { @@ -586,30 +578,17 @@ static void wm_window_ghostwindow_add(wmWindowManager *wm, wmWindow *prev_windrawable = wm->windrawable; wm_window_clear_drawable(wm); - GHOST_WindowHandle ghostwin; - if (is_dialog && win->parent) { - ghostwin = GHOST_CreateDialogWindow(g_system, - win->parent->ghostwin, - title, - win->posx, - posy, - win->sizex, - win->sizey, - (GHOST_TWindowState)win->windowstate, - GHOST_kDrawingContextTypeOpenGL, - glSettings); - } - else { - ghostwin = GHOST_CreateWindow(g_system, - title, - win->posx, - posy, - win->sizex, - win->sizey, - (GHOST_TWindowState)win->windowstate, - GHOST_kDrawingContextTypeOpenGL, - glSettings); - } + GHOST_WindowHandle ghostwin = GHOST_CreateWindow(g_system, + (win->parent) ? win->parent->ghostwin : NULL, + title, + win->posx, + posy, + win->sizex, + win->sizey, + (GHOST_TWindowState)win->windowstate, + is_dialog, + GHOST_kDrawingContextTypeOpenGL, + glSettings); if (ghostwin) { win->gpuctx = GPU_context_create(ghostwin); |