[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
mouse cursor on modeline
From: |
Masatake YAMATO |
Subject: |
mouse cursor on modeline |
Date: |
Mon, 25 Jun 2007 11:41:59 +0900 (JST) |
Hi, I've tried to fix a bug reported in two years ago.
In http://lists.gnu.org/archive/html/emacs-devel/2005-05/msg01306.html Luc
Teirlinck
wrote the way how to reproduce the bug interactively.
> Nick Roberts wrote:
>
> > But shouldn't the cursor change to a hand cursor rather than an arrow
> > cursor when hoovering over a mouse-face?
>
> Following the change, if you have just line-number-mode on ,then the arrow
> pointer still displays over this area (I think this may be an existing
> bug not an introduced one).
>
> You mean the fact that if you start on the line number, where a double
> arrow is displayed, then move slightly to the right, it changes into a
> single sided slanted arrow for a short distance before turning into a
> double sided arrow again? That behavior is already present in an old
> CVS version from February 7 I still have around.
In http://lists.gnu.org/archive/html/emacs-devel/2005-05/msg01313.html I wrote
the way how to reproduce the bug rather non-interactively.
> (pp (format-mode-line mode-line-position))
> #("All L6 " 0 3
> (help-echo "mouse-1: select (drag to resize), mouse-2: delete others,
> mouse-3: delete this")
> 3 5
> (help-echo "mouse-1: select (drag to resize), mouse-2: delete others,
> mouse-3: delete this")
> 5 6
> (help-echo "mouse-1: select (drag to resize), mouse-2: delete others,
> mouse-3: delete this")
> 6 9 nil)
>
> "6 9 nil" becomes the hole.
> I'll take more time about this issue.
Could you review and test this patch?
Regards,
Masatake YAMATO
2007-06-25 Masatake YAMATO <address@hidden>
* xdisp.c (display_mode_element): Pass `props' to
`store_mode_line_string'.
Fill glyph's object field to inherit `props' from elt after calling
display_string.
--- xdisp.c 22 6月 2007 03:20:51 +0900 1.1156
+++ xdisp.c 25 6月 2007 11:21:07 +0900
@@ -17190,11 +17190,33 @@
n += store_mode_line_noprop ("", field_width - n, 0);
break;
case MODE_LINE_STRING:
- n += store_mode_line_string ("", Qnil, 0, field_width - n, 0, Qnil);
+ n += store_mode_line_string ("", Qnil, 0, field_width - n, 0, props);
break;
case MODE_LINE_DISPLAY:
- n += display_string ("", Qnil, Qnil, 0, 0, it, field_width - n,
- 0, 0, 0);
+ {
+ int nglyphs_before, nwritten;
+ nglyphs_before = it->glyph_row->used[TEXT_AREA];
+ nwritten = display_string ("", Qnil, Qnil, 0, 0, it, field_width -
n,
+ 0, 0, 0);
+
+ /* Fill glyph's object field to inherit `props' from elt. */
+ if (nwritten > 0)
+ {
+ struct glyph *glyph
+ = (it->glyph_row->glyphs[TEXT_AREA]
+ + nglyphs_before);
+ int i;
+ int charpos = 0;
+
+
+ for (i = 0; i < nwritten; ++i)
+ {
+ glyph[i].object = elt;
+ glyph[i].charpos = charpos;
+ }
+ n += nwritten;
+ }
+ }
break;
}
}
- mouse cursor on modeline,
Masatake YAMATO <=