window: Remember current size

Don't just look at previously remembered sizes, also look at the current
size.
This is useful for cases where the window was resized by the user or WM
and not by the application itself.

https://bugzilla.gnome.org/show_bug.cgi?id=696882
This commit is contained in:
Benjamin Otte 2013-04-09 12:08:08 +02:00
parent 70dbb14f89
commit c4dc0e8e40

View File

@ -5605,10 +5605,19 @@ gtk_window_get_remembered_size (GtkWindow *window,
int *height)
{
GtkWindowGeometryInfo *info;
GdkWindow *gdk_window;
*width = 0;
*height = 0;
gdk_window = gtk_widget_get_window (GTK_WIDGET (window));
if (gdk_window)
{
*width = gdk_window_get_width (gdk_window);
*height = gdk_window_get_height (gdk_window);
return;
}
info = gtk_window_get_geometry_info (window, FALSE);
if (info)
{