From a3e31a5317aad7934a982a325f571e5188d3fa08 Mon Sep 17 00:00:00 2001 From: Arlo Phoenix Date: Sun, 2 Jun 2024 00:54:07 +0200 Subject: [PATCH] Add multiple polygon passthrough regions --- doc/classes/DisplayServer.xml | 4 +-- doc/classes/Window.xml | 2 +- .../4.2-stable.expected | 10 +++++++ .../wayland/display_server_wayland.cpp | 2 +- .../linuxbsd/wayland/display_server_wayland.h | 2 +- platform/linuxbsd/x11/display_server_x11.cpp | 20 ++++++------- platform/linuxbsd/x11/display_server_x11.h | 4 +-- platform/macos/display_server_macos.h | 4 +-- platform/macos/display_server_macos.mm | 12 ++++---- platform/windows/display_server_windows.cpp | 28 ++++++++++--------- platform/windows/display_server_windows.h | 4 +-- scene/main/window.cpp | 18 ++++++------ scene/main/window.h | 6 ++-- servers/display_server.cpp | 4 +-- servers/display_server.h | 2 +- servers/display_server_headless.h | 3 +- 16 files changed, 70 insertions(+), 55 deletions(-) diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index 9d1048f56631..3d706a51739f 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -1657,9 +1657,9 @@ [b]Note:[/b] Setting the window to full screen forcibly sets the borderless flag to [code]true[/code], so make sure to set it back to [code]false[/code] when not wanted. - + - + Sets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through. diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index 54750bfb1a65..2ae230adcc7e 100644 --- a/doc/classes/Window.xml +++ b/doc/classes/Window.xml @@ -619,7 +619,7 @@ [b]Note:[/b] This property is implemented on Linux (X11), macOS and Windows. [b]Note:[/b] This property only works with native windows. - + Sets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through. Passing empty arrays to this and [member mouse_passthrough_rects] will disable passthrough support (all mouse events will be intercepted by the window, which is the default behavior). [codeblocks] diff --git a/misc/extension_api_validation/4.2-stable.expected b/misc/extension_api_validation/4.2-stable.expected index b27f80ee2935..b853086193e3 100644 --- a/misc/extension_api_validation/4.2-stable.expected +++ b/misc/extension_api_validation/4.2-stable.expected @@ -364,3 +364,13 @@ GH-92322 Validate extension JSON: Error: Field 'classes/EditorInspectorPlugin/methods/add_property_editor/arguments': size changed value in new API, from 3 to 4. Optional arguments added. Compatibility methods registered. + + +GH-88558 +-------- +Validate extension JSON: API was removed: classes/DisplayServer/methods/window_set_mouse_passthrough +Validate extension JSON: API was removed: classes/Window/methods/get_mouse_passthrough_polygon +Validate extension JSON: API was removed: classes/Window/methods/set_mouse_passthrough_polygon +Validate extension JSON: API was removed: classes/Window/properties/mouse_passthrough_polygon + +Replaced by mouse_passthrough_polygons. \ No newline at end of file diff --git a/platform/linuxbsd/wayland/display_server_wayland.cpp b/platform/linuxbsd/wayland/display_server_wayland.cpp index f8fcf395bb6e..c49d4e89603f 100644 --- a/platform/linuxbsd/wayland/display_server_wayland.cpp +++ b/platform/linuxbsd/wayland/display_server_wayland.cpp @@ -669,7 +669,7 @@ void DisplayServerWayland::window_set_title(const String &p_title, DisplayServer wayland_thread.window_set_title(MAIN_WINDOW_ID, wd.title); } -void DisplayServerWayland::window_set_mouse_passthrough(const Vector &p_region, DisplayServer::WindowID p_window_id) { +void DisplayServerWayland::window_set_mouse_passthrough_polygons(const TypedArray> &p_regions, DisplayServer::WindowID p_window_id) { ERR_FAIL_MSG("Mouse polygon passthrough not supported by wayland."); } diff --git a/platform/linuxbsd/wayland/display_server_wayland.h b/platform/linuxbsd/wayland/display_server_wayland.h index c99caee86158..b0e728fd74d8 100644 --- a/platform/linuxbsd/wayland/display_server_wayland.h +++ b/platform/linuxbsd/wayland/display_server_wayland.h @@ -215,7 +215,7 @@ class DisplayServerWayland : public DisplayServer { virtual ObjectID window_get_attached_instance_id(WindowID p_window_id = MAIN_WINDOW_ID) const override; virtual void window_set_title(const String &p_title, WindowID p_window_id = MAIN_WINDOW_ID) override; - virtual void window_set_mouse_passthrough(const Vector &p_region, WindowID p_window_id = MAIN_WINDOW_ID) override; + virtual void window_set_mouse_passthrough_polygons(const TypedArray> &p_regions, WindowID p_window_id = MAIN_WINDOW_ID) override; virtual void window_set_mouse_passthrough_rects(const TypedArray &p_rects, WindowID p_window = MAIN_WINDOW_ID) override; virtual void window_set_rect_changed_callback(const Callable &p_callable, WindowID p_window_id = MAIN_WINDOW_ID) override; diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp index a31d76c0f754..e7cbe4fb1d64 100644 --- a/platform/linuxbsd/x11/display_server_x11.cpp +++ b/platform/linuxbsd/x11/display_server_x11.cpp @@ -1868,11 +1868,11 @@ void DisplayServerX11::window_set_title(const String &p_title, WindowID p_window } } -void DisplayServerX11::window_set_mouse_passthrough(const Vector &p_region, WindowID p_window) { +void DisplayServerX11::window_set_mouse_passthrough_polygons(const TypedArray> &p_regions, WindowID p_window) { _THREAD_SAFE_METHOD_ ERR_FAIL_COND(!windows.has(p_window)); - windows[p_window].mpath = p_region; + windows[p_window].mregions = p_regions; _update_window_mouse_passthrough(p_window); } @@ -1902,25 +1902,25 @@ void DisplayServerX11::_update_window_mouse_passthrough(WindowID p_window) { } void DisplayServerX11::_update_window_input_region(WindowID p_window) { - const Vector ®ion_path = windows[p_window].mpath; + const TypedArray> ®ion_paths = windows[p_window].mregions; const TypedArray ®ion_rectangles = windows[p_window].mrects; - if (region_path.is_empty() && region_rectangles.is_empty()) { + if (region_paths.is_empty() && region_rectangles.is_empty()) { XShapeCombineMask(x11_display, windows[p_window].x11_window, ShapeInput, 0, 0, None, ShapeSet); } else { - Region input_region; + Region input_region = XCreateRegion(); - // apply polygon to input region - if (region_path.size()) { + // apply polygons to input region + for (int region_idx = 0; region_idx < region_paths.size(); region_idx++) { + const Vector ®ion_path = region_paths[region_idx]; XPoint *points = (XPoint *)memalloc(sizeof(XPoint) * region_path.size()); for (int i = 0; i < region_path.size(); i++) { points[i].x = region_path[i].x; points[i].y = region_path[i].y; } - input_region = XPolygonRegion(points, region_path.size(), EvenOddRule); + Region path_input_region = XPolygonRegion(points, region_path.size(), EvenOddRule); + XUnionRegion(input_region, path_input_region, input_region); memfree(points); - } else { - input_region = XCreateRegion(); } // add rectangles to input region diff --git a/platform/linuxbsd/x11/display_server_x11.h b/platform/linuxbsd/x11/display_server_x11.h index 6f495b8e0e50..67df278dd6e1 100644 --- a/platform/linuxbsd/x11/display_server_x11.h +++ b/platform/linuxbsd/x11/display_server_x11.h @@ -184,7 +184,7 @@ class DisplayServerX11 : public DisplayServer { Callable input_text_callback; Callable drop_files_callback; - Vector mpath; + TypedArray> mregions; TypedArray mrects; WindowID transient_parent = INVALID_WINDOW_ID; @@ -457,7 +457,7 @@ class DisplayServerX11 : public DisplayServer { virtual ObjectID window_get_attached_instance_id(WindowID p_window = MAIN_WINDOW_ID) const override; virtual void window_set_title(const String &p_title, WindowID p_window = MAIN_WINDOW_ID) override; - virtual void window_set_mouse_passthrough(const Vector &p_region, WindowID p_window = MAIN_WINDOW_ID) override; + virtual void window_set_mouse_passthrough_polygons(const TypedArray> &p_regions, WindowID p_window = MAIN_WINDOW_ID) override; virtual void window_set_mouse_passthrough_rects(const TypedArray &p_rects, WindowID p_window = MAIN_WINDOW_ID) override; virtual void window_set_rect_changed_callback(const Callable &p_callable, WindowID p_window = MAIN_WINDOW_ID) override; diff --git a/platform/macos/display_server_macos.h b/platform/macos/display_server_macos.h index 2bf3a5a85ffa..9768688622a8 100644 --- a/platform/macos/display_server_macos.h +++ b/platform/macos/display_server_macos.h @@ -86,7 +86,7 @@ class DisplayServerMacOS : public DisplayServer { id window_view; id window_button_view; - Vector mpath; + TypedArray> mregions; TypedArray mrects; Point2i mouse_pos; @@ -346,7 +346,7 @@ class DisplayServerMacOS : public DisplayServer { virtual void window_set_title(const String &p_title, WindowID p_window = MAIN_WINDOW_ID) override; virtual Size2i window_get_title_size(const String &p_title, WindowID p_window) const override; - virtual void window_set_mouse_passthrough(const Vector &p_region, WindowID p_window = MAIN_WINDOW_ID) override; + virtual void window_set_mouse_passthrough_polygons(const TypedArray> &p_regions, WindowID p_window = MAIN_WINDOW_ID) override; virtual void window_set_mouse_passthrough_rects(const TypedArray &p_rects, WindowID p_window = MAIN_WINDOW_ID) override; virtual int window_get_current_screen(WindowID p_window = MAIN_WINDOW_ID) const override; diff --git a/platform/macos/display_server_macos.mm b/platform/macos/display_server_macos.mm index a17676e10785..5067a18d2870 100644 --- a/platform/macos/display_server_macos.mm +++ b/platform/macos/display_server_macos.mm @@ -550,8 +550,10 @@ bool DisplayServerMacOS::_mouse_intersects_input_region(const WindowData &p_wd) const { const Point2i &mouse_pos = p_wd.mouse_pos; - if (Geometry2D::is_point_in_polygon(mouse_pos, p_wd.mpath)) { - return true; + for (int i = 0; i < p_wd.mregions.size(); i++) { + if (Geometry2D::is_point_in_polygon(mouse_pos, p_wd.mregions[i])) { + return true; + } } for (int i = 0; i < p_wd.mrects.size(); i++) { @@ -1862,13 +1864,13 @@ return size * scale; } -void DisplayServerMacOS::window_set_mouse_passthrough(const Vector &p_region, WindowID p_window) { +void DisplayServerMacOS::window_set_mouse_passthrough_polygons(const TypedArray> &p_regions, WindowID p_window) { _THREAD_SAFE_METHOD_ ERR_FAIL_COND(!windows.has(p_window)); WindowData &wd = windows[p_window]; - wd.mpath = p_region; + wd.mregions = p_regions; } void DisplayServerMacOS::window_set_mouse_passthrough_rects(const TypedArray &p_rects, WindowID p_window) { @@ -3059,7 +3061,7 @@ if (![wd.window_object ignoresMouseEvents]) { [wd.window_object setIgnoresMouseEvents:YES]; } - } else if (wd.mpath.size() > 0 || wd.mrects.size() > 0) { + } else if (wd.mregions.size() > 0 || wd.mrects.size() > 0) { update_mouse_pos(wd, [wd.window_object mouseLocationOutsideOfEventStream]); if (_mouse_intersects_input_region(wd)) { if ([wd.window_object ignoresMouseEvents]) { diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index 20355f5826be..342f4d5a1130 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -1576,11 +1576,11 @@ Size2i DisplayServerWindows::window_get_title_size(const String &p_title, Window return size; } -void DisplayServerWindows::window_set_mouse_passthrough(const Vector &p_region, WindowID p_window) { +void DisplayServerWindows::window_set_mouse_passthrough_polygons(const TypedArray> &p_regions, WindowID p_window) { _THREAD_SAFE_METHOD_ ERR_FAIL_COND(!windows.has(p_window)); - windows[p_window].mpath = p_region; + windows[p_window].mregions = p_regions; _update_window_mouse_passthrough(p_window); } @@ -1595,7 +1595,7 @@ void DisplayServerWindows::window_set_mouse_passthrough_rects(const TypedArray ®ion_path = windows[p_window].mpath; + const TypedArray> ®ion_paths = windows[p_window].mregions; const TypedArray ®ion_rectangles = windows[p_window].mrects; Vector2i frame_offset(0, 0); @@ -1612,19 +1612,21 @@ void DisplayServerWindows::_update_window_input_region(WindowID p_window) { frame_offset = Vector2i(GetSystemMetrics(SM_CXSIZEFRAME), GetSystemMetrics(SM_CYSIZEFRAME) + GetSystemMetrics(SM_CYCAPTION)); } - HRGN input_region; - if (region_path.size()) { - POINT *points = (POINT *)memalloc(sizeof(POINT) * windows[p_window].mpath.size()); + HRGN input_region = CreateRectRgn(0, 0, 0, 0); + for (int region_idx = 0; region_idx < region_paths.size(); region_idx++) { + const Vector ®ion_path = region_paths[region_idx]; + POINT *points = (POINT *)memalloc(sizeof(POINT) * region_path.size()); - for (int i = 0; i < windows[p_window].mpath.size(); i++) { - points[i].x = windows[p_window].mpath[i].x + frame_offset.x; - points[i].y = windows[p_window].mpath[i].y + frame_offset.y; + for (int i = 0; i < region_path.size(); i++) { + points[i].x = region_path[i].x + frame_offset.x; + points[i].y = region_path[i].y + frame_offset.y; } - input_region = CreatePolygonRgn(points, windows[p_window].mpath.size(), ALTERNATE); + HRGN path_input_region = CreatePolygonRgn(points, region_path.size(), ALTERNATE); memfree(points); - } else { - input_region = CreateRectRgn(0, 0, 0, 0); + + CombineRgn(input_region, input_region, path_input_region, RGN_OR); + DeleteObject(path_input_region); } for (int i = 0; i < region_rectangles.size(); i++) { diff --git a/platform/windows/display_server_windows.h b/platform/windows/display_server_windows.h index 9b05ce4f62b1..50952856da1e 100644 --- a/platform/windows/display_server_windows.h +++ b/platform/windows/display_server_windows.h @@ -377,7 +377,7 @@ class DisplayServerWindows : public DisplayServer { struct WindowData { HWND hWnd; - Vector mpath; + TypedArray> mregions; TypedArray mrects; bool pre_fs_valid = false; @@ -610,7 +610,7 @@ class DisplayServerWindows : public DisplayServer { virtual void window_set_title(const String &p_title, WindowID p_window = MAIN_WINDOW_ID) override; virtual Size2i window_get_title_size(const String &p_title, WindowID p_window = MAIN_WINDOW_ID) const override; - virtual void window_set_mouse_passthrough(const Vector &p_region, WindowID p_window = MAIN_WINDOW_ID) override; + virtual void window_set_mouse_passthrough_polygons(const TypedArray> &p_regions, WindowID p_window = MAIN_WINDOW_ID) override; virtual void window_set_mouse_passthrough_rects(const TypedArray &p_rects, WindowID p_window = MAIN_WINDOW_ID) override; virtual int window_get_current_screen(WindowID p_window = MAIN_WINDOW_ID) const override; diff --git a/scene/main/window.cpp b/scene/main/window.cpp index 1d55bd18bd57..bf41c4cf7787 100644 --- a/scene/main/window.cpp +++ b/scene/main/window.cpp @@ -635,7 +635,7 @@ void Window::_make_window() { ERR_FAIL_COND(window_id == DisplayServer::INVALID_WINDOW_ID); DisplayServer::get_singleton()->window_set_max_size(Size2i(), window_id); DisplayServer::get_singleton()->window_set_min_size(Size2i(), window_id); - DisplayServer::get_singleton()->window_set_mouse_passthrough(mpath, window_id); + DisplayServer::get_singleton()->window_set_mouse_passthrough_polygons(mregions, window_id); DisplayServer::get_singleton()->window_set_title(tr_title, window_id); DisplayServer::get_singleton()->window_attach_instance_id(get_instance_id(), window_id); @@ -1556,17 +1556,17 @@ DisplayServer::WindowID Window::get_window_id() const { return window_id; } -void Window::set_mouse_passthrough_polygon(const Vector &p_region) { +void Window::set_mouse_passthrough_polygons(const TypedArray> &p_regions) { ERR_MAIN_THREAD_GUARD; - mpath = p_region; + mregions = p_regions; if (window_id == DisplayServer::INVALID_WINDOW_ID) { return; } - DisplayServer::get_singleton()->window_set_mouse_passthrough(mpath, window_id); + DisplayServer::get_singleton()->window_set_mouse_passthrough_polygons(mregions, window_id); } -Vector Window::get_mouse_passthrough_polygon() const { - return mpath; +TypedArray> Window::get_mouse_passthrough_polygons() const { + return mregions; } void Window::set_mouse_passthrough_rects(const TypedArray &p_rects) { @@ -2907,8 +2907,8 @@ void Window::_bind_methods() { ClassDB::bind_method(D_METHOD("set_use_font_oversampling", "enable"), &Window::set_use_font_oversampling); ClassDB::bind_method(D_METHOD("is_using_font_oversampling"), &Window::is_using_font_oversampling); - ClassDB::bind_method(D_METHOD("set_mouse_passthrough_polygon", "polygon"), &Window::set_mouse_passthrough_polygon); - ClassDB::bind_method(D_METHOD("get_mouse_passthrough_polygon"), &Window::get_mouse_passthrough_polygon); + ClassDB::bind_method(D_METHOD("set_mouse_passthrough_polygons", "polygons"), &Window::set_mouse_passthrough_polygons); + ClassDB::bind_method(D_METHOD("get_mouse_passthrough_polygons"), &Window::get_mouse_passthrough_polygons); ClassDB::bind_method(D_METHOD("set_mouse_passthrough_rects", "rectangles"), &Window::set_mouse_passthrough_rects); ClassDB::bind_method(D_METHOD("get_mouse_passthrough_rects"), &Window::get_mouse_passthrough_rects); @@ -2997,7 +2997,7 @@ void Window::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::VECTOR2I, "size", PROPERTY_HINT_NONE, "suffix:px"), "set_size", "get_size"); ADD_PROPERTY(PropertyInfo(Variant::INT, "current_screen", PROPERTY_HINT_RANGE, "0,64,1,or_greater"), "set_current_screen", "get_current_screen"); - ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "mouse_passthrough_polygon"), "set_mouse_passthrough_polygon", "get_mouse_passthrough_polygon"); + ADD_PROPERTY(PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "mouse_passthrough_polygons"), "set_mouse_passthrough_polygons", "get_mouse_passthrough_polygons"); ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "mouse_passthrough_rects", PROPERTY_HINT_ARRAY_TYPE, "Rect2i"), "set_mouse_passthrough_rects", "get_mouse_passthrough_rects"); ADD_GROUP("Flags", ""); diff --git a/scene/main/window.h b/scene/main/window.h index bff59b87802a..463a4aca07f9 100644 --- a/scene/main/window.h +++ b/scene/main/window.h @@ -116,7 +116,7 @@ class Window : public Viewport { mutable Size2i size = Size2i(DEFAULT_WINDOW_SIZE, DEFAULT_WINDOW_SIZE); mutable Size2i min_size; mutable Size2i max_size; - mutable Vector mpath; + mutable TypedArray> mregions; mutable TypedArray mrects; mutable Mode mode = MODE_WINDOWED; mutable bool flags[FLAG_MAX] = {}; @@ -366,8 +366,8 @@ class Window : public Viewport { void set_use_font_oversampling(bool p_oversampling); bool is_using_font_oversampling() const; - void set_mouse_passthrough_polygon(const Vector &p_region); - Vector get_mouse_passthrough_polygon() const; + void set_mouse_passthrough_polygons(const TypedArray> &p_region); + TypedArray> get_mouse_passthrough_polygons() const; void set_mouse_passthrough_rects(const TypedArray &p_rects); TypedArray get_mouse_passthrough_rects() const; diff --git a/servers/display_server.cpp b/servers/display_server.cpp index d4af5e366284..eb42606d55c0 100644 --- a/servers/display_server.cpp +++ b/servers/display_server.cpp @@ -587,7 +587,7 @@ void DisplayServer::window_set_exclusive(WindowID p_window, bool p_exclusive) { // Do nothing, if not supported. } -void DisplayServer::window_set_mouse_passthrough(const Vector &p_region, WindowID p_window) { +void DisplayServer::window_set_mouse_passthrough_polygons(const TypedArray> &p_regions, WindowID p_window) { ERR_FAIL_MSG("Mouse polygon passthrough not supported by this display server."); } @@ -896,7 +896,7 @@ void DisplayServer::_bind_methods() { 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_get_title_size", "title", "window_id"), &DisplayServer::window_get_title_size, 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_set_mouse_passthrough_polygons", "regions", "window_id"), &DisplayServer::window_set_mouse_passthrough_polygons, DEFVAL(MAIN_WINDOW_ID)); ClassDB::bind_method(D_METHOD("window_set_mouse_passthrough_rects", "rectangles", "window_id"), &DisplayServer::window_set_mouse_passthrough_rects, DEFVAL(MAIN_WINDOW_ID)); ClassDB::bind_method(D_METHOD("window_get_current_screen", "window_id"), &DisplayServer::window_get_current_screen, DEFVAL(MAIN_WINDOW_ID)); diff --git a/servers/display_server.h b/servers/display_server.h index 6eb2bd5277fa..7e767b5059aa 100644 --- a/servers/display_server.h +++ b/servers/display_server.h @@ -430,7 +430,7 @@ class DisplayServer : public Object { virtual void window_set_title(const String &p_title, WindowID p_window = MAIN_WINDOW_ID) = 0; virtual Size2i window_get_title_size(const String &p_title, WindowID p_window = MAIN_WINDOW_ID) const { return Size2i(); } - virtual void window_set_mouse_passthrough(const Vector &p_region, WindowID p_window = MAIN_WINDOW_ID); + virtual void window_set_mouse_passthrough_polygons(const TypedArray> &p_regions, WindowID p_window = MAIN_WINDOW_ID); virtual void window_set_mouse_passthrough_rects(const TypedArray &p_rects, WindowID p_window = MAIN_WINDOW_ID); virtual int window_get_current_screen(WindowID p_window = MAIN_WINDOW_ID) const = 0; diff --git a/servers/display_server_headless.h b/servers/display_server_headless.h index 51755ddfbdc8..92798d6cb88f 100644 --- a/servers/display_server_headless.h +++ b/servers/display_server_headless.h @@ -92,7 +92,8 @@ class DisplayServerHeadless : public DisplayServer { void window_set_title(const String &p_title, WindowID p_window = MAIN_WINDOW_ID) override {} - void window_set_mouse_passthrough(const Vector &p_region, WindowID p_window = MAIN_WINDOW_ID) override {} + void window_set_mouse_passthrough_polygons(const TypedArray> &p_regions, WindowID p_window = MAIN_WINDOW_ID) override {} + void window_set_mouse_passthrough_rects(const TypedArray &p_rects, WindowID p_window = MAIN_WINDOW_ID) override {} int window_get_current_screen(WindowID p_window = MAIN_WINDOW_ID) const override { return -1; } void window_set_current_screen(int p_screen, WindowID p_window = MAIN_WINDOW_ID) override {}