Mercurial > emacs
comparison src/xterm.c @ 17371:97283cd93432
(construct_menu_click, note_mouse_highlight, fast_find_position):
Fix Lisp_Object/integer confusion.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Thu, 10 Apr 1997 22:25:45 +0000 |
parents | f27f4c559b21 |
children | 5aa7011aa3d5 |
comparison
equal
deleted
inserted
replaced
17370:6db43d8c9dfc | 17371:97283cd93432 |
---|---|
2203 struct frame *f; | 2203 struct frame *f; |
2204 { | 2204 { |
2205 /* Make the event type no_event; we'll change that when we decide | 2205 /* Make the event type no_event; we'll change that when we decide |
2206 otherwise. */ | 2206 otherwise. */ |
2207 result->kind = mouse_click; | 2207 result->kind = mouse_click; |
2208 XSETINT (result->code, event->button - Button1); | 2208 result->code = event->button - Button1; |
2209 result->timestamp = event->time; | 2209 result->timestamp = event->time; |
2210 result->modifiers = (x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f), | 2210 result->modifiers = (x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f), |
2211 event->state) | 2211 event->state) |
2212 | (event->type == ButtonRelease | 2212 | (event->type == ButtonRelease |
2213 ? up_modifier | 2213 ? up_modifier |
2303 /* Are we in a window whose display is up to date? | 2303 /* Are we in a window whose display is up to date? |
2304 And verify the buffer's text has not changed. */ | 2304 And verify the buffer's text has not changed. */ |
2305 if (WINDOWP (window) && portion == 0 && row >= 0 && column >= 0 | 2305 if (WINDOWP (window) && portion == 0 && row >= 0 && column >= 0 |
2306 && row < FRAME_HEIGHT (f) && column < FRAME_WIDTH (f) | 2306 && row < FRAME_HEIGHT (f) && column < FRAME_WIDTH (f) |
2307 && EQ (w->window_end_valid, w->buffer) | 2307 && EQ (w->window_end_valid, w->buffer) |
2308 && w->last_modified == BUF_MODIFF (XBUFFER (w->buffer)) | 2308 && XFASTINT (w->last_modified) == BUF_MODIFF (XBUFFER (w->buffer)) |
2309 && w->last_overlay_modified == BUF_OVERLAY_MODIFF (XBUFFER (w->buffer))) | 2309 && (XFASTINT (w->last_overlay_modified) |
2310 == BUF_OVERLAY_MODIFF (XBUFFER (w->buffer)))) | |
2310 { | 2311 { |
2311 int *ptr = FRAME_CURRENT_GLYPHS (f)->charstarts[row]; | 2312 int *ptr = FRAME_CURRENT_GLYPHS (f)->charstarts[row]; |
2312 int i, pos; | 2313 int i, pos; |
2313 | 2314 |
2314 /* Find which buffer position the mouse corresponds to. */ | 2315 /* Find which buffer position the mouse corresponds to. */ |
2356 len = 10; | 2357 len = 10; |
2357 overlay_vec = (Lisp_Object *) xmalloc (len * sizeof (Lisp_Object)); | 2358 overlay_vec = (Lisp_Object *) xmalloc (len * sizeof (Lisp_Object)); |
2358 | 2359 |
2359 /* Put all the overlays we want in a vector in overlay_vec. | 2360 /* Put all the overlays we want in a vector in overlay_vec. |
2360 Store the length in len. */ | 2361 Store the length in len. */ |
2361 noverlays = overlays_at (XINT (pos), 1, &overlay_vec, &len, | 2362 noverlays = overlays_at (pos, 1, &overlay_vec, &len, |
2362 NULL, NULL); | 2363 NULL, NULL); |
2363 noverlays = sort_overlays (overlay_vec, noverlays, w); | 2364 noverlays = sort_overlays (overlay_vec, noverlays, w); |
2364 | 2365 |
2365 /* Find the highest priority overlay that has a mouse-face prop. */ | 2366 /* Find the highest priority overlay that has a mouse-face prop. */ |
2366 overlay = Qnil; | 2367 overlay = Qnil; |
2463 struct window *w = XWINDOW (window); | 2464 struct window *w = XWINDOW (window); |
2464 FRAME_PTR f = XFRAME (WINDOW_FRAME (w)); | 2465 FRAME_PTR f = XFRAME (WINDOW_FRAME (w)); |
2465 int i; | 2466 int i; |
2466 int row = 0; | 2467 int row = 0; |
2467 int left = WINDOW_LEFT_MARGIN (w); | 2468 int left = WINDOW_LEFT_MARGIN (w); |
2468 int top = w->top; | 2469 int top = XFASTINT (w->top); |
2469 int height = XFASTINT (w->height) - ! MINI_WINDOW_P (w); | 2470 int height = XFASTINT (w->height) - ! MINI_WINDOW_P (w); |
2470 int width = window_internal_width (w); | 2471 int width = window_internal_width (w); |
2471 int *charstarts; | 2472 int *charstarts; |
2472 int lastcol; | 2473 int lastcol; |
2473 int maybe_next_line = 0; | 2474 int maybe_next_line = 0; |