diff options
| author | Gerd Moellmann | 2000-11-30 19:52:51 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-11-30 19:52:51 +0000 |
| commit | eccc05db421c45a9d55d20e5f80d53ce2e10ace8 (patch) | |
| tree | 410d703590a1f1e81feb8f2419dde6957cfc40d4 | |
| parent | a8a1b05ddb385a12a2dc824e2df09c97cff98af6 (diff) | |
| download | emacs-eccc05db421c45a9d55d20e5f80d53ce2e10ace8.tar.gz emacs-eccc05db421c45a9d55d20e5f80d53ce2e10ace8.zip | |
Test USE_TOOLKIT_SCROLL_BARS everywhere with #ifdef and
#ifndef instead of using #if.
(XTread_socket) [USE_MOTIF] <KeyPress>: Call XmIsScrollBar only if
USE_TOOLKIT_SCROLL_BARS is defined.
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/xterm.c | 18 |
2 files changed, 16 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index a5fb4643be0..ba18459e58c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2000-11-30 Gerd Moellmann <gerd@gnu.org> | ||
| 2 | |||
| 3 | * xterm.c: Test USE_TOOLKIT_SCROLL_BARS everywhere with #ifdef and | ||
| 4 | #ifndef instead of using #if. | ||
| 5 | (XTread_socket) [USE_MOTIF] <KeyPress>: Call XmIsScrollBar only if | ||
| 6 | USE_TOOLKIT_SCROLL_BARS is defined. | ||
| 7 | |||
| 1 | 2000-11-30 Jason Rumney <jasonr@gnu.org> | 8 | 2000-11-30 Jason Rumney <jasonr@gnu.org> |
| 2 | 9 | ||
| 3 | * w32fns.c (x_set_cursor_color): Use x_update_cursor instead of | 10 | * w32fns.c (x_set_cursor_color): Use x_update_cursor instead of |
diff --git a/src/xterm.c b/src/xterm.c index 7a2260c6826..0caf901a8b1 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -7650,7 +7650,7 @@ x_window_to_scroll_bar (window_id) | |||
| 7650 | Toolkit scroll bars | 7650 | Toolkit scroll bars |
| 7651 | ************************************************************************/ | 7651 | ************************************************************************/ |
| 7652 | 7652 | ||
| 7653 | #if USE_TOOLKIT_SCROLL_BARS | 7653 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 7654 | 7654 | ||
| 7655 | static void x_scroll_bar_to_input_event P_ ((XEvent *, struct input_event *)); | 7655 | static void x_scroll_bar_to_input_event P_ ((XEvent *, struct input_event *)); |
| 7656 | static void x_send_scroll_bar_event P_ ((Lisp_Object, int, int, int)); | 7656 | static void x_send_scroll_bar_event P_ ((Lisp_Object, int, int, int)); |
| @@ -8326,7 +8326,7 @@ x_scroll_bar_create (w, top, left, width, height) | |||
| 8326 | 8326 | ||
| 8327 | BLOCK_INPUT; | 8327 | BLOCK_INPUT; |
| 8328 | 8328 | ||
| 8329 | #if USE_TOOLKIT_SCROLL_BARS | 8329 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 8330 | x_create_toolkit_scroll_bar (f, bar); | 8330 | x_create_toolkit_scroll_bar (f, bar); |
| 8331 | #else /* not USE_TOOLKIT_SCROLL_BARS */ | 8331 | #else /* not USE_TOOLKIT_SCROLL_BARS */ |
| 8332 | { | 8332 | { |
| @@ -8386,7 +8386,7 @@ x_scroll_bar_create (w, top, left, width, height) | |||
| 8386 | XSETVECTOR (XSCROLL_BAR (bar->next)->prev, bar); | 8386 | XSETVECTOR (XSCROLL_BAR (bar->next)->prev, bar); |
| 8387 | 8387 | ||
| 8388 | /* Map the window/widget. */ | 8388 | /* Map the window/widget. */ |
| 8389 | #if USE_TOOLKIT_SCROLL_BARS | 8389 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 8390 | { | 8390 | { |
| 8391 | Widget scroll_bar = SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar); | 8391 | Widget scroll_bar = SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar); |
| 8392 | XtConfigureWidget (scroll_bar, | 8392 | XtConfigureWidget (scroll_bar, |
| @@ -8531,7 +8531,7 @@ x_scroll_bar_remove (bar) | |||
| 8531 | struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); | 8531 | struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); |
| 8532 | BLOCK_INPUT; | 8532 | BLOCK_INPUT; |
| 8533 | 8533 | ||
| 8534 | #if USE_TOOLKIT_SCROLL_BARS | 8534 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 8535 | XtDestroyWidget (SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar)); | 8535 | XtDestroyWidget (SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar)); |
| 8536 | #else | 8536 | #else |
| 8537 | XDestroyWindow (FRAME_X_DISPLAY (f), SCROLL_BAR_X_WINDOW (bar)); | 8537 | XDestroyWindow (FRAME_X_DISPLAY (f), SCROLL_BAR_X_WINDOW (bar)); |
| @@ -8676,7 +8676,7 @@ XTset_vertical_scroll_bar (w, portion, whole, position) | |||
| 8676 | UNBLOCK_INPUT; | 8676 | UNBLOCK_INPUT; |
| 8677 | } | 8677 | } |
| 8678 | 8678 | ||
| 8679 | #if USE_TOOLKIT_SCROLL_BARS | 8679 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 8680 | x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole); | 8680 | x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole); |
| 8681 | #else /* not USE_TOOLKIT_SCROLL_BARS */ | 8681 | #else /* not USE_TOOLKIT_SCROLL_BARS */ |
| 8682 | /* Set the scroll bar's current state, unless we're currently being | 8682 | /* Set the scroll bar's current state, unless we're currently being |
| @@ -9729,7 +9729,7 @@ XTread_socket (sd, bufp, numchars, expected) | |||
| 9729 | case KeyPress: | 9729 | case KeyPress: |
| 9730 | f = x_any_window_to_frame (dpyinfo, event.xkey.window); | 9730 | f = x_any_window_to_frame (dpyinfo, event.xkey.window); |
| 9731 | 9731 | ||
| 9732 | #ifdef USE_MOTIF | 9732 | #if defined USE_MOTIF && defined USE_TOOLKIT_SCROLL_BARS |
| 9733 | /* I couldn't find a way to prevent LessTif scroll bars | 9733 | /* I couldn't find a way to prevent LessTif scroll bars |
| 9734 | from consuming key events. */ | 9734 | from consuming key events. */ |
| 9735 | if (f == 0) | 9735 | if (f == 0) |
| @@ -9742,7 +9742,7 @@ XTread_socket (sd, bufp, numchars, expected) | |||
| 9742 | f = x_any_window_to_frame (dpyinfo, XtWindow (widget)); | 9742 | f = x_any_window_to_frame (dpyinfo, XtWindow (widget)); |
| 9743 | } | 9743 | } |
| 9744 | } | 9744 | } |
| 9745 | #endif /* USE_MOTIF */ | 9745 | #endif /* USE_MOTIF and USE_TOOLKIT_SCROLL_BARS */ |
| 9746 | 9746 | ||
| 9747 | if (f != 0) | 9747 | if (f != 0) |
| 9748 | { | 9748 | { |
| @@ -13917,7 +13917,7 @@ x_initialize () | |||
| 13917 | } | 13917 | } |
| 13918 | #endif | 13918 | #endif |
| 13919 | 13919 | ||
| 13920 | #if USE_TOOLKIT_SCROLL_BARS | 13920 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 13921 | xaw3d_arrow_scroll = False; | 13921 | xaw3d_arrow_scroll = False; |
| 13922 | xaw3d_pick_top = True; | 13922 | xaw3d_pick_top = True; |
| 13923 | #endif | 13923 | #endif |
| @@ -13972,7 +13972,7 @@ wide as that tab on the display."); | |||
| 13972 | 13972 | ||
| 13973 | DEFVAR_BOOL ("x-toolkit-scroll-bars-p", &x_toolkit_scroll_bars_p, | 13973 | DEFVAR_BOOL ("x-toolkit-scroll-bars-p", &x_toolkit_scroll_bars_p, |
| 13974 | "If not nil, Emacs uses toolkit scroll bars."); | 13974 | "If not nil, Emacs uses toolkit scroll bars."); |
| 13975 | #if USE_TOOLKIT_SCROLL_BARS | 13975 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 13976 | x_toolkit_scroll_bars_p = 1; | 13976 | x_toolkit_scroll_bars_p = 1; |
| 13977 | #else | 13977 | #else |
| 13978 | x_toolkit_scroll_bars_p = 0; | 13978 | x_toolkit_scroll_bars_p = 0; |