Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarley Acheson <harley.acheson@gmail.com>2021-02-10 03:14:31 +0300
committerHarley Acheson <harley.acheson@gmail.com>2021-02-10 03:14:31 +0300
commit1c4ae8a11c820e33da725816d7cccb2668680e51 (patch)
treea073665ca1d502e12ea90eeba3a9f1064aa01c39 /source/blender/windowmanager/intern/wm_window.c
parent5bddfde217b1477c02de9dcfa8c078969d432519 (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/windowmanager/intern/wm_window.c')
-rw-r--r--source/blender/windowmanager/intern/wm_window.c43
1 files changed, 11 insertions, 32 deletions
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);