summaryrefslogtreecommitdiffstats
path: root/servers
diff options
context:
space:
mode:
authorAlvin Wong <alvinhochun@gmail.com>2024-07-25 00:20:31 +0800
committerAlvin Wong <alvinhochun@gmail.com>2024-07-25 00:27:27 +0800
commit97aa278edbade56e0554c97fc03cd8ea20282c62 (patch)
treea2ee0aa0f6edb9561f25286e0ebe3cf09220a56a /servers
parent91eb688e178fe32f28aebfbec01137abefd75413 (diff)
downloadredot-engine-97aa278edbade56e0554c97fc03cd8ea20282c62.tar.gz
Pass window exclusive and transient properties for subwindow creation
On Windows this allows to avoid having to change the owner of the window after it has been created, which in rare circumstances may cause the window to bug out.
Diffstat (limited to 'servers')
-rw-r--r--servers/display_server.cpp2
-rw-r--r--servers/display_server.h2
-rw-r--r--servers/display_server_headless.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/servers/display_server.cpp b/servers/display_server.cpp
index d362a4073a..5451057645 100644
--- a/servers/display_server.cpp
+++ b/servers/display_server.cpp
@@ -570,7 +570,7 @@ int DisplayServer::get_screen_from_rect(const Rect2 &p_rect) const {
return pos_screen;
}
-DisplayServer::WindowID DisplayServer::create_sub_window(WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Rect2i &p_rect) {
+DisplayServer::WindowID DisplayServer::create_sub_window(WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Rect2i &p_rect, bool p_exclusive, WindowID p_transient_parent) {
ERR_FAIL_V_MSG(INVALID_WINDOW_ID, "Sub-windows not supported by this display server.");
}
diff --git a/servers/display_server.h b/servers/display_server.h
index 8c7e92fdc3..d0fe76faff 100644
--- a/servers/display_server.h
+++ b/servers/display_server.h
@@ -396,7 +396,7 @@ public:
WINDOW_FLAG_MOUSE_PASSTHROUGH_BIT = (1 << WINDOW_FLAG_MOUSE_PASSTHROUGH),
};
- virtual WindowID create_sub_window(WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Rect2i &p_rect = Rect2i());
+ virtual WindowID create_sub_window(WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Rect2i &p_rect = Rect2i(), bool p_exclusive = false, WindowID p_transient_parent = INVALID_WINDOW_ID);
virtual void show_window(WindowID p_id);
virtual void delete_sub_window(WindowID p_id);
diff --git a/servers/display_server_headless.h b/servers/display_server_headless.h
index 60422c16cc..a5277479ca 100644
--- a/servers/display_server_headless.h
+++ b/servers/display_server_headless.h
@@ -85,7 +85,7 @@ public:
Vector<DisplayServer::WindowID> get_window_list() const override { return Vector<DisplayServer::WindowID>(); }
- WindowID create_sub_window(WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Rect2i &p_rect = Rect2i()) override { return 0; }
+ WindowID create_sub_window(WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Rect2i &p_rect = Rect2i(), bool p_exclusive = false, WindowID p_transient_parent = INVALID_WINDOW_ID) override { return 0; }
void show_window(WindowID p_id) override {}
void delete_sub_window(WindowID p_id) override {}