From: Arjan Molenaar Date: Wed, 11 Jan 2023 15:29:24 +0000 (+0100) Subject: macos: run glib idle functions when in nested run loop X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~8^2~50^2~11 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=420be8fb0f008959d4d5a0be0c1e98cba5a54eb7;p=gtk4.git macos: run glib idle functions when in nested run loop It looks like DnD starts a nested run loop. We still have to run our GLib handlers, so animations work. --- diff --git a/gdk/macos/gdkmacoseventsource.c b/gdk/macos/gdkmacoseventsource.c index a60fb558c9..725cc57476 100644 --- a/gdk/macos/gdkmacoseventsource.c +++ b/gdk/macos/gdkmacoseventsource.c @@ -1018,7 +1018,10 @@ run_loop_observer_callback (CFRunLoopObserverRef observer, break; } - if (getting_events > 0) /* Activity we triggered */ + /* DnD starts a nested runloop, or so it seems. + If we have such a loop, we still want to run + our idle handlers. */ + if (getting_events > 0 && current_loop_level < 2) return; switch (activity)