From 3737fee7e34719deff2e7e78890f64ad91be38dd Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Sat, 3 Nov 2012 09:59:17 +0400 Subject: [PATCH] * frame.h (struct frame): Drop can_have_scroll_bars member which is meaningless for a long time. Adjust comments. (FRAME_CAN_HAVE_SCROLL_BARS): Remove. * frame.c, nsfns.m, term.c, w32fns.c, xfns.c: Adjust users. --- src/ChangeLog | 7 +++++++ src/frame.c | 2 -- src/frame.h | 12 +----------- src/nsfns.m | 1 - src/term.c | 1 - src/w32fns.c | 4 ---- src/xfns.c | 4 ---- 7 files changed, 8 insertions(+), 23 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 512982858d8..f5f5c9e897a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2012-11-03 Dmitry Antipov + + * frame.h (struct frame): Drop can_have_scroll_bars member + which is meaningless for a long time. Adjust comments. + (FRAME_CAN_HAVE_SCROLL_BARS): Remove. + * frame.c, nsfns.m, term.c, w32fns.c, xfns.c: Adjust users. + 2012-11-03 Dmitry Antipov * window.c (decode_next_window_args): Update window arg after diff --git a/src/frame.c b/src/frame.c index 79893abf826..1d375380d56 100644 --- a/src/frame.c +++ b/src/frame.c @@ -502,7 +502,6 @@ make_initial_frame (void) FRAME_FOREGROUND_PIXEL (f) = FACE_TTY_DEFAULT_FG_COLOR; FRAME_BACKGROUND_PIXEL (f) = FACE_TTY_DEFAULT_BG_COLOR; - FRAME_CAN_HAVE_SCROLL_BARS (f) = 0; FRAME_VERTICAL_SCROLL_BAR_TYPE (f) = vertical_scroll_bar_none; /* The default value of menu-bar-mode is t. */ @@ -551,7 +550,6 @@ make_terminal_frame (struct terminal *terminal) FRAME_BACKGROUND_PIXEL (f) = FACE_TTY_DEFAULT_BG_COLOR; #endif /* not MSDOS */ - FRAME_CAN_HAVE_SCROLL_BARS (f) = 0; FRAME_VERTICAL_SCROLL_BAR_TYPE (f) = vertical_scroll_bar_none; FRAME_MENU_BAR_LINES(f) = NILP (Vmenu_bar_mode) ? 0 : 1; diff --git a/src/frame.h b/src/frame.h index f8c3d99fedd..eea618df797 100644 --- a/src/frame.h +++ b/src/frame.h @@ -409,10 +409,6 @@ struct frame show no modeline for that window. */ unsigned wants_modeline : 1; - /* Non-zero if the hardware device this frame is displaying on can - support scroll bars. */ - char can_have_scroll_bars; - /* Non-0 means raise this frame to the top of the heap when selected. */ unsigned auto_raise : 1; @@ -438,8 +434,7 @@ struct frame /* Nonzero means that the pointer is invisible. */ unsigned pointer_invisible :1; - /* If can_have_scroll_bars is non-zero, this is non-zero if we should - actually display them on this frame. */ + /* Nonzero if we should actually display the scroll bars on this frame. */ enum vertical_scroll_bar_type vertical_scroll_bar_type; /* What kind of text cursor should we draw in the future? @@ -767,11 +762,6 @@ typedef struct frame *FRAME_PTR; #define FRAME_SCROLL_BOTTOM_VPOS(f) (f)->scroll_bottom_vpos #define FRAME_FOCUS_FRAME(f) f->focus_frame -/* Nonzero if frame F supports scroll bars. - If this is zero, then it is impossible to enable scroll bars - on frame F. */ -#define FRAME_CAN_HAVE_SCROLL_BARS(f) ((f)->can_have_scroll_bars) - /* This frame slot says whether scroll bars are currently enabled for frame F, and which side they are on. */ #define FRAME_VERTICAL_SCROLL_BAR_TYPE(f) ((f)->vertical_scroll_bar_type) diff --git a/src/nsfns.m b/src/nsfns.m index 7a22ac547c3..e8bf696e7f5 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -1175,7 +1175,6 @@ This function is an internal primitive--use `make-frame' instead. */) f = make_frame (1); XSETFRAME (frame, f); - FRAME_CAN_HAVE_SCROLL_BARS (f) = 1; f->terminal = dpyinfo->terminal; diff --git a/src/term.c b/src/term.c index 74b02b0af27..ffc559469e6 100644 --- a/src/term.c +++ b/src/term.c @@ -3235,7 +3235,6 @@ use the Bourne shell command `TERM=... export TERM' (C-shell:\n\ FrameCols (tty) = FRAME_COLS (f); tty->specified_window = FRAME_LINES (f); - FRAME_CAN_HAVE_SCROLL_BARS (f) = 0; FRAME_VERTICAL_SCROLL_BAR_TYPE (f) = vertical_scroll_bar_none; terminal->char_ins_del_ok = 1; baud_rate = 19200; diff --git a/src/w32fns.c b/src/w32fns.c index 7459c4a31db..74bb2375ea5 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -4284,9 +4284,6 @@ This function is an internal primitive--use `make-frame' instead. */) XSETFRAME (frame, f); - /* Note that Windows does support scroll bars. */ - FRAME_CAN_HAVE_SCROLL_BARS (f) = 1; - /* By default, make scrollbars the system standard width. */ FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = GetSystemMetrics (SM_CXVSCROLL); @@ -5387,7 +5384,6 @@ x_create_tip_frame (struct w32_display_info *dpyinfo, Finsert (1, &text); set_buffer_internal_1 (old_buffer); - FRAME_CAN_HAVE_SCROLL_BARS (f) = 0; record_unwind_protect (unwind_create_tip_frame, frame); /* By setting the output method, we're essentially saying that diff --git a/src/xfns.c b/src/xfns.c index d497cffe3df..aca227385bf 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -3111,9 +3111,6 @@ This function is an internal primitive--use `make-frame' instead. */) XSETFRAME (frame, f); - /* Note that X Windows does support scroll bars. */ - FRAME_CAN_HAVE_SCROLL_BARS (f) = 1; - f->terminal = dpyinfo->terminal; f->output_method = output_x_window; @@ -4596,7 +4593,6 @@ x_create_tip_frame (struct x_display_info *dpyinfo, Finsert (1, &text); set_buffer_internal_1 (old_buffer); - FRAME_CAN_HAVE_SCROLL_BARS (f) = 0; record_unwind_protect (unwind_create_tip_frame, frame); f->terminal = dpyinfo->terminal; -- 2.39.5