GNOME Bugzilla – Bug 643155
Tool dialogs don't stay on top of the image window
Last modified: 2011-03-26 13:49:53 UTC
I am building Gimp from git on Arch Linux. Build gimp-git-20110216 is OK, but on builds: gimp-git-20110221 gimp-git-20110222 gimp-git-20110224 there is a problem with curves. When I open color->curves and move points with mouse it looks good. But this is not how I use curves. When I click on image to find point on curves, I lose focus, curves are unresponsible, main window is also unresponsible, I can only kill gimp. I use xfce4-4.8.x as my desktop manager.
Works fine here with metacity and sloppy focus. Can anyone reproduce this?
Anyway, what is your WM focus policy?
just installed todays build to check, bug is still there I don't know how to find this setting in xfce, where should I search?
Problem is still there in gimp-git-20110309. I upgraded glib2 to 2.28.2.
I tried to use icewm and windowmaker instead xfce. On both when I click on image to get the color - curves window hides under the picture window. I am shocked that after month nobody else had same problem. The only reason I see is that nobody uses curves this way in Gimp, at least not from people who uses development version...
That's because nobody uses the window managers you tested probably. The benchmark wm gimp is built for is metacity, but even us kde users suffer sometimes when wm-s have different ideas about what the standards actually are.
So is metacity recommended to use with Gimp? My path of wms in Linux since 1998 to now is Window Maker/blackbox/IceWM/xfce4, I played with GNOME around 2000 and sometimes I run KDE just to see how it looks, but I never used metacity for real. Is it somehow special so it fits Gimp better?
No, it's just that we won't try 10 WMs. Instead, we agreed on one where things have to work, and bugs on others are fixed as they come in.
Problem is visible without going to fullscreen or single window mode. Just use xfce4, open curve window and pick a color on image. tested on gimp-git-20110216-1-i686.pkg.tar.xz gimp-git-20110221-1-i686.pkg.tar.xz gimp-git-20110222-1-i686.pkg.tar.xz gimp-git-20110224-1-i686.pkg.tar.xz gimp-git-20110301-1-i686.pkg.tar.xz gimp-git-20110309-1-i686.pkg.tar.xz gimp-git-20110311-1-i686.pkg.tar.xz gimp-git-20110314-1-i686.pkg.tar.xz and I always must back to 0216 (last correctly working version)
What's the xfce developers' opinion on this?
Just like I wrote I tested this on xfce4, icewm and windowmaker. I also tried on KDE. Curves window doesn't work as before. If this not some problem with my setup/compiler/libraries and you will release 2.8.0 with this bug it will be step backward in Gimp development.
Argh, I see what is broken. When I hacked up the GimpDisplayShell (which formerly was the toplevel window) to be just a widget living in the GimpImageWindow, I implicitly broke the transient relation between tool dialogs and their parent window. Will fix this for 2.8, no need to try more WMs.
Thank you!
Ok this bug has some history: - The transient relation was removed as fix for bug #128833 - Then added back for color tool dialogs as fix for bug #316521 - Then inadvertendly killed again when introducing GimpImageWindow I'm in the process of refactoring GimpToolDialog to set the transient relation again because that's definitely the right thing to do. (we are now almost a decade after bug #128833, so window managers should bahave sanely, and if some of them don't, I really don't care)
Fixed in master: Author: Michael Natterer <mitch@gimp.org> Date: Sun Mar 20 18:15:42 2011 +0100 Bug 643155 - Tool dialogs don't stay on top of the image window Change the "GtkWidget *parent" parameter of GimpToolDialog to "GimpDisplayShell". Also add API gimp_tool_dialog_set_shell() so an existing dialog can be used on different images. Make sure the dialog closes when the shell is unmapped (like when switching tabs in SWM), and make the dialog transient for the toplevel GimpImageWindow. Change all tool dialog users accordingly. app/display/gimptooldialog.c | 82 ++++++++++++++++++++++++++++++++++++++--- app/display/gimptooldialog.h | 11 +++-- app/tools/gimpimagemaptool.c | 12 ++++-- app/tools/gimpmeasuretool.c | 11 +++-- app/tools/gimptransformtool.c | 4 +- 5 files changed, 101 insertions(+), 19 deletions(-)
I compiled fresh version from git and there is no change in its behaviour. Tested in xfce4.
The dialogs are now *definitely* transient to the image window. What window manager does xfce4 use, and does transient work in any other application?
OK I tested it on KDE and IceWM and yes, your fix works. So only xfce4 is broken now. Is this message related? gimp_display_shell_pointer_grab: gdk_pointer_grab failed with status 1 (gimp:17762): Gimp-Display-CRITICAL **: gimp_display_shell_keyboard_ungrab: assertion `shell->keyboard_grabbed == TRUE' failed (gimp:17762): Gimp-Display-CRITICAL **: gimp_display_shell_pointer_ungrab: assertion `shell->pointer_grabbed == TRUE' failed
Thanks for checking. I actually fixed these kind of warnings a while back. Are you using a tablet? Does it also warn with the mouse?
Yes, I use Wacom Bamboo. I never use mouse in Gimp :) Xfce4 uses xfwm, can you tell me how to check if "transient" works?
I just tried with the tablet myself, and I don't get these warnings any longer (they appeared after a change I did, but then I fixed them and I can't reproduce them no matter how hard I try). Can you run "gimp-2.7 -v" and paste the output here please? About the transient stuff, just try any GTK+ app that has a main window and a dialog related to that main window, If the app is sane, it would set the dialog transient.
OK this is not related to curves window or tablet. I just run Gimp, open any image (may be new empty one) and try to paint with mouse, the output is same: gimp_display_shell_pointer_grab: gdk_pointer_grab failed with status 1 (gimp:2254): Gimp-Display-CRITICAL **: gimp_display_shell_keyboard_ungrab: assertion `shell->keyboard_grabbed == TRUE' failed (gimp:2254): Gimp-Display-CRITICAL **: gimp_display_shell_pointer_ungrab: assertion `shell->pointer_grabbed == TRUE' failed then gimp is unusable. This happens in xfce4. and the output with -v is: git-describe: GIMP_2_7_1-1501-g2aeac1c GEGL używa wersji 0.1.7 (skompilowano wersję 0.1.7) GLib używa wersji 2.28.2 (skompilowano wersję 2.28.2) GTK+ używa wersji 2.22.1 (skompilowano wersję 2.22.1) Pango używa wersji 1.28.3 (skompilowano wersję 1.28.3) Fontconfig używa wersji 2.8.0 (skompilowano wersję 2.8.0) (build today)
This happens only on xfce, and I think is not related to dialogs at all. I will submit new bug for that.
Reported Bug 645747