Bug 742202 - new layer/path dialog opens always in the upper left corner

gimp_dialog_set_property(): when setting a non-toplevel parent widget,
don't just set the dialog's screen, also set the window position to
GTK_WIN_POS_MOUSE, so the window opens at the mouse position.
This commit is contained in:
Michael Natterer 2015-01-08 21:13:41 +01:00
parent 4dab80b9ef
commit 1dd2752949
1 changed files with 10 additions and 4 deletions

View File

@ -244,11 +244,17 @@ gimp_dialog_set_property (GObject *object,
if (parent)
{
if (GTK_IS_WINDOW (parent))
gtk_window_set_transient_for (GTK_WINDOW (object),
GTK_WINDOW (parent));
{
gtk_window_set_transient_for (GTK_WINDOW (object),
GTK_WINDOW (parent));
}
else
gtk_window_set_screen (GTK_WINDOW (object),
gtk_widget_get_screen (parent));
{
gtk_window_set_screen (GTK_WINDOW (object),
gtk_widget_get_screen (parent));
gtk_window_set_position (GTK_WINDOW (object),
GTK_WIN_POS_MOUSE);
}
}
}
break;