From 40b3be79127cddf8673a0ad8758682a211874cb5 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Mon, 30 May 2022 11:06:08 +0300 Subject: Remove mouse events that closed the popup from queue, to fix pop-up reopening. --- platform/osx/godot_application.mm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'platform/osx/godot_application.mm') diff --git a/platform/osx/godot_application.mm b/platform/osx/godot_application.mm index 00a58700e8..13313a025a 100644 --- a/platform/osx/godot_application.mm +++ b/platform/osx/godot_application.mm @@ -37,6 +37,11 @@ - (void)sendEvent:(NSEvent *)event { DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton(); if (ds) { + if ([event type] == NSEventTypeLeftMouseDown || [event type] == NSEventTypeRightMouseDown || [event type] == NSEventTypeOtherMouseDown) { + if (ds->mouse_process_popups()) { + return; + } + } ds->send_event(event); } -- cgit v1.2.3