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.
This commit is contained in:
Michael Natterer 2003-01-03 15:56:34 +00:00 committed by Michael Natterer
parent fbe9cb413e
commit 4bb66b59cc
3 changed files with 22 additions and 3 deletions

View File

@ -1,3 +1,11 @@
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

View File

@ -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

View File

@ -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);
}
}