diff options
| author | Richard M. Stallman | 1994-12-30 01:37:53 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-12-30 01:37:53 +0000 |
| commit | 0299d313b82153c6e125cab458309621eb0fa286 (patch) | |
| tree | ff43807e0fc5794ef4655bd1f5cee935169062e6 /src | |
| parent | 776332c4a223aef5a864606db062236d32ba89e1 (diff) | |
| download | emacs-0299d313b82153c6e125cab458309621eb0fa286.tar.gz emacs-0299d313b82153c6e125cab458309621eb0fa286.zip | |
(x_scroll_bar_handle_click): Use GC_WINDOWP.
(XTframe_rehighlight, x_window_to_scroll_bar): Use GC_FRAMEP.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/src/xterm.c b/src/xterm.c index 36af954ffd2..3775223c80f 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -1478,10 +1478,10 @@ XTframe_rehighlight () | |||
| 1478 | 1478 | ||
| 1479 | if (x_focus_frame) | 1479 | if (x_focus_frame) |
| 1480 | { | 1480 | { |
| 1481 | x_highlight_frame = | 1481 | x_highlight_frame |
| 1482 | ((XGCTYPE (FRAME_FOCUS_FRAME (x_focus_frame)) == Lisp_Frame) | 1482 | = ((GC_FRAMEP (FRAME_FOCUS_FRAME (x_focus_frame))) |
| 1483 | ? XFRAME (FRAME_FOCUS_FRAME (x_focus_frame)) | 1483 | ? XFRAME (FRAME_FOCUS_FRAME (x_focus_frame)) |
| 1484 | : x_focus_frame); | 1484 | : x_focus_frame); |
| 1485 | if (! FRAME_LIVE_P (x_highlight_frame)) | 1485 | if (! FRAME_LIVE_P (x_highlight_frame)) |
| 1486 | { | 1486 | { |
| 1487 | FRAME_FOCUS_FRAME (x_focus_frame) = Qnil; | 1487 | FRAME_FOCUS_FRAME (x_focus_frame) = Qnil; |
| @@ -1538,8 +1538,8 @@ x_find_modifier_meanings (dpyinfo) | |||
| 1538 | for (row = 3; row < 8; row++) | 1538 | for (row = 3; row < 8; row++) |
| 1539 | for (col = 0; col < mods->max_keypermod; col++) | 1539 | for (col = 0; col < mods->max_keypermod; col++) |
| 1540 | { | 1540 | { |
| 1541 | KeyCode code = | 1541 | KeyCode code |
| 1542 | mods->modifiermap[(row * mods->max_keypermod) + col]; | 1542 | = mods->modifiermap[(row * mods->max_keypermod) + col]; |
| 1543 | 1543 | ||
| 1544 | /* Zeroes are used for filler. Skip them. */ | 1544 | /* Zeroes are used for filler. Skip them. */ |
| 1545 | if (code == 0) | 1545 | if (code == 0) |
| @@ -2362,7 +2362,7 @@ x_window_to_scroll_bar (window_id) | |||
| 2362 | 2362 | ||
| 2363 | frame = XCONS (tail)->car; | 2363 | frame = XCONS (tail)->car; |
| 2364 | /* All elements of Vframe_list should be frames. */ | 2364 | /* All elements of Vframe_list should be frames. */ |
| 2365 | if (XGCTYPE (frame) != Lisp_Frame) | 2365 | if (! GC_FRAMEP (frame)) |
| 2366 | abort (); | 2366 | abort (); |
| 2367 | 2367 | ||
| 2368 | /* Scan this frame's scroll bar list for a scroll bar with the | 2368 | /* Scan this frame's scroll bar list for a scroll bar with the |
| @@ -2657,8 +2657,7 @@ XTset_vertical_scroll_bar (window, portion, whole, position) | |||
| 2657 | dragged. */ | 2657 | dragged. */ |
| 2658 | if (NILP (bar->dragging)) | 2658 | if (NILP (bar->dragging)) |
| 2659 | { | 2659 | { |
| 2660 | int top_range = | 2660 | int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (pixel_height); |
| 2661 | VERTICAL_SCROLL_BAR_TOP_RANGE (pixel_height); | ||
| 2662 | 2661 | ||
| 2663 | if (whole == 0) | 2662 | if (whole == 0) |
| 2664 | x_scroll_bar_set_handle (bar, 0, top_range, 0); | 2663 | x_scroll_bar_set_handle (bar, 0, top_range, 0); |
| @@ -2814,24 +2813,25 @@ x_scroll_bar_handle_click (bar, event, emacs_event) | |||
| 2814 | XEvent *event; | 2813 | XEvent *event; |
| 2815 | struct input_event *emacs_event; | 2814 | struct input_event *emacs_event; |
| 2816 | { | 2815 | { |
| 2817 | if (XGCTYPE (bar->window) != Lisp_Window) | 2816 | if (! GC_WINDOWP (bar->window)) |
| 2818 | abort (); | 2817 | abort (); |
| 2819 | 2818 | ||
| 2820 | emacs_event->kind = scroll_bar_click; | 2819 | emacs_event->kind = scroll_bar_click; |
| 2821 | emacs_event->code = event->xbutton.button - Button1; | 2820 | emacs_event->code = event->xbutton.button - Button1; |
| 2822 | emacs_event->modifiers = | 2821 | emacs_event->modifiers |
| 2823 | (x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (XFRAME (WINDOW_FRAME (XWINDOW (bar->window)))), | 2822 | = (x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO |
| 2824 | event->xbutton.state) | 2823 | (XFRAME (WINDOW_FRAME (XWINDOW (bar->window)))), |
| 2825 | | (event->type == ButtonRelease | 2824 | event->xbutton.state) |
| 2826 | ? up_modifier | 2825 | | (event->type == ButtonRelease |
| 2827 | : down_modifier)); | 2826 | ? up_modifier |
| 2827 | : down_modifier)); | ||
| 2828 | emacs_event->frame_or_window = bar->window; | 2828 | emacs_event->frame_or_window = bar->window; |
| 2829 | emacs_event->timestamp = event->xbutton.time; | 2829 | emacs_event->timestamp = event->xbutton.time; |
| 2830 | { | 2830 | { |
| 2831 | int internal_height = | 2831 | int internal_height |
| 2832 | VERTICAL_SCROLL_BAR_INSIDE_HEIGHT (XINT (bar->height)); | 2832 | = VERTICAL_SCROLL_BAR_INSIDE_HEIGHT (XINT (bar->height)); |
| 2833 | int top_range = | 2833 | int top_range |
| 2834 | VERTICAL_SCROLL_BAR_TOP_RANGE (XINT (bar->height)); | 2834 | = VERTICAL_SCROLL_BAR_TOP_RANGE (XINT (bar->height)); |
| 2835 | int y = event->xbutton.y - VERTICAL_SCROLL_BAR_TOP_BORDER; | 2835 | int y = event->xbutton.y - VERTICAL_SCROLL_BAR_TOP_BORDER; |
| 2836 | 2836 | ||
| 2837 | if (y < 0) y = 0; | 2837 | if (y < 0) y = 0; |
| @@ -3536,9 +3536,8 @@ XTread_socket (sd, bufp, numchars, waitp, expected) | |||
| 3536 | /* make_lispy_event turns chars into control chars. | 3536 | /* make_lispy_event turns chars into control chars. |
| 3537 | Don't do it here because XLookupString is too eager. */ | 3537 | Don't do it here because XLookupString is too eager. */ |
| 3538 | event.xkey.state &= ~ControlMask; | 3538 | event.xkey.state &= ~ControlMask; |
| 3539 | nbytes = | 3539 | nbytes = XLookupString (&event.xkey, copy_buffer, |
| 3540 | XLookupString (&event.xkey, copy_buffer, 80, &keysym, | 3540 | 80, &keysym, &compose_status); |
| 3541 | &compose_status); | ||
| 3542 | 3541 | ||
| 3543 | orig_keysym = keysym; | 3542 | orig_keysym = keysym; |
| 3544 | 3543 | ||