mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-11 14:01:43 -08:00
(Fmouse_position): Convert to glyph units.
This commit is contained in:
parent
9e20143afc
commit
5384466ade
1 changed files with 11 additions and 1 deletions
12
src/frame.c
12
src/frame.c
|
|
@ -825,6 +825,7 @@ and nil for X and Y.")
|
|||
Lisp_Object lispy_dummy;
|
||||
enum scroll_bar_part party_dummy;
|
||||
Lisp_Object x, y;
|
||||
int col, row;
|
||||
unsigned long long_dummy;
|
||||
|
||||
f = selected_frame;
|
||||
|
|
@ -836,7 +837,11 @@ and nil for X and Y.")
|
|||
&lispy_dummy, &party_dummy,
|
||||
&x, &y,
|
||||
&long_dummy);
|
||||
|
||||
col = XINT (x);
|
||||
row = XINT (y);
|
||||
glyph_to_pixel_coords (f, col, row, &col, &row);
|
||||
XSETINT (x, col);
|
||||
XSETINT (y, row);
|
||||
XSET (lispy_dummy, Lisp_Frame, f);
|
||||
return Fcons (lispy_dummy, Fcons (x, y));
|
||||
}
|
||||
|
|
@ -1769,6 +1774,11 @@ and nil for X and Y.")
|
|||
&x, &y,
|
||||
&long_dummy);
|
||||
|
||||
col = XINT (x);
|
||||
row = XINT (y);
|
||||
glyph_to_pixel_coords (f, col, row, &col, &row);
|
||||
XSETINT (x, col);
|
||||
XSETINT (y, row);
|
||||
/* Always return nil for frame. */
|
||||
return Fcons (Qnil, Fcons (x, y));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue