X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=gtk.c;h=a8416b0c5cb9f9c76197fb71fa84f15733795669;hb=3234912f921916a1b8da164fd61dc75579358577;hp=37eb50922605089a3244c8d03d25de6af2713803;hpb=96b6f55ec834471414576f2ea761f0a29bd47cdc;p=sgt-puzzles.git diff --git a/gtk.c b/gtk.c index 37eb509..a8416b0 100644 --- a/gtk.c +++ b/gtk.c @@ -1310,22 +1310,22 @@ static gint configure_area(GtkWidget *widget, { frontend *fe = (frontend *)data; int x, y; + int oldw = fe->w, oldpw = fe->pw, oldh = fe->h, oldph = fe->ph; x = event->width; y = event->height; - - if (x != fe->w || y != fe->h || !backing_store_ok(fe)) { + fe->w = x; + fe->h = y; + midend_size(fe->me, &x, &y, TRUE); + fe->pw = x; + fe->ph = y; + fe->ox = (fe->w - fe->pw) / 2; + fe->oy = (fe->h - fe->ph) / 2; + + if (oldw != fe->w || oldpw != fe->pw || + oldh != fe->h || oldph != fe->ph || !backing_store_ok(fe)) { if (backing_store_ok(fe)) teardown_backing_store(fe); - - fe->w = x; - fe->h = y; - midend_size(fe->me, &x, &y, TRUE); - fe->pw = x; - fe->ph = y; - fe->ox = (fe->w - fe->pw) / 2; - fe->oy = (fe->h - fe->ph) / 2; - setup_backing_store(fe); }