From 4de4d9ee7eeb0407346546f21cd0911a8cda337b Mon Sep 17 00:00:00 2001 From: Yuuki Harano Date: Sat, 11 Apr 2020 23:36:36 +0900 Subject: [PATCH] follow x_set_internal_border_width change. * ../src/pgtkfns.c (x_set_internal_border_width): --- src/pgtkfns.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/pgtkfns.c b/src/pgtkfns.c index b7d34d56803..9078a78e060 100644 --- a/src/pgtkfns.c +++ b/src/pgtkfns.c @@ -647,20 +647,18 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) static void x_set_internal_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { - int old_width = FRAME_INTERNAL_BORDER_WIDTH (f); + int border = check_int_nonnegative (arg); - CHECK_TYPE_RANGED_INTEGER (int, arg); - f->internal_border_width = XFIXNUM (arg); - if (FRAME_INTERNAL_BORDER_WIDTH (f) < 0) - f->internal_border_width = 0; - - if (FRAME_INTERNAL_BORDER_WIDTH (f) == old_width) - return; - - if (FRAME_X_WINDOW (f) != 0) - adjust_frame_size (f, -1, -1, 3, 0, Qinternal_border_width); + if (border != FRAME_INTERNAL_BORDER_WIDTH (f)) + { + f->internal_border_width = border; - SET_FRAME_GARBAGED (f); + if (FRAME_X_WINDOW (f)) + { + adjust_frame_size (f, -1, -1, 3, false, Qinternal_border_width); + pgtk_clear_under_internal_border (f); + } + } } -- 2.39.5