diff --git a/lib/globals.gd b/lib/globals.gd index f0fe4750..966a3478 100644 --- a/lib/globals.gd +++ b/lib/globals.gd @@ -40,6 +40,7 @@ func clear_mouse_passthrough() -> void: DisplayServer.window_set_mouse_passthrough([]) func _update_mouse_passthrough() -> void: + if not _pt_mouse: return var _pt_mask: PackedVector2Array = [] for node in _pt_except: var rect := node.get_global_rect() @@ -57,6 +58,7 @@ func _update_mouse_passthrough() -> void: func _process(_d: float) -> void: if _pt_except.size() == 0: return + if not _pt_mouse: return _update_mouse_passthrough() func add_to_passthrough_exception(control: Control) -> void: