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:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user