mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-09-29 10:37:39 +00:00
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:
parent
70dbb14f89
commit
c4dc0e8e40
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user