summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2020-06-29 12:31:36 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2020-09-17 12:36:18 +0300
commit6a14c72b12e7cb5331d93fcc0c4dd26bef0c280b (patch)
tree0271e1435459fe7d6f5ff09fe9ffc892377f4010 /servers
parentfdfcce1c03f1c5fd1de2dc637c947a7a91e4021b (diff)
Add window click-through support.
Diffstat (limited to 'servers')
-rw-r--r--servers/display_server.cpp5
-rw-r--r--servers/display_server.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/servers/display_server.cpp b/servers/display_server.cpp
index 8f6d6d3b99..356f4b884a 100644
--- a/servers/display_server.cpp
+++ b/servers/display_server.cpp
@@ -194,6 +194,10 @@ void DisplayServer::delete_sub_window(WindowID p_id) {
ERR_FAIL_MSG("Sub-windows not supported by this display server.");
}
+void DisplayServer::window_set_mouse_passthrough(const Vector<Vector2> &p_region, WindowID p_window) {
+ ERR_FAIL_MSG("Mouse passthrough not supported by this display server.");
+}
+
void DisplayServer::window_set_ime_active(const bool p_active, WindowID p_window) {
WARN_PRINT("IME not supported by this display server.");
}
@@ -412,6 +416,7 @@ void DisplayServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("delete_sub_window", "window_id"), &DisplayServer::delete_sub_window);
ClassDB::bind_method(D_METHOD("window_set_title", "title", "window_id"), &DisplayServer::window_set_title, DEFVAL(MAIN_WINDOW_ID));
+ ClassDB::bind_method(D_METHOD("window_set_mouse_passthrough", "region", "window_id"), &DisplayServer::window_set_mouse_passthrough, DEFVAL(MAIN_WINDOW_ID));
ClassDB::bind_method(D_METHOD("window_get_current_screen", "window_id"), &DisplayServer::window_get_current_screen, DEFVAL(MAIN_WINDOW_ID));
ClassDB::bind_method(D_METHOD("window_set_current_screen", "screen", "window_id"), &DisplayServer::window_set_current_screen, DEFVAL(MAIN_WINDOW_ID));
diff --git a/servers/display_server.h b/servers/display_server.h
index b652418244..3ee0da709b 100644
--- a/servers/display_server.h
+++ b/servers/display_server.h
@@ -247,6 +247,8 @@ public:
virtual void window_set_title(const String &p_title, WindowID p_window = MAIN_WINDOW_ID) = 0;
+ virtual void window_set_mouse_passthrough(const Vector<Vector2> &p_region, WindowID p_window = MAIN_WINDOW_ID);
+
virtual int window_get_current_screen(WindowID p_window = MAIN_WINDOW_ID) const = 0;
virtual void window_set_current_screen(int p_screen, WindowID p_window = MAIN_WINDOW_ID) = 0;