diff options
| author | Richard M. Stallman | 1994-02-24 06:20:30 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-02-24 06:20:30 +0000 |
| commit | 5384466adef7b9937df07974bb692bbb9d699ecd (patch) | |
| tree | e79e329e2aff18a384a286cbab535ef67fc45c04 /src/frame.c | |
| parent | 9e20143afcd6a5f9e695b4cf7255d0b1e572dbc3 (diff) | |
| download | emacs-5384466adef7b9937df07974bb692bbb9d699ecd.tar.gz emacs-5384466adef7b9937df07974bb692bbb9d699ecd.zip | |
(Fmouse_position): Convert to glyph units.
Diffstat (limited to 'src/frame.c')
| -rw-r--r-- | src/frame.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/frame.c b/src/frame.c index f3b83ff106c..98b6fb32f3e 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -825,6 +825,7 @@ and nil for X and Y.") | |||
| 825 | Lisp_Object lispy_dummy; | 825 | Lisp_Object lispy_dummy; |
| 826 | enum scroll_bar_part party_dummy; | 826 | enum scroll_bar_part party_dummy; |
| 827 | Lisp_Object x, y; | 827 | Lisp_Object x, y; |
| 828 | int col, row; | ||
| 828 | unsigned long long_dummy; | 829 | unsigned long long_dummy; |
| 829 | 830 | ||
| 830 | f = selected_frame; | 831 | f = selected_frame; |
| @@ -836,7 +837,11 @@ and nil for X and Y.") | |||
| 836 | &lispy_dummy, &party_dummy, | 837 | &lispy_dummy, &party_dummy, |
| 837 | &x, &y, | 838 | &x, &y, |
| 838 | &long_dummy); | 839 | &long_dummy); |
| 839 | 840 | col = XINT (x); | |
| 841 | row = XINT (y); | ||
| 842 | glyph_to_pixel_coords (f, col, row, &col, &row); | ||
| 843 | XSETINT (x, col); | ||
| 844 | XSETINT (y, row); | ||
| 840 | XSET (lispy_dummy, Lisp_Frame, f); | 845 | XSET (lispy_dummy, Lisp_Frame, f); |
| 841 | return Fcons (lispy_dummy, Fcons (x, y)); | 846 | return Fcons (lispy_dummy, Fcons (x, y)); |
| 842 | } | 847 | } |
| @@ -1769,6 +1774,11 @@ and nil for X and Y.") | |||
| 1769 | &x, &y, | 1774 | &x, &y, |
| 1770 | &long_dummy); | 1775 | &long_dummy); |
| 1771 | 1776 | ||
| 1777 | col = XINT (x); | ||
| 1778 | row = XINT (y); | ||
| 1779 | glyph_to_pixel_coords (f, col, row, &col, &row); | ||
| 1780 | XSETINT (x, col); | ||
| 1781 | XSETINT (y, row); | ||
| 1772 | /* Always return nil for frame. */ | 1782 | /* Always return nil for frame. */ |
| 1773 | return Fcons (Qnil, Fcons (x, y)); | 1783 | return Fcons (Qnil, Fcons (x, y)); |
| 1774 | } | 1784 | } |