Merge pull request #56953 from bruvzg/ex_wnd

This commit is contained in:
Rémi Verschelde 2022-02-12 16:46:55 +01:00 committed by GitHub
commit d3a6b6daaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 74 additions and 4 deletions

View file

@ -255,6 +255,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();
@ -523,6 +524,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.");