From b6f91066605cb485be14b61e4cd8dc19faa58184 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Wed, 22 Nov 2000 14:27:38 +0000 Subject: [PATCH] (x_set_tool_bar_lines): Clear internal border when tool bar gets smaller. --- src/xfns.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/xfns.c b/src/xfns.c index 5132cd17df5..7210678952d 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -2045,6 +2045,21 @@ x_set_tool_bar_lines (f, value, oldval) clear_current_matrices (f); updating_frame = NULL; } + + /* If the tool bar gets smaller, the internal border below it + has to be cleared. It was formerly part of the display + of the larger tool bar, and updating windows won't clear it. */ + if (delta < 0) + { + int height = FRAME_INTERNAL_BORDER_WIDTH (f); + int width = PIXEL_WIDTH (f); + int y = nlines * CANON_Y_UNIT (f); + + BLOCK_INPUT; + XClearArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), + 0, y, width, height, False); + UNBLOCK_INPUT; + } } -- 2.39.2