summaryrefslogtreecommitdiff
path: root/src/window.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2014-09-10 17:48:57 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2014-09-10 17:48:57 -0700
commitb3ed13e84d591eeb2f0dde2e7c2558e7abcc66ca (patch)
tree747ac2d7805b50b1c83be62888a367b2f13061e2 /src/window.h
parentfe252976a18bf7bb66009fa80c1c6f02b124404f (diff)
downloademacs-b3ed13e84d591eeb2f0dde2e7c2558e7abcc66ca.tar.gz
Pacify --enable-gcc-warnings when no window system is used.
These warnings found that subscript error, so they seem worthwhile. * composite.c (char_composable_p): Simplify a bit. * frame.c (x_set_frame_parameters): Add an IF_LINT. * frame.c (x_set_horizontal_scroll_bars, x_set_scroll_bar_height): * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS): * window.c (set_window_scroll_bars): Use USE_HORIZONTAL_SCROLL_BARS for simplicity. * frame.h [! USE_HORIZONTAL_SCROLL_BARS]: Ignore -Wsuggest-attribute=const. * window.h (USE_HORIZONTAL_SCROLL_BARS): New macro. (WINDOW_HAS_HORIZONTAL_SCROLL_BAR): Use it.
Diffstat (limited to 'src/window.h')
-rw-r--r--src/window.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/window.h b/src/window.h
index 7e1c7d619b9..ea5dddc9fc8 100644
--- a/src/window.h
+++ b/src/window.h
@@ -785,11 +785,17 @@ wset_next_buffers (struct window *w, Lisp_Object val)
(WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (W) \
|| WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (W))
-/* Say whether horizontal scroll bars are currently enabled for window
- W. Horizontal scrollbars exist for toolkit versions only. */
#if (defined (HAVE_WINDOW_SYSTEM) \
&& ((defined (USE_TOOLKIT_SCROLL_BARS) && !defined (HAVE_NS)) \
|| defined (HAVE_NTGUI)))
+# define USE_HORIZONTAL_SCROLL_BARS true
+#else
+# define USE_HORIZONTAL_SCROLL_BARS false
+#endif
+
+/* Say whether horizontal scroll bars are currently enabled for window
+ W. Horizontal scrollbars exist for toolkit versions only. */
+#if USE_HORIZONTAL_SCROLL_BARS
#define WINDOW_HAS_HORIZONTAL_SCROLL_BAR(W) \
((WINDOW_PSEUDO_P (W) || MINI_NON_ONLY_WINDOW_P (W)) \
? false \