GNU bug report logs - #24372
25.1.50; After losing focus, cursor is hidden when moving point

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Mon, 5 Sep 2016 19:17:01 UTC

Severity: normal

Found in version 25.1.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 24372 <at> debbugs.gnu.org
Subject: bug#24372: 25.1.50; After losing focus, cursor is hidden when moving point
Date: Fri, 09 Sep 2016 18:59:50 +0000
[Message part 1 (text/plain, inline)]
Philipp Stephani <p.stephani2 <at> gmail.com> schrieb am Fr., 9. Sep. 2016 um
19:18 Uhr:

> Philipp Stephani <p.stephani2 <at> gmail.com> schrieb am Fr., 9. Sep. 2016 um
> 18:29 Uhr:
>
> Philipp Stephani <p.stephani2 <at> gmail.com> schrieb am Fr., 9. Sep. 2016 um
> 18:20 Uhr:
>
> Eli Zaretskii <eliz <at> gnu.org> schrieb am Fr., 9. Sep. 2016 um 18:07 Uhr:
>
> > From: Philipp Stephani <p.stephani2 <at> gmail.com>
> > Date: Fri, 09 Sep 2016 15:59:02 +0000
> > Cc: 24372 <at> debbugs.gnu.org
> >
> > Eli Zaretskii <eliz <at> gnu.org> schrieb am Di., 6. Sep. 2016 um 18:03 Uhr:
> >
> >  > From: Philipp Stephani <p.stephani2 <at> gmail.com>
> >  > Date: Mon, 05 Sep 2016 21:16:40 +0200
> >  >
> >  > emacs -Q -eval '(setq blink-cursor-delay 0.0)'
> >  >
> >  > Move point around in the scratch buffer (e.g. press C-b a couple of
> >  > times): the cursor stays visible, as it should be. Then put the mouse
> >  > focus on a different GTK window (not Emacs window), put the mouse
> focus
> >  > back on Emacs, and move point again: the cursor is hidden, making it
> >  > impossible to see until you stop moving.
> >
> >  Does it happen even if you wait with cursor motion until after the
> >  cursor blinks one time, i.e. if you start moving point with the cursor
> >  already visible after Emacs gets focus?
> >
> > Yes. No matter what state the cursor is in and how often it has already
> blinked, it becomes invisible when
> > moving.
>
> So what is the importance of moving focus out of the Emacs frame and
> then back into it?  Is the problem reproducible without that?  Or are
> you saying that focus-out followed by focus-in event somehow changes
> the behavior wrt displaying the cursor?
>
>
> Yes. The cursor only become invisible after a focus-out/focus-in event.
> This isn't surprising given that blink-cursor-mode changes focus-in-hook
> and focus-out-hook. Probably the bug is hidden somewhere in the complex
> interaction between the various blink-cursor timers and hooks.
>
>
> A simpler recipe that doesn't need explicit focus events is
>
> emacs -Q -eval '(progn (setq blink-cursor-delay 0.0)
> (blink-cursor-suspend) (blink-cursor-check))'
>
> and then start moving point.
>
>
> OK, I guess one issue is that setting blink-cursor-delay doesn't restart
> blink-cursor-idle-timer. (Similarly, changing blink-cursor-interval doesn't
> restart blink-cursor-timer.) While obviously we can't fix that when using
> setq, I'd suggest adding custom setters to the variables nevertheless.
>
> The direct cause of the issue seems to be that, when blink-cursor-delay is
> idle, after every command blink-cursor-start is called immediately, which
> hides the cursor. I guess that is so that in the default case where
> blink-cursor-delay = blink-cursor-interval the cursor frequency is
> constant. However, this causes the cursor to be hidden very quickly when
> blink-cursor-delay < blink-cursor-interval. Maybe in that case
> blink-cursor-start should show instead of hide the cursor, and
> run-with-timer should be called with an argument of (blink-cursor-interval
> - blink-cursor-delay), so that the cursor is at least shown for
> blink-cursor-interval. WDYT?
>

I just realized that this is equivalent to treating blink-cursor-interval
as a lower bound to blink-cursor-delay. Not sure whether that's the
intention of blink-cursor-delay.
[Message part 2 (text/html, inline)]

This bug report was last modified 8 years and 293 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.