Issue #6577 - prevent hang of scriptfu on select dialogs on MacOS
Fixes #6577 (closed)
Not an ideal patch, but at least it prevents GIMP on the Mac from locking up.
About the patch
Extract a function script-fu_flush_events.
Call it in one more place (previously called in two places.)
Add function script_fu_activate_main_dialog and call it when a "select" dialog closes.
The patch is on 2.10 branch. I don't think it merges with master branch, there have been intervening changes.
See comments in the code, especially re GIMP 3 and Gtk3.
commit 83de53ee to fix #67776, the origin of the code which I just sprinkled around. Origin is Simone Lehmann, who used to build a Mac distribution of GIMP.
This only fixes the issues:
- spinning ball when scriptfu closes and GIMP locked
- main scriptfu dialog obscured when "select" dialog's "Close" button pushed.
There are side issues not fixed:
- after scriptfu, the Mac menu bar still shows "scriptfu" and GIMP does not have focus
- a newly opened "select" dialog does not have focus
See a test plan in #6578 (closed) (closed but duplicate to 6577). The test plan illustrates the side issues.
I tested on OSX 10.15.7 Catalina (third oldest) using the MacPorts gimp2-devel port (which is 2.10.23 more or less.)
Use test-sphere.scm in the repository to test all the "select" dialogs, Filter>Development>ScriptFu>Test>Sphere.