Mercurial > emacs
changeset 59980:7f8e4c715b72
(x_set_tool_bar_lines): Check that width and height is greater than
zero before clearing area.
author | Jan Djärv <jan.h.d@swipnet.se> |
---|---|
date | Mon, 07 Feb 2005 21:31:28 +0000 |
parents | f721a44afa15 |
children | 14a19fb55a51 |
files | src/xfns.c |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xfns.c Mon Feb 07 20:41:39 2005 +0000 +++ b/src/xfns.c Mon Feb 07 21:31:28 2005 +0000 @@ -1398,10 +1398,14 @@ int width = FRAME_PIXEL_WIDTH (f); int y = nlines * FRAME_LINE_HEIGHT (f); - BLOCK_INPUT; - x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - 0, y, width, height, False); - UNBLOCK_INPUT; + /* height can be zero here. */ + if (height > 0 && width > 0) + { + BLOCK_INPUT; + x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), + 0, y, width, height, False); + UNBLOCK_INPUT; + } if (WINDOWP (f->tool_bar_window)) clear_glyph_matrix (XWINDOW (f->tool_bar_window)->current_matrix);