Commit: 63bcee81f6241e8bdd607ad6398569b9ad4aaa2f Author: Christian Rauch Date: Sat May 30 12:23:39 2020 +0100 Branches: master https://developer.blender.org/rB63bcee81f6241e8bdd607ad6398569b9ad4aaa2f
GHOST/wayland: use 'is_dialog' flag to prevent drawing into same window =================================================================== M intern/ghost/intern/GHOST_SystemWayland.cpp M intern/ghost/intern/GHOST_WindowWayland.cpp M intern/ghost/intern/GHOST_WindowWayland.h =================================================================== diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp index 633451feb85..31110694ea6 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cpp +++ b/intern/ghost/intern/GHOST_SystemWayland.cpp @@ -1527,7 +1527,7 @@ GHOST_IWindow *GHOST_SystemWayland::createWindow(const char *title, GHOST_TDrawingContextType type, GHOST_GLSettings glSettings, const bool exclusive, - const bool /*is_dialog*/, + const bool is_dialog, const GHOST_IWindow *parentWindow) { GHOST_WindowWayland *window = new GHOST_WindowWayland( @@ -1540,6 +1540,7 @@ GHOST_IWindow *GHOST_SystemWayland::createWindow(const char *title, state, parentWindow, type, + is_dialog, ((glSettings.flags & GHOST_glStereoVisual) != 0), exclusive); diff --git a/intern/ghost/intern/GHOST_WindowWayland.cpp b/intern/ghost/intern/GHOST_WindowWayland.cpp index 0ea6f5f8ecb..ef02db7abc3 100644 --- a/intern/ghost/intern/GHOST_WindowWayland.cpp +++ b/intern/ghost/intern/GHOST_WindowWayland.cpp @@ -39,6 +39,7 @@ struct window_t { bool is_maximised; bool is_fullscreen; bool is_active; + bool is_dialog; int32_t width, height; }; @@ -144,6 +145,7 @@ GHOST_WindowWayland::GHOST_WindowWayland(GHOST_SystemWayland *system, GHOST_TWindowState state, const GHOST_IWindow *parentWindow, GHOST_TDrawingContextType type, + const bool is_dialog, const bool stereoVisual, const bool exclusive) : GHOST_Window(width, height, state, stereoVisual, exclusive), @@ -155,6 +157,8 @@ GHOST_WindowWayland::GHOST_WindowWayland(GHOST_SystemWayland *system, w->width = int32_t(width); w->height = int32_t(height); + w->is_dialog = is_dialog; + /* Window surfaces. */ w->surface = wl_compositor_create_surface(m_system->compositor()); w->egl_window = wl_egl_window_create(w->surface, int(width), int(height)); @@ -376,6 +380,11 @@ GHOST_TSuccess GHOST_WindowWayland::endFullScreen() const return GHOST_kSuccess; } +bool GHOST_WindowWayland::isDialog() const +{ + return w->is_dialog; +} + /** * \param type The type of rendering context create. * \return Indication of success. diff --git a/intern/ghost/intern/GHOST_WindowWayland.h b/intern/ghost/intern/GHOST_WindowWayland.h index 39c35f77d7d..23e55fcd6e4 100644 --- a/intern/ghost/intern/GHOST_WindowWayland.h +++ b/intern/ghost/intern/GHOST_WindowWayland.h @@ -42,6 +42,7 @@ class GHOST_WindowWayland : public GHOST_Window { GHOST_TWindowState state, const GHOST_IWindow *parentWindow, GHOST_TDrawingContextType type, + const bool is_dialog, const bool stereoVisual, const bool exclusive); @@ -106,6 +107,8 @@ class GHOST_WindowWayland : public GHOST_Window { GHOST_TSuccess endFullScreen() const override; + bool isDialog() const override; + private: GHOST_SystemWayland *m_system; struct window_t *w; _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs