From 7d59b81d79236ea82c72cfa5cb6a0ee341762fc6 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Wed, 19 Jan 2022 14:04:05 +0200 Subject: =?UTF-8?q?=EF=BB=BFAdd=20exclusive=20window=20handling=20to=20Dis?= =?UTF-8?q?playServer=20(on=20macOS=20and=20Windows).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scene/main/window.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scene') diff --git a/scene/main/window.cpp b/scene/main/window.cpp index f2ebe50fa3..e28140367a 100644 --- a/scene/main/window.cpp +++ b/scene/main/window.cpp @@ -254,6 +254,7 @@ void Window::_make_window() { #endif DisplayServer::get_singleton()->window_set_title(tr_title, window_id); DisplayServer::get_singleton()->window_attach_instance_id(get_instance_id(), window_id); + DisplayServer::get_singleton()->window_set_exclusive(window_id, exclusive); _update_window_size(); @@ -522,6 +523,10 @@ void Window::set_exclusive(bool p_exclusive) { exclusive = p_exclusive; + if (!embedder && window_id != DisplayServer::INVALID_WINDOW_ID) { + DisplayServer::get_singleton()->window_set_exclusive(window_id, exclusive); + } + if (transient_parent) { if (p_exclusive && is_inside_tree() && is_visible()) { ERR_FAIL_COND_MSG(transient_parent->exclusive_child && transient_parent->exclusive_child != this, "Transient parent has another exclusive child."); -- cgit v1.2.3