summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-05-03 11:20:46 +0200
committerGitHub <noreply@github.com>2022-05-03 11:20:46 +0200
commit3894b08d0d48eb9cf99123380835750fe9691b45 (patch)
treeeb116c0448eade0992b9230466096bec8249ff7a /servers
parentf75afaa085312fe873e8723636510d1e95e9da99 (diff)
parent97e87a2daf27ff250e748cb25a29f1c91879c709 (diff)
Merge pull request #60553 from madmiraal/separate-display_safe_area
Diffstat (limited to 'servers')
-rw-r--r--servers/display_server.cpp1
-rw-r--r--servers/display_server.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/servers/display_server.cpp b/servers/display_server.cpp
index e68fcc184e..23961e0ca4 100644
--- a/servers/display_server.cpp
+++ b/servers/display_server.cpp
@@ -580,6 +580,7 @@ void DisplayServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("clipboard_get_primary"), &DisplayServer::clipboard_get_primary);
ClassDB::bind_method(D_METHOD("get_display_cutouts"), &DisplayServer::get_display_cutouts);
+ ClassDB::bind_method(D_METHOD("get_display_safe_area"), &DisplayServer::get_display_safe_area);
ClassDB::bind_method(D_METHOD("get_screen_count"), &DisplayServer::get_screen_count);
ClassDB::bind_method(D_METHOD("screen_get_position", "screen"), &DisplayServer::screen_get_position, DEFVAL(SCREEN_OF_MAIN_WINDOW));
diff --git a/servers/display_server.h b/servers/display_server.h
index 64340cff73..136f95a74f 100644
--- a/servers/display_server.h
+++ b/servers/display_server.h
@@ -229,6 +229,7 @@ public:
virtual String clipboard_get_primary() const;
virtual Array get_display_cutouts() const { return Array(); }
+ virtual Rect2i get_display_safe_area() const { return screen_get_usable_rect(); }
enum {
SCREEN_OF_MAIN_WINDOW = -1