From 17ad9eb8b5524dec0a90ba6126f5c4e5306686db Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Sat, 3 Aug 2024 21:27:39 +0300 Subject: [PATCH] Fix issue with popups being unclickable disabled single window mode Should fix #1054 --- src/Main.gd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Main.gd b/src/Main.gd index 1b82d10f5..d23a6fc70 100644 --- a/src/Main.gd +++ b/src/Main.gd @@ -380,7 +380,10 @@ func _notification(what: int) -> void: if Global.pause_when_unfocused: get_tree().paused = true NOTIFICATION_WM_MOUSE_EXIT: - if !get_window().has_focus() and Global.pause_when_unfocused: + # Do not pause the application if the mouse leaves the main window + # but there are child subwindows opened, because that makes them unresponsive. + var window_count := DisplayServer.get_window_list().size() + if not get_window().has_focus() and window_count == 1 and Global.pause_when_unfocused: get_tree().paused = true # Unpause it when the mouse enters the window or when it gains focus NOTIFICATION_WM_MOUSE_ENTER: