From c24313c0b35394fd2a32fd2943324d68f103f89c Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 20 Oct 2019 18:47:33 +0100 Subject: [PATCH] Remove extra braces in drawing_area_setup. (NFC) I'm about to rearrange this function, and the patch that actually does work will be easier to read if mass reindentation isn't combined with it. The braces I've just removed were necessary when we hadn't yet committed to requiring (most of) C99 from all our build platforms. Now they aren't. --- unix/gtkwin.c | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/unix/gtkwin.c b/unix/gtkwin.c index 31787237..b54d6f0b 100644 --- a/unix/gtkwin.c +++ b/unix/gtkwin.c @@ -758,34 +758,32 @@ static void drawing_area_setup(GtkFrontend *inst, int width, int height) inst->drawing_area_setup_needed = false; inst->scale = new_scale; - { - int backing_w = w * inst->font_width + 2*inst->window_border; - int backing_h = h * inst->font_height + 2*inst->window_border; + int backing_w = w * inst->font_width + 2*inst->window_border; + int backing_h = h * inst->font_height + 2*inst->window_border; - backing_w *= inst->scale; - backing_h *= inst->scale; + backing_w *= inst->scale; + backing_h *= inst->scale; #ifndef NO_BACKING_PIXMAPS - if (inst->pixmap) { - gdk_pixmap_unref(inst->pixmap); - inst->pixmap = NULL; - } + if (inst->pixmap) { + gdk_pixmap_unref(inst->pixmap); + inst->pixmap = NULL; + } - inst->pixmap = gdk_pixmap_new(gtk_widget_get_window(inst->area), - backing_w, backing_h, -1); + inst->pixmap = gdk_pixmap_new(gtk_widget_get_window(inst->area), + backing_w, backing_h, -1); #endif #ifdef DRAW_TEXT_CAIRO - if (inst->surface) { - cairo_surface_destroy(inst->surface); - inst->surface = NULL; - } - - inst->surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, - backing_w, backing_h); -#endif + if (inst->surface) { + cairo_surface_destroy(inst->surface); + inst->surface = NULL; } + inst->surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, + backing_w, backing_h); +#endif + draw_backing_rect(inst); if (need_size && inst->term) {