Commit
8b491946e had a bug: configure_area stopped doing most of its
work if the new size already matched fe->w and fe->h, but in fact the
GTK2 resize_fe() _already_ set up fe->w and fe->h for the new size. I
managed not to notice, because I checked it all worked on GTK 3 but
only tested resizing to a _smaller_ puzzle on GTK 2. Ahem.
Now we don't change fe->w and fe->h at all until configure_area is
called. Also, we initialise them to dummy values at setup time, so
that configure_area won't compare the new size with uninitialised
data.
#if GTK_CHECK_VERSION(3,0,0)
gtk_window_resize_to_geometry(GTK_WINDOW(fe->window), x, y);
#else
#if GTK_CHECK_VERSION(3,0,0)
gtk_window_resize_to_geometry(GTK_WINDOW(fe->window), x, y);
#else
- fe->w = x;
- fe->h = y;
fe->drawing_area_shrink_pending = FALSE;
gtk_drawing_area_size(GTK_DRAWING_AREA(fe->area), x, y);
{
fe->drawing_area_shrink_pending = FALSE;
gtk_drawing_area_size(GTK_DRAWING_AREA(fe->area), x, y);
{
gtk_window_set_geometry_hints(GTK_WINDOW(fe->window), fe->area,
&geom, GDK_HINT_BASE_SIZE);
}
gtk_window_set_geometry_hints(GTK_WINDOW(fe->window), fe->area,
&geom, GDK_HINT_BASE_SIZE);
}
+ fe->w = -1;
+ fe->h = -1;
get_size(fe, &x, &y);
#if GTK_CHECK_VERSION(3,0,0)
gtk_window_set_default_geometry(GTK_WINDOW(fe->window), x, y);
get_size(fe, &x, &y);
#if GTK_CHECK_VERSION(3,0,0)
gtk_window_set_default_geometry(GTK_WINDOW(fe->window), x, y);
fe->drawing_area_shrink_pending = FALSE;
gtk_drawing_area_size(GTK_DRAWING_AREA(fe->area), x, y);
#endif
fe->drawing_area_shrink_pending = FALSE;
gtk_drawing_area_size(GTK_DRAWING_AREA(fe->area), x, y);
#endif
- fe->w = x;
- fe->h = y;
gtk_box_pack_end(vbox, fe->area, TRUE, TRUE, 0);
gtk_box_pack_end(vbox, fe->area, TRUE, TRUE, 0);