diff --git a/ChangeLog b/ChangeLog index d9cf7fbe6c..bec71e1825 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-02-16 Havoc Pennington + + * 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 * gtk/gtkscrolledwindow.[ch] gtk/gtkmarshallers.list: diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index d9cf7fbe6c..bec71e1825 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +2002-02-16 Havoc Pennington + + * 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 * gtk/gtkscrolledwindow.[ch] gtk/gtkmarshallers.list: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index d9cf7fbe6c..bec71e1825 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2002-02-16 Havoc Pennington + + * 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 * gtk/gtkscrolledwindow.[ch] gtk/gtkmarshallers.list: diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index d9cf7fbe6c..bec71e1825 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +2002-02-16 Havoc Pennington + + * 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 * gtk/gtkscrolledwindow.[ch] gtk/gtkmarshallers.list: diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index d9cf7fbe6c..bec71e1825 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +2002-02-16 Havoc Pennington + + * 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 * gtk/gtkscrolledwindow.[ch] gtk/gtkmarshallers.list: diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index d9cf7fbe6c..bec71e1825 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2002-02-16 Havoc Pennington + + * 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 * gtk/gtkscrolledwindow.[ch] gtk/gtkmarshallers.list: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index d9cf7fbe6c..bec71e1825 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2002-02-16 Havoc Pennington + + * 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 * gtk/gtkscrolledwindow.[ch] gtk/gtkmarshallers.list: diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 7c183b4e0f..597ca48f4d 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -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; } @@ -5628,15 +5635,18 @@ gtk_window_parse_geometry (GtkWindow *window, if ((result & YValue) == 0) y = 0; - + 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;