GNOME Bugzilla – Bug 565459
newly opened images are put into the background
Last modified: 2010-06-23 18:22:52 UTC
Please describe the problem: See steps below. opensuse 10.3, KDE 3.5.10. Steps to reproduce: 1. run gimp 2. open image A 3. maximize window with image A 4. open image B 5. the active image is B, but the foreground window is with A Actual results: The windows are "mixed". Expected results: The newly opened image is active and put into foreground Does this happen every time? Yes. Other information: It is even more confusing when you open not two, but more images, and not one by one, but at the same time. I doubt it is KDE issue, because other apps have similar UI to gimp, openoffice for example, and there initial putting window into foreground works fine.
Duplicate of bug 564837, probably.
It's definitely a problem of the window manager as that is the instance that decides about the z-order of windows. But unfortunately it seems to be a common problem and we should check if there's anything GIMP could do differently to improve this.
Created attachment 141147 [details] [review] Quick hack It seems that unsetting the 'transient-for' property of the dialog before destroying it fixes the problem. But obviously more testing is needed. I considered the following test-cases: with one image open and maximized - Open 1 image. - Open 2 images. - Trying to open 2 files the second of which in a format not recognized by Gimp. patch against 'app/dialogs/file-open-dialog.c' of the release 2.6.7.
Thanks Massimo, I found what I'm pretty sure to be the proper fix based on your investigation: commit f6781d15c4c253f1b14093e8758504c84f504886 Author: Martin Nordholts <martinn@src.gnome.org> Date: Wed Jun 23 20:17:37 2010 +0200 Bug 565459 - newly opened images are put into the background When we are going to open new image windows, unset the transient window. We don't need it since we will use gdk_window_raise() to keep the dialog on top. And if we don't do it, then the dialog will pull the image window it was invoked from on top of all the new opened image windows, and we don't want that to happen. Patch heavily inspiried by hack from Massimo Valentini. Also add a manual test case for the fix. (I don't think there is GTK+ API to automate it). I'll cherry-pick this into 2.6 too.
gimp-2-6: commit 3222c3df322b8f892f6ae3758ba7d7e9e996c8fb Author: Martin Nordholts <martinn@src.gnome.org> Date: Wed Jun 23 20:17:37 2010 +0200 Bug 565459 - newly opened images are put into the background When we are going to open new image windows, unset the transient window. We don't need it since we will use gdk_window_raise() to keep the dialog on top. And if we don't do it, then the dialog will pull the image window it was invoked from on top of all the new opened image windows, and we don't want that to happen. Patch heavily inspiried by hack from Massimo Valentini.
Review of attachment 141147 [details] [review]: Modified version committed.