After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 643155 - Tool dialogs don't stay on top of the image window
Tool dialogs don't stay on top of the image window
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Tools
git master
Other All
: High normal
: 2.8
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2011-02-24 01:26 UTC by Jacek Poplawski
Modified: 2011-03-26 13:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jacek Poplawski 2011-02-24 01:26:55 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.
Comment 1 Michael Natterer 2011-02-28 09:30:53 UTC
Works fine here with metacity and sloppy focus. Can anyone
reproduce this?
Comment 2 Michael Natterer 2011-02-28 22:58:11 UTC
Anyway, what is your WM focus policy?
Comment 3 Jacek Poplawski 2011-03-01 00:18:22 UTC
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?
Comment 4 Jacek Poplawski 2011-03-09 02:27:35 UTC
Problem is still there in gimp-git-20110309. I upgraded glib2 to 2.28.2.
Comment 5 Jacek Poplawski 2011-03-09 02:36:12 UTC
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...
Comment 6 Alexia Death 2011-03-12 06:22:16 UTC
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.
Comment 7 Jacek Poplawski 2011-03-12 09:45:08 UTC
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?
Comment 8 Michael Natterer 2011-03-12 23:26:29 UTC
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.
Comment 9 Jacek Poplawski 2011-03-14 22:58:42 UTC
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)
Comment 10 Michael Schumacher 2011-03-16 23:36:50 UTC
What's the xfce developers' opinion on this?
Comment 11 Jacek Poplawski 2011-03-20 08:25:43 UTC
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.
Comment 12 Michael Natterer 2011-03-20 10:56:36 UTC
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.
Comment 13 Jacek Poplawski 2011-03-20 11:05:09 UTC
Thank you!
Comment 14 Michael Natterer 2011-03-20 12:45:16 UTC
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)
Comment 15 Michael Natterer 2011-03-20 17:20:04 UTC
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(-)
Comment 16 Jacek Poplawski 2011-03-20 21:07:04 UTC
I compiled fresh version from git and there is no change in its behaviour.
Tested in xfce4.
Comment 17 Michael Natterer 2011-03-20 21:25:26 UTC
The dialogs are now *definitely* transient to the image window. What
window manager does xfce4 use, and does transient work in any other
application?
Comment 18 Jacek Poplawski 2011-03-20 23:35:19 UTC
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
Comment 19 Michael Natterer 2011-03-21 07:07:34 UTC
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?
Comment 20 Jacek Poplawski 2011-03-21 08:10:29 UTC
Yes, I use Wacom Bamboo. I never use mouse in Gimp :)
Xfce4 uses xfwm, can you tell me how to check if "transient" works?
Comment 21 Michael Natterer 2011-03-21 08:45:10 UTC
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.
Comment 22 Jacek Poplawski 2011-03-23 20:39:39 UTC
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)
Comment 23 Jacek Poplawski 2011-03-26 13:42:03 UTC
This happens only on xfce, and I think is not related to dialogs at all. I will submit new bug for that.
Comment 24 Jacek Poplawski 2011-03-26 13:49:53 UTC
Reported Bug 645747