aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2005-10-13 22:41:40 +0000
committerKim F. Storm2005-10-13 22:41:40 +0000
commit8460eb1eb5129fa1b162cc92098f58bd1ad52841 (patch)
tree12dfc91f32cadf4e39a4cf42a03a5f37573d6462 /src
parentbb339c57aaed49ad5e9dddcab8f70ac35a94d7ed (diff)
downloademacs-8460eb1eb5129fa1b162cc92098f58bd1ad52841.tar.gz
emacs-8460eb1eb5129fa1b162cc92098f58bd1ad52841.zip
(pos_visible_p): Convert w->hscroll to pixels before use.
(remember_mouse_glyph): Clear RECT if mouse is over an image glyph.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index de24049d830..f7f7898b476 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1348,7 +1348,7 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p)
1348 current_header_line_height = current_mode_line_height = -1; 1348 current_header_line_height = current_mode_line_height = -1;
1349 1349
1350 if (visible_p && XFASTINT (w->hscroll) > 0) 1350 if (visible_p && XFASTINT (w->hscroll) > 0)
1351 *x -= XFASTINT (w->hscroll); 1351 *x -= XFASTINT (w->hscroll) * WINDOW_FRAME_COLUMN_WIDTH (w);
1352 1352
1353 return visible_p; 1353 return visible_p;
1354} 1354}
@@ -2112,7 +2112,16 @@ remember_mouse_glyph (f, gx, gy, rect)
2112 break; 2112 break;
2113 2113
2114 if (g < end) 2114 if (g < end)
2115 width = g->pixel_width; 2115 {
2116 if (g->type == IMAGE_GLYPH)
2117 {
2118 /* Don't remember when mouse is over image, as
2119 image may have hot-spots. */
2120 STORE_NATIVE_RECT (*rect, 0, 0, 0, 0);
2121 return;
2122 }
2123 width = g->pixel_width;
2124 }
2116 else 2125 else
2117 { 2126 {
2118 /* Use nominal char spacing at end of line. */ 2127 /* Use nominal char spacing at end of line. */