From: Masatake YAMATO <jet@gyve.org>
To: emacs-devel@gnu.org
Subject: mouse cursor on modeline
Date: Mon, 25 Jun 2007 11:41:59 +0900 (JST) [thread overview]
Message-ID: <20070625.114159.103113663.jet@gyve.org> (raw)
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 <jet@gyve.org>
* 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;
}
}
next reply other threads:[~2007-06-25 2:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-25 2:41 Masatake YAMATO [this message]
2007-06-25 4:37 ` mouse cursor on modeline Nick Roberts
2007-07-01 20:40 ` Richard Stallman
2007-07-09 9:44 ` Masatake YAMATO
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070625.114159.103113663.jet@gyve.org \
--to=jet@gyve.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).