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).
This commit is contained in:
Martin Nordholts 2010-06-23 20:17:37 +02:00
parent 2431740492
commit f6781d15c4
2 changed files with 24 additions and 0 deletions

View File

@ -125,6 +125,15 @@ file_open_dialog_response (GtkWidget *open_dialog,
gimp_file_dialog_set_sensitive (dialog, FALSE);
/* 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.
*/
if (! dialog->open_as_layers)
gtk_window_set_transient_for (GTK_WINDOW (open_dialog), NULL);
for (list = uris; list; list = g_slist_next (list))
{
gchar *filename = file_utils_filename_from_uri (list->data);

View File

@ -0,0 +1,15 @@
This file contains manual test cases
------------------------------------
/gimp-manual-tests/opened_image_stays_on_top
Step-by-step:
1. Create a new image, make the image window almost as big as the screen
2. From the image window menu, do File -> Open
3. Select an image and open it
Expected result:
The image is opened and is kept above the image it was opened from
Last known PASS:
2010-06-23