Commit 4bb66b59 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

app/widgets/gimpdialogfactory.c convince more window managers to actually

2003-01-03  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdialogfactory.c
	* app/widgets/gimptoolbox.c: convince more window managers to
	actually use the specified window positions/sizes by adding
	GDK_HINT_USER_POS and GDK_HINT_USER_SIZE to the windows'
	geometry hints.
parent fbe9cb41
2003-01-03 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdialogfactory.c
* app/widgets/gimptoolbox.c: convince more window managers to
actually use the specified window positions/sizes by adding
GDK_HINT_USER_POS and GDK_HINT_USER_SIZE to the windows'
geometry hints.
2003-01-03 Michael Natterer <mitch@gimp.org>
* app/tools/gimptoolcontrol.c (gimp_tool_control_halt): don't
......
......@@ -1296,6 +1296,8 @@ gimp_dialog_factory_set_window_geometry (GtkWidget *window,
static gint screen_width = 0;
static gint screen_height = 0;
gboolean size_set = FALSE;
g_return_if_fail (GTK_IS_WINDOW (window));
g_return_if_fail (GTK_WIDGET_TOPLEVEL (window));
g_return_if_fail (info != NULL);
......@@ -1314,9 +1316,17 @@ gimp_dialog_factory_set_window_geometry (GtkWidget *window,
if (! info->toplevel_entry || info->toplevel_entry->remember_size)
{
if (info->width > 0 && info->height > 0)
gtk_window_set_default_size (GTK_WINDOW (window),
info->width, info->height);
{
gtk_window_set_default_size (GTK_WINDOW (window),
info->width, info->height);
size_set = TRUE;
}
}
gtk_window_set_geometry_hints (GTK_WINDOW (window), NULL, NULL,
size_set ?
(GDK_HINT_USER_POS | GDK_HINT_USER_SIZE) :
(GDK_HINT_USER_POS));
}
static void
......
......@@ -416,7 +416,8 @@ gimp_toolbox_set_geometry (GimpToolbox *toolbox)
gtk_window_set_geometry_hints (GTK_WINDOW (toolbox),
NULL,
&geometry,
GDK_HINT_MIN_SIZE | GDK_HINT_RESIZE_INC);
GDK_HINT_MIN_SIZE | GDK_HINT_RESIZE_INC |
GDK_HINT_USER_POS);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment