summaryrefslogtreecommitdiffstats
path: root/scene/main/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main/window.cpp')
-rw-r--r--scene/main/window.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/scene/main/window.cpp b/scene/main/window.cpp
index 26aa06e1a4..31aeb70d40 100644
--- a/scene/main/window.cpp
+++ b/scene/main/window.cpp
@@ -2475,6 +2475,14 @@ Transform2D Window::get_popup_base_transform() const {
return popup_base_transform;
}
+bool Window::is_directly_attached_to_screen() const {
+ if (get_embedder()) {
+ return get_embedder()->is_directly_attached_to_screen();
+ }
+ // Distinguish between the case that this is a native Window and not inside the tree.
+ return is_inside_tree();
+}
+
void Window::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_title", "title"), &Window::set_title);
ClassDB::bind_method(D_METHOD("get_title"), &Window::get_title);