Mercurial > emacs
changeset 6055:a9f61727a90c
(construct_mouse_click): Don't convert to glyph units.
(XTmouse_position): Don't convert to glyph units.
(XTmouse_position): Use x_any_window_to_frame.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 24 Feb 1994 06:22:23 +0000 |
parents | 24ffc4bc4067 |
children | afa75a0c15f8 |
files | src/xterm.c |
diffstat | 1 files changed, 20 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xterm.c Thu Feb 24 06:20:30 1994 +0000 +++ b/src/xterm.c Thu Feb 24 06:22:23 1994 +0000 @@ -1716,6 +1716,16 @@ *y = pix_y; } +void +glyph_to_pixel_coords (f, x, y, pix_x, pix_y) + FRAME_PTR f; + register int x, y; + register int *pix_x, *pix_y; +{ + *pix_x = CHAR_TO_PIXEL_COL (f, x); + *pix_y = CHAR_TO_PIXEL_ROW (f, y); +} + /* Prepare a mouse-event in *RESULT for placement in the input queue. If the event is a button press, then note that we have grabbed @@ -1755,9 +1765,13 @@ { int row, column; +#if 0 pixel_to_glyph_coords (f, event->x, event->y, &column, &row, NULL, 0); XFASTINT (result->x) = column; XFASTINT (result->y) = row; +#endif + XFASTINT (result->x) = event->x; + XFASTINT (result->y) = event->y; XSET (result->frame_or_window, Lisp_Frame, f); } } @@ -1953,7 +1967,7 @@ never use them in that case.) */ /* Is win one of our frames? */ - f1 = x_window_to_frame (win); + f1 = x_any_window_to_frame (win); } /* If not, is it one of our scroll bars? */ @@ -1971,10 +1985,11 @@ if (f1) { - /* Ok, we found a frame. Convert from pixels to characters - and store all the values. */ - - pixel_to_glyph_coords (f1, win_x, win_y, &win_x, &win_y, + int ignore1, ignore2; + + /* Ok, we found a frame. Store all the values. */ + + pixel_to_glyph_coords (f1, win_x, win_y, &ignore1, &ignore2, &last_mouse_glyph, x_mouse_grabbed); *bar_window = Qnil;