aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
authorMartin Rudalics2014-08-04 18:47:27 +0200
committerMartin Rudalics2014-08-04 18:47:27 +0200
commit4a75c94d14f7a3c50014d1cc12ee519eb955c1ed (patch)
tree73a26f58dc3568e35872b33dcd88aa411ef9c56a /src/xterm.c
parent44a651f0f2e1668bdbbacca3bf5d405c34e67ff2 (diff)
downloademacs-4a75c94d14f7a3c50014d1cc12ee519eb955c1ed.tar.gz
emacs-4a75c94d14f7a3c50014d1cc12ee519eb955c1ed.zip
Fix scroll bar handling for non-toolkit builds.
* frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS): Condition correctly according to toolkit used. * frame.c (make_initial_frame, make_terminal_frame) (x_set_horizontal_scroll_bars, x_set_scroll_bar_height) (Vdefault_frame_horizontal_scroll_bars): Correctly condition assignments according to presence of toolkit scrollbars. * window.h (WINDOW_HAS_HORIZONTAL_SCROLL_BAR): Condition correctly according to toolkit used. * window.c (set_window_scroll_bars): Set horizontal scroll bar only if toolkit supports it. * w32term.c (w32_redeem_scroll_bar): Always redeem scroll bar if present. * xterm.c (x_scroll_bar_create): Initialize horizontal slot for non-toolkit builds. (XTredeem_scroll_bar): Always redeem scroll bar if present.
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 4fa4b7ab02b..b106c51c01c 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -5474,6 +5474,7 @@ x_scroll_bar_create (struct window *w, int top, int left, int width, int height,
5474 bar->start = 0; 5474 bar->start = 0;
5475 bar->end = 0; 5475 bar->end = 0;
5476 bar->dragging = -1; 5476 bar->dragging = -1;
5477 bar->horizontal = horizontal;
5477#if defined (USE_TOOLKIT_SCROLL_BARS) && defined (USE_LUCID) 5478#if defined (USE_TOOLKIT_SCROLL_BARS) && defined (USE_LUCID)
5478 bar->last_seen_part = scroll_bar_nowhere; 5479 bar->last_seen_part = scroll_bar_nowhere;
5479#endif 5480#endif
@@ -5947,7 +5948,7 @@ XTredeem_scroll_bar (struct window *w)
5947 if (NILP (w->vertical_scroll_bar) && NILP (w->horizontal_scroll_bar)) 5948 if (NILP (w->vertical_scroll_bar) && NILP (w->horizontal_scroll_bar))
5948 emacs_abort (); 5949 emacs_abort ();
5949 5950
5950 if (!NILP (w->vertical_scroll_bar) && WINDOW_HAS_VERTICAL_SCROLL_BAR (w)) 5951 if (!NILP (w->vertical_scroll_bar))
5951 { 5952 {
5952 bar = XSCROLL_BAR (w->vertical_scroll_bar); 5953 bar = XSCROLL_BAR (w->vertical_scroll_bar);
5953 /* Unlink it from the condemned list. */ 5954 /* Unlink it from the condemned list. */
@@ -5982,7 +5983,7 @@ XTredeem_scroll_bar (struct window *w)
5982 } 5983 }
5983 5984
5984 horizontal: 5985 horizontal:
5985 if (!NILP (w->horizontal_scroll_bar) && WINDOW_HAS_HORIZONTAL_SCROLL_BAR (w)) 5986 if (!NILP (w->horizontal_scroll_bar))
5986 { 5987 {
5987 bar = XSCROLL_BAR (w->horizontal_scroll_bar); 5988 bar = XSCROLL_BAR (w->horizontal_scroll_bar);
5988 /* Unlink it from the condemned list. */ 5989 /* Unlink it from the condemned list. */