GNOME Bugzilla – Bug 360106
GimpPdbDialog appears behind plug-in dialogs
Last modified: 2018-05-24 12:00:54 UTC
The dialogs for selecting a brush/gradient/pattern which are created from the GimpSelectButton widgets in libgimp are actually shown by the core. In current CVS, these dialogs are made transient for the progress window. In the case of Script-Fu this is the plug-in window and the popup window appears correctly above the Script-Fu dialog. Normal plug-ins usually don't set a progress window and the core implicitely creates a GimpProgress that uses the image window. This causes the popup dialogs to appear above the image window but below the plug-in dialog. We need to fix this but I am not quite sure how this would best be fixed. If we had a plug-in dialog widget, we could make this widget the progress window. This would also fix a similar problem with plug-ins using g_message() while their dialog is shown. An alternative solution could be to let the GimpSelectButton install a progress handler. However that progress handler should only set the progress window, it would have to delegate the other progress functionality to the core. AFAIK, this is not possible with the current API but it could perhaps be added somehow.
Created attachment 79390 [details] [review] halfway implemented solution This patch changes the gimp_foo_popup() PDB functions to return the window ID of the PDB popup dialog that is created by the core. It doesn't yet use this information. The idea would be to make this window transient for the toplevel window containing the button. While the PDB change is compatible at least in the C binding, there are some problems with this approach: (1) On platforms where a native window can't be identified using an integer ID, the popup PDB procedure would always return 0, indicating a failure. (2) It's not trivial to make the popup window transient from another process. It might even be impossible on some platforms. (3) The code to make the popup window transient would have to live in libgimp. This is not possible, it would have to be in libgimpui. Thus we would have to find a way to get the window ID to the GimpSelectButton widget. For the reasons listed above, the patch is probably pointless. A different approach is needed.
Plug-Ins affected by this problem are: <Image>/Filters/Combine/Film Strip (the font selector) <Image>/Filters/Render/Fractal Explorer (the gradient selector) <Image>/Filters/Render/GFig (the brush selector)
I have committed a workaround which should work good enough to bump this bug from the 2.4 release milestone. 2007-08-07 Sven Neumann <sven@gimp.org> * app/gui/gui-vtable.c (gui_pdb_dialog_new): as a workaround for bug #360106, set a timeout that presents the dialog window. * app/widgets/gimppdbdialog.c (gimp_pdb_dialog_set_property): formatting.
Since we don't have a good idea how to solve this problem, let's bump it to the Future milestone.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/216.