aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm <[email protected]>2005-10-13 22:41:40 +0000
committerKim F. Storm <[email protected]>2005-10-13 22:41:40 +0000
commit8460eb1eb5129fa1b162cc92098f58bd1ad52841 (patch)
tree12dfc91f32cadf4e39a4cf42a03a5f37573d6462 /src
parentbb339c57aaed49ad5e9dddcab8f70ac35a94d7ed (diff)
(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 de24049d83..f7f7898b47 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)
current_header_line_height = current_mode_line_height = -1;
if (visible_p && XFASTINT (w->hscroll) > 0)
- *x -= XFASTINT (w->hscroll);
+ *x -= XFASTINT (w->hscroll) * WINDOW_FRAME_COLUMN_WIDTH (w);
return visible_p;
}
@@ -2112,7 +2112,16 @@ remember_mouse_glyph (f, gx, gy, rect)
break;
if (g < end)
- width = g->pixel_width;
+ {
+ if (g->type == IMAGE_GLYPH)
+ {
+ /* Don't remember when mouse is over image, as
+ image may have hot-spots. */
+ STORE_NATIVE_RECT (*rect, 0, 0, 0, 0);
+ return;
+ }
+ width = g->pixel_width;
+ }
else
{
/* Use nominal char spacing at end of line. */