You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Add exclusive window handling to DisplayServer (on macOS and Windows).
This commit is contained in:
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user