unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Christopher Schmidt <ch@ristopher.com>
Cc: 17588@debbugs.gnu.org
Subject: bug#17588: 24.3.91; mouse-face glitchy
Date: Tue, 27 May 2014 19:04:12 +0300	[thread overview]
Message-ID: <83lhtni4xv.fsf@gnu.org> (raw)
In-Reply-To: <87egzf7klh@ristopher.com>

> From: Christopher Schmidt <ch@ristopher.com>
> Date: Tue, 27 May 2014 03:21:26 -0400 (EDT)
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> >> From: Christopher Schmidt <ch@ristopher.com>
> >> Date: Mon, 26 May 2014 16:17:11 -0400 (EDT)
> >> Whenever the faulty behaviour is present, in clear_mouse_face
> >> NILP (hlinfo->mouse_face_window) is always true and therefore the
> >> highlighting is not cleared.
> >
> > Which faulty behavior: the one when there's no highlighting at all, or
> > the one when it's present, but not cleared when the mouse pointer
> > moves off the text?
> 
> The window, in which I moved my mouse pointer around, had working
> highlighting that was not cleared.

OK.

> Most of the time both issues are present.  That is, in one window
> highlighting is present but not cleared whereas in another one there is
> no highlighting at all.

Let me see if I understand this part correctly: when you move the
mouse pointer in one window showing the buffer rms2, the highlighting
is shown, but is never removed when the mouse moves from one line to
another.  When you move the mouse into another window showing the same
rms2 buffer, and let the mouse pointer in that other window hover
above the text with mouse face, the highlighting there is never shown.
Is that correct?

> >> clear_mouse_face w/o bug:
> >
> > "w/o bug" meaning what? a different Emacs version or the same version,
> > but when it behaves correctly?
> 
> That is from the very same process that exposed the issue but then
> recovered somehow.

OK, thanks.

The data you show in the debugger, viz.:

> clear_mouse_face w/ bug:
> 
>     (gdb) p *hlinfo
>      {mouse_face_beg_row = -1, mouse_face_beg_col = -1, mouse_face_beg_x = 37,
>       mouse_face_end_row = -1, mouse_face_end_col = -1, mouse_face_end_x = 0,
>       mouse_face_window = 12026738, mouse_face_face_id = 34, mouse_face_overlay = 12026738,
>       mouse_face_mouse_frame = 0x1129898, mouse_face_mouse_x = -1, mouse_face_mouse_y = -1,
>       mouse_face_past_end = false, mouse_face_defer = false, mouse_face_hidden = false}
>     (gdb) p NILP (hlinfo->mouse_face_window)
>      true

includes peculiar values -1 for both mouse_face_mouse_x and
mouse_face_mouse_y.  AFAICS, there's only one way to get these values:
if clear_mouse_face is called via note_mouse_highlight from this
function in xterm.c:

  static int
  note_mouse_movement (struct frame *frame, const XMotionEvent *event)
  {
    XRectangle *r;
    struct x_display_info *dpyinfo;

    if (!FRAME_X_OUTPUT (frame))
      return 0;

    dpyinfo = FRAME_DISPLAY_INFO (frame);
    dpyinfo->last_mouse_movement_time = event->time;
    dpyinfo->last_mouse_motion_frame = frame;
    dpyinfo->last_mouse_motion_x = event->x;
    dpyinfo->last_mouse_motion_y = event->y;

    if (event->window != FRAME_X_WINDOW (frame))
      {
	frame->mouse_moved = 1;
	dpyinfo->last_mouse_scroll_bar = NULL;
	note_mouse_highlight (frame, -1, -1);  <<<<<<<<<<<<<<<<<<<<<<<<<
	dpyinfo->last_mouse_glyph_frame = NULL;
	return 1;
      }

Can you see if clear_mouse_face is ever called from any other place,
when the highlighting isn't cleared when you move the mouse pointer to
another line of text in the same window?  If there _are_ any other
places from which clear_mouse_face is called, could you please show
the full contents of the hlinfo struct when it arrives in
clear_mouse_face in those other call sequences?

FWIW, the corresponding code on w32 is never executed when I run your
recipe and move inside and between the two windows that display the
rms2 buffer.





  reply	other threads:[~2014-05-27 16:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-25 19:04 bug#17588: 24.3.91; mouse-face glitchy Christopher Schmidt
2014-05-25 19:25 ` Eli Zaretskii
2014-05-25 20:04   ` Christopher Schmidt
2014-05-26  2:38     ` Eli Zaretskii
2014-05-26  8:35       ` Christopher Schmidt
2014-05-26 15:37         ` Eli Zaretskii
2014-05-26 20:17           ` Christopher Schmidt
2014-05-27  2:40             ` Eli Zaretskii
2014-05-27  7:21               ` Christopher Schmidt
2014-05-27 16:04                 ` Eli Zaretskii [this message]
2014-05-27 17:09                   ` Michael Heerdegen
2014-05-28 12:27                   ` Christopher Schmidt
2014-05-28 18:39                     ` Eli Zaretskii
2014-05-28 20:15                       ` Christopher Schmidt
2014-05-29 15:56                         ` Eli Zaretskii
2014-05-29 16:14                           ` Christopher Schmidt
2014-05-29 16:49                             ` Eli Zaretskii
2014-05-29 16:51                             ` Eli Zaretskii
2014-05-26 20:45       ` Michael Heerdegen
2014-05-26 21:17         ` Michael Heerdegen
2014-05-27  2:42           ` Eli Zaretskii
2014-05-27 13:09   ` martin rudalics
2014-05-27 15:33     ` Eli Zaretskii

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=83lhtni4xv.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=17588@debbugs.gnu.org \
    --cc=ch@ristopher.com \
    /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).