take GDK_HINT_RESIZE_INC into account, and handle negative coordinates

2002-02-16  Havoc Pennington  <hp@pobox.com>

	* gtk/gtkwindow.c (gtk_window_parse_geometry): take
	GDK_HINT_RESIZE_INC into account, and handle negative coordinates
	correctly. (Can't email Owen - hope this is OK.)
This commit is contained in:
Havoc Pennington 2002-02-16 14:41:15 +00:00 committed by Havoc Pennington
parent 59fc8ff804
commit e672dd6112
8 changed files with 55 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2002-02-16 Havoc Pennington <hp@pobox.com>
* gtk/gtkwindow.c (gtk_window_parse_geometry): take
GDK_HINT_RESIZE_INC into account, and handle negative coordinates
correctly. (Can't email Owen - hope this is OK.)
Fri Feb 15 20:09:45 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.[ch] gtk/gtkmarshallers.list:

View File

@ -1,3 +1,9 @@
2002-02-16 Havoc Pennington <hp@pobox.com>
* gtk/gtkwindow.c (gtk_window_parse_geometry): take
GDK_HINT_RESIZE_INC into account, and handle negative coordinates
correctly. (Can't email Owen - hope this is OK.)
Fri Feb 15 20:09:45 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.[ch] gtk/gtkmarshallers.list:

View File

@ -1,3 +1,9 @@
2002-02-16 Havoc Pennington <hp@pobox.com>
* gtk/gtkwindow.c (gtk_window_parse_geometry): take
GDK_HINT_RESIZE_INC into account, and handle negative coordinates
correctly. (Can't email Owen - hope this is OK.)
Fri Feb 15 20:09:45 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.[ch] gtk/gtkmarshallers.list:

View File

@ -1,3 +1,9 @@
2002-02-16 Havoc Pennington <hp@pobox.com>
* gtk/gtkwindow.c (gtk_window_parse_geometry): take
GDK_HINT_RESIZE_INC into account, and handle negative coordinates
correctly. (Can't email Owen - hope this is OK.)
Fri Feb 15 20:09:45 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.[ch] gtk/gtkmarshallers.list:

View File

@ -1,3 +1,9 @@
2002-02-16 Havoc Pennington <hp@pobox.com>
* gtk/gtkwindow.c (gtk_window_parse_geometry): take
GDK_HINT_RESIZE_INC into account, and handle negative coordinates
correctly. (Can't email Owen - hope this is OK.)
Fri Feb 15 20:09:45 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.[ch] gtk/gtkmarshallers.list:

View File

@ -1,3 +1,9 @@
2002-02-16 Havoc Pennington <hp@pobox.com>
* gtk/gtkwindow.c (gtk_window_parse_geometry): take
GDK_HINT_RESIZE_INC into account, and handle negative coordinates
correctly. (Can't email Owen - hope this is OK.)
Fri Feb 15 20:09:45 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.[ch] gtk/gtkmarshallers.list:

View File

@ -1,3 +1,9 @@
2002-02-16 Havoc Pennington <hp@pobox.com>
* gtk/gtkwindow.c (gtk_window_parse_geometry): take
GDK_HINT_RESIZE_INC into account, and handle negative coordinates
correctly. (Can't email Owen - hope this is OK.)
Fri Feb 15 20:09:45 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.[ch] gtk/gtkmarshallers.list:

View File

@ -5608,6 +5608,13 @@ gtk_window_parse_geometry (GtkWindow *window,
size_set = FALSE;
if ((result & WidthValue) || (result & HeightValue))
{
GtkWindowGeometryInfo *info;
info = gtk_window_get_geometry_info (window, FALSE);
if (info && info->mask & GDK_HINT_RESIZE_INC)
{
w *= info->geometry.width_inc;
h *= info->geometry.height_inc;
}
gtk_window_set_default_size (window, w, h);
size_set = TRUE;
}
@ -5631,12 +5638,15 @@ gtk_window_parse_geometry (GtkWindow *window,
if (grav == GDK_GRAVITY_SOUTH_WEST ||
grav == GDK_GRAVITY_SOUTH_EAST)
y = gdk_screen_height () - h;
y = gdk_screen_height () - h + y;
if (grav == GDK_GRAVITY_SOUTH_EAST ||
grav == GDK_GRAVITY_NORTH_EAST)
x = gdk_screen_width () - w;
x = gdk_screen_width () - w + x;
/* we don't let you put a window offscreen; maybe some people would
* prefer to be able to, but it's kind of a bogus thing to do.
*/
if (y < 0)
y = 0;