From: Christopher Schmidt <ch@ristopher.com>
To: 17588@debbugs.gnu.org
Subject: bug#17588: 24.3.91; mouse-face glitchy
Date: Wed, 28 May 2014 16:15:25 -0400 (EDT) [thread overview]
Message-ID: <87y4xl3bjb@ristopher.com> (raw)
In-Reply-To: <83zji1hhn2.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 28 May 2014 21:39:45 +0300")
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Christopher Schmidt <ch@ristopher.com>
>> Date: Wed, 28 May 2014 08:27:57 -0400 (EDT)
>>
>> (gdb) bt
>> #0 clear_mouse_face (hlinfo=hlinfo@entry=0x1394780)
>> at xdisp.c:27495
>> #1 0x0000000000457fef in note_mouse_highlight (
>> f=f@entry=0x1129898, x=494, y=378) at xdisp.c:28812
> ^^^^^
> Does this large value of x make sense? AFAIU, you are in the lower
> window showing the buffer rms2, and you move the mouse above the text
> in that window. The text lines in that buffer are very short, so I
> wonder how come you get such a large value of the x coordinate.
You've got me there.
This is what I use for testing:
(run-at-time nil 0.01
(lambda ()
(with-current-buffer (get-buffer-create "rms")
(with-silent-modifications
(dotimes (_ 10)
(insert (if (= (random 2) 1) "gpl" "fsf") "\n"))
(when (> (- (point-max) (point-min)) 100)
(delete-region (point-min) (+ (point-min) 100)))))))
(with-current-buffer (get-buffer-create "rms2")
(dotimes (i 1000)
(insert (propertize (format "%3d%3d%3d" i i i)
'mouse-face 'highlight)
"\n")))
(with-selected-window (split-window-below)
(with-selected-window (split-window-right)
(switch-to-buffer "rms2"))
(switch-to-buffer "rms2"))
(with-selected-window (split-window-right)
(switch-to-buffer "rms"))
The snippet is loaded at startup via the --load option. As startup.el
claims the first window to display the initial buffer, I switched to a
four window setup.
> So are you saying that clear_mouse_face is never called with non-nil
> hlinfo->mouse_face_window? IOW, if you put a conditional breakpoint
> in clear_mouse_face, like this:
>
> (gdb) break clear_mouse_face if hlinfo->mouse_face_window != Qnil
>
> then this breakpoint never breaks, is that right?
Yes, it never breaks.
> If so, I'd like to see which code resets mouse_face_window to nil,
> after it is set by show_mouse_face. (We know that it must be set by
> show_mouse_face because you do see the highlighting when the mouse is
> above text with mouse-face.) To this end, set a breakpoint in
> show_mouse_face, like this:
>
> (gdb) break show_mouse_face if draw == DRAW_MOUSE_FACE
The watchpoint is triggered in turns as part of the following two
contexts. Qnil is 12026738.
Hardware watchpoint 12: -location hlinfo->mouse_face_window
Old value = 12026738
New value = 18193773
mouse_face_from_buffer_pos (disp_string=12026738, after_string=12026738,
before_string=12026738, end_charpos=<optimized out>, start_charpos=6711,
mouse_charpos=6717, hlinfo=<optimized out>, window=18193773) at xdisp.c:28062
28062 !hlinfo->mouse_face_hidden, -1);
#0 mouse_face_from_buffer_pos (disp_string=12026738, after_string=12026738,
before_string=12026738, end_charpos=<optimized out>, start_charpos=6711,
mouse_charpos=6717, hlinfo=<optimized out>, window=18193773) at xdisp.c:28062
#1 note_mouse_highlight (f=f@entry=0x1129898, x=<optimized out>,
y=<optimized out>) at xdisp.c:29151
#2 0x00000000004b4b86 in note_mouse_movement (frame=frame@entry=0x1129898,
event=event@entry=0x7fffffffdc80) at xterm.c:3887
#3 0x00000000004bcb09 in handle_one_xevent (dpyinfo=dpyinfo@entry=0x1396000,
event=event@entry=0x7fffffffdc80, finish=finish@entry=0xb071e0,
hold_quit=0x7fffffffdea0) at xterm.c:6644
#4 0x00000000004be320 in event_handler_gdk (gxev=0x7fffffffdc80,
ev=<optimized out>, data=<optimized out>) at xterm.c:5720
#5 0x00007ffff65cca2a in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#6 0x00007ffff65ce6f6 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#7 0x00007ffff65ce77e in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#8 0x00007ffff4a89355 in g_main_context_dispatch ()
from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9 0x00007ffff4a89688 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#10 0x00007ffff4a89744 in g_main_context_iteration ()
from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007ffff69609a1 in gtk_main_iteration ()
from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#12 0x00000000004b6d82 in XTread_socket (terminal=<optimized out>,
hold_quit=0x7fffffffdea0) at xterm.c:7013
#13 0x00000000004e8be1 in gobble_input () at keyboard.c:6849
#14 0x00000000004e8605 in handle_async_input () at keyboard.c:7089
#15 process_pending_signals () at keyboard.c:7103
#16 0x0000000000590e6e in wait_reading_process_output (
time_limit=time_limit@entry=30, nsecs=nsecs@entry=0,
read_kbd=read_kbd@entry=-1, do_display=do_display@entry=true,
wait_for_cell=12026738, wait_proc=wait_proc@entry=0x0, just_wait_proc=0)
at process.c:4340
#17 0x000000000041f363 in sit_for (timeout=<optimized out>,
reading=reading@entry=true, display_option=display_option@entry=1)
at dispnew.c:5805
#18 0x00000000004eca63 in read_char (commandflag=1, map=map@entry=19249734,
prev_event=12026738, used_mouse_menu=used_mouse_menu@entry=0x7fffffffe58b,
end_time=end_time@entry=0x0) at keyboard.c:2809
#19 0x00000000004edc75 in read_key_sequence (keybuf=keybuf@entry=0x7fffffffe660,
prompt=12026738, dont_downcase_last=dont_downcase_last@entry=false,
can_return_switch_frame=can_return_switch_frame@entry=true,
fix_current_buffer=fix_current_buffer@entry=true,
prevent_redisplay=prevent_redisplay@entry=false, bufsize=30) at keyboard.c:9087
#20 0x00000000004ef950 in command_loop_1 () at keyboard.c:1452
#21 0x0000000000550977 in internal_condition_case (
bfun=bfun@entry=0x4ef760 <command_loop_1>, handlers=<optimized out>,
hfun=hfun@entry=0x4e6bf0 <cmd_error>) at eval.c:1354
#22 0x00000000004e234e in command_loop_2 (ignore=ignore@entry=12026738)
at keyboard.c:1177
#23 0x000000000055085b in internal_catch (tag=12073890,
func=func@entry=0x4e2330 <command_loop_2>, arg=12026738) at eval.c:1118
#24 0x00000000004e6807 in command_loop () at keyboard.c:1156
#25 recursive_edit_1 () at keyboard.c:777
#26 0x00000000004e6b20 in Frecursive_edit () at keyboard.c:848
#27 0x0000000000415ab9 in main (argc=0, argv=0x7fffffffe9a8) at
emacs.c:1646
Hardware watchpoint 12: -location hlinfo->mouse_face_window
Old value = 18193773
New value = 12026738
reset_mouse_highlight (hlinfo=0x13960a0) at dispextern.h:2725
2725 hlinfo->mouse_face_overlay = Qnil;
#0 reset_mouse_highlight (hlinfo=0x13960a0) at dispextern.h:2725
#1 x_update_window_end (w=0x1139998, cursor_on_p=<optimized out>,
mouse_face_overwritten_p=<optimized out>) at xterm.c:600
#2 0x000000000041b17d in update_window (w=w@entry=0x1139998,
force_p=<optimized out>, force_p@entry=true) at dispnew.c:3486
#3 0x000000000041c3fb in update_window_tree (w=0x1139998,
force_p=force_p@entry=true) at dispnew.c:3161
#4 0x000000000041c3ee in update_window_tree (w=0x1144a48,
force_p=force_p@entry=true) at dispnew.c:3159
#5 0x000000000041c3ee in update_window_tree (w=w@entry=0x1148c60,
force_p=force_p@entry=true) at dispnew.c:3159
#6 0x000000000041e59d in update_frame (f=0x1129898, force_p=<optimized out>,
inhibit_hairy_id_p=<optimized out>) at dispnew.c:3059
#7 0x000000000044c0df in redisplay_internal () at xdisp.c:13844
#8 0x000000000044e0d0 in redisplay_preserve_echo_area (
from_where=from_where@entry=9) at xdisp.c:14058
#9 0x00000000005902a8 in wait_reading_process_output (
time_limit=time_limit@entry=30, nsecs=nsecs@entry=0,
read_kbd=read_kbd@entry=-1, do_display=do_display@entry=true,
wait_for_cell=12026738, wait_proc=wait_proc@entry=0x0, just_wait_proc=0)
at process.c:4398
#10 0x000000000041f363 in sit_for (timeout=<optimized out>,
reading=reading@entry=true, display_option=display_option@entry=1)
at dispnew.c:5805
#11 0x00000000004eca63 in read_char (commandflag=1, map=map@entry=19249734,
prev_event=12026738, used_mouse_menu=used_mouse_menu@entry=0x7fffffffe58b,
end_time=end_time@entry=0x0) at keyboard.c:2809
#12 0x00000000004edc75 in read_key_sequence (keybuf=keybuf@entry=0x7fffffffe660,
prompt=12026738, dont_downcase_last=dont_downcase_last@entry=false,
can_return_switch_frame=can_return_switch_frame@entry=true,
fix_current_buffer=fix_current_buffer@entry=true,
prevent_redisplay=prevent_redisplay@entry=false, bufsize=30) at keyboard.c:9087
#13 0x00000000004ef950 in command_loop_1 () at keyboard.c:1452
#14 0x0000000000550977 in internal_condition_case (
bfun=bfun@entry=0x4ef760 <command_loop_1>, handlers=<optimized out>,
hfun=hfun@entry=0x4e6bf0 <cmd_error>) at eval.c:1354
#15 0x00000000004e234e in command_loop_2 (ignore=ignore@entry=12026738)
at keyboard.c:1177
#16 0x000000000055085b in internal_catch (tag=12073890,
func=func@entry=0x4e2330 <command_loop_2>, arg=12026738) at eval.c:1118
#17 0x00000000004e6807 in command_loop () at keyboard.c:1156
#18 recursive_edit_1 () at keyboard.c:777
#19 0x00000000004e6b20 in Frecursive_edit () at keyboard.c:848
#20 0x0000000000415ab9 in main (argc=0, argv=0x7fffffffe9a8) at emacs.c:1646
next prev parent reply other threads:[~2014-05-28 20:15 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
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 [this message]
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=87y4xl3bjb@ristopher.com \
--to=ch@ristopher.com \
--cc=17588@debbugs.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).