From: Michael D. Lowis Date: Thu, 17 Nov 2016 00:00:20 +0000 (-0500) Subject: prevent the window from updating when there's too little space to do so X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=987ebe4d3ecd2a2fdebd4f864a0605257e630a97;p=projs%2Ftide.git prevent the window from updating when there's too little space to do so --- diff --git a/xedit b/xedit index 46924c4..e660043 100755 Binary files a/xedit and b/xedit differ diff --git a/xedit.c b/xedit.c index b2c2a83..da0f2ea 100644 --- a/xedit.c +++ b/xedit.c @@ -313,6 +313,9 @@ static void layout(int width, int height) { static void redraw(int width, int height) { size_t fheight = x11_font_height(Font); size_t fwidth = x11_font_width(Font); + /* if the window is too small, don't bother updating. */ + if (width < fwidth || height < (4 * fheight)) + return; layout(width, height); x11_draw_rect(CLR_BASE03, 0, 0, width, height); x11_draw_rect(CLR_BASE02, (79 * fwidth) + 2, Regions[EDIT].y-2, fwidth, height - Regions[EDIT].y + 2);