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:
authorChristian Rauch <Rauch.Christian@gmx.de>2020-05-30 14:23:39 +0300
committerChristian Rauch <Rauch.Christian@gmx.de>2020-05-30 14:23:39 +0300
commit63bcee81f6241e8bdd607ad6398569b9ad4aaa2f (patch)
tree8cbdf891a7947503242eb5c0e81065663e4c69f2 /intern/ghost
parent2ee94c954d6700a45fde320f330964bcf1888545 (diff)
GHOST/wayland: use 'is_dialog' flag to prevent drawing into same window
Diffstat (limited to 'intern/ghost')
-rw-r--r--intern/ghost/intern/GHOST_SystemWayland.cpp3
-rw-r--r--intern/ghost/intern/GHOST_WindowWayland.cpp9
-rw-r--r--intern/ghost/intern/GHOST_WindowWayland.h3
3 files changed, 14 insertions, 1 deletions
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;