GNU bug report logs - #17609
24.4.50; trunk r117096: disappearing cursor in X

Previous Next

Package: emacs;

Reported by: Jan Tatarik <jan.tatarik <at> gmail.com>

Date: Tue, 27 May 2014 15:40:01 UTC

Severity: normal

Tags: moreinfo

Found in version 24.4.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17609 in the body.
You can then email your comments to 17609 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#17609; Package emacs. (Tue, 27 May 2014 15:40:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jan Tatarik <jan.tatarik <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 27 May 2014 15:40:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jan Tatarik <jan.tatarik <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4.50; trunk r117096: disappearing cursor in X
Date: Tue, 27 May 2014 15:43:37 +0200
Starting with revision 117096, the X cursor will sometimes disappear and
remain invisible until as long as emacs is running.

Steps to reproduce (emacs with X support):

1) emacs -Q and the initial frame (frame A) appears

2) C-x 5 2 and new frame (frame B) appears

3) switch to frame B and position the mouse cursor inside the frame

4) start typing in frame B's scratch buffer - the mouse cursor
   disappears

5) C-x 5 0  to kill frame B

6) back in frame A, but the cursor is still invisible. It remains
   invisible until emacs is exited.


Expected behavior: in step 6, the cursor should have appeared
again. This is working correctly in revision 117095.











In GNU Emacs 24.4.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.17)
 of 2014-05-27 on nb-jtatarik2
Repository revision: 117165 eggert <at> cs.ucla.edu-20140527063729-rdl39wb178p4v6xj
Windowing system distributor `The X.Org Foundation', version 11.0.11303000
System Description:	Linux Mint 15 Olivia

Configured using:
 `configure --with-x-toolkit=gtk2'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS NOTIFY
GNUTLS LIBXML2 FREETYPE XFT ZLIB

Important settings:
  value of $LC_COLLATE: C
  value of $LC_MONETARY: en_US.UTF-8
  value of $LC_NUMERIC: en_US.UTF-8
  value of $LC_TIME: en_GB.UTF8
  value of $LANG: en_US.UTF8
  locale-coding-system: utf-8-unix





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17609; Package emacs. (Tue, 27 May 2014 17:53:02 GMT) Full text and rfc822 format available.

Message #8 received at 17609 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Antipov <dmantipov <at> yandex.ru>
To: Jan Tatarik <jan.tatarik <at> gmail.com>
Cc: 17609 <at> debbugs.gnu.org
Subject: Re: bug#17609: 24.4.50; trunk r117096: disappearing cursor in X
Date: Tue, 27 May 2014 21:52:07 +0400
On 05/27/2014 05:43 PM, Jan Tatarik wrote:

> Starting with revision 117096, the X cursor will sometimes disappear and
> remain invisible until as long as emacs is running.

Reproduced. Could you please verify that old (fallback) code
still works?  I.e. with Xfixes extension always disabled?

=== modified file 'src/xterm.c'
--- src/xterm.c	2014-05-14 13:55:37 +0000
+++ src/xterm.c	2014-05-27 17:49:02 +0000
@@ -9752,8 +9752,7 @@
 x_probe_xfixes_extension (Display *dpy)
 {
 #ifdef HAVE_XFIXES
-  int major, minor;
-  return XFixesQueryVersion (dpy, &major, &minor) && major >= 4;
+  return false;
 #else
   return false;
 #endif /* HAVE_XFIXES */

Dmitry






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17609; Package emacs. (Tue, 27 May 2014 20:17:02 GMT) Full text and rfc822 format available.

Message #11 received at 17609 <at> debbugs.gnu.org (full text, mbox):

From: Jan Tatarik <jan.tatarik <at> gmail.com>
To: Dmitry Antipov <dmantipov <at> yandex.ru>
Cc: 17609 <at> debbugs.gnu.org, Jan Tatarik <jan.tatarik <at> gmail.com>
Subject: Re: bug#17609: 24.4.50; trunk r117096: disappearing cursor in X
Date: Tue, 27 May 2014 22:16:08 +0200
On Tue, May 27 2014, Dmitry Antipov wrote:

> On 05/27/2014 05:43 PM, Jan Tatarik wrote:

>> Starting with revision 117096, the X cursor will sometimes disappear and
>> remain invisible until as long as emacs is running.

> Reproduced. Could you please verify that old (fallback) code
> still works?  I.e. with Xfixes extension always disabled?

That works indeed.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17609; Package emacs. (Tue, 27 May 2014 23:31:02 GMT) Full text and rfc822 format available.

Message #14 received at 17609 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Jan Tatarik <jan.tatarik <at> gmail.com>
Cc: Dmitry Antipov <dmantipov <at> yandex.ru>, 17609 <at> debbugs.gnu.org
Subject: Re: bug#17609: 24.4.50; trunk r117096: disappearing cursor in X
Date: Tue, 27 May 2014 19:30:00 -0400
>>> Starting with revision 117096, the X cursor will sometimes disappear and
>>> remain invisible until as long as emacs is running.

Ha, I see this as well, but I upgraded my window manager right around
the same time, so I assumed the bug was in the window-manager.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17609; Package emacs. (Wed, 28 May 2014 04:18:02 GMT) Full text and rfc822 format available.

Message #17 received at 17609 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Antipov <dmantipov <at> yandex.ru>
To: Jan Tatarik <jan.tatarik <at> gmail.com>
Cc: 17609 <at> debbugs.gnu.org
Subject: Re: bug#17609: 24.4.50; trunk r117096: disappearing cursor in X
Date: Wed, 28 May 2014 08:17:36 +0400
[Message part 1 (text/plain, inline)]
On 05/28/2014 12:16 AM, Jan Tatarik wrote:

> That works indeed.

Hm... the whole thing (totally disappeared pointer) makes me think that
Xfixes functions operates on X screens but not X windows :-(. Anyway,
please try this patch.

Dmitry

[bug17609.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17609; Package emacs. (Wed, 28 May 2014 07:45:01 GMT) Full text and rfc822 format available.

Message #20 received at 17609 <at> debbugs.gnu.org (full text, mbox):

From: Jan Tatarik <jan.tatarik <at> gmail.com>
To: Dmitry Antipov <dmantipov <at> yandex.ru>
Cc: 17609 <at> debbugs.gnu.org
Subject: Re: bug#17609: 24.4.50; trunk r117096: disappearing cursor in X
Date: Wed, 28 May 2014 09:44:27 +0200
On Wed, May 28 2014, Dmitry Antipov wrote:

> On 05/28/2014 12:16 AM, Jan Tatarik wrote:

>> That works indeed.

> Hm... the whole thing (totally disappeared pointer) makes me think that
> Xfixes functions operates on X screens but not X windows :-(. Anyway,
> please try this patch.

Works.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17609; Package emacs. (Mon, 02 Jun 2014 13:40:02 GMT) Full text and rfc822 format available.

Message #23 received at 17609 <at> debbugs.gnu.org (full text, mbox):

From: Jan Tatarik <jan.tatarik <at> gmail.com>
To: Dmitry Antipov <dmantipov <at> yandex.ru>
Cc: 17609 <at> debbugs.gnu.org
Subject: Re: bug#17609: 24.4.50; trunk r117096: disappearing cursor in X
Date: Mon, 02 Jun 2014 13:47:12 +0200
On Wed, May 28 2014, Dmitry Antipov wrote:

> Hm... the whole thing (totally disappeared pointer) makes me think that
> Xfixes functions operates on X screens but not X windows :-(. Anyway,
> please try this patch.

There's still an issue. Pop-up notifications (notifications.el)
triggered by emacs make the cursor disappear. The cursor remains hidden
until emacs gets focus again.

At this moment I cannot provide exact steps to reproduce, as executing
the notifications-notify function manually doesn't exhibit the problem.

I'm using erc with the desktop-notification plugin. I am also using
appt.el, with the following advice:

(defadvice appt-disp-window (after my:appt-notify activate compile)
  "Pop up notification for upcoming appointments."
  (with-current-buffer appt-buffer-name
    (let ((body (buffer-string)))
      (notifications-notify
       :title "Appointment"
       :body body
       :app-icon "/usr/share/icons/gnome/48x48/status/appointment-soon.png"))))

I'm not 100% sure about the notifications coming from erc, but I have
confirmed with the ones from appt - if emacs triggers the notification
while some other, non-emacs window is focused (e.g. my browser), the
cursor will disappear. It reappears when I switch back to emacs.

Hope this helps.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17609; Package emacs. (Tue, 03 Jun 2014 12:41:02 GMT) Full text and rfc822 format available.

Message #26 received at 17609 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Antipov <dmantipov <at> yandex.ru>
To: Jan Tatarik <jan.tatarik <at> gmail.com>
Cc: 17609 <at> debbugs.gnu.org
Subject: Re: bug#17609: 24.4.50; trunk r117096: disappearing cursor in X
Date: Tue, 03 Jun 2014 16:40:22 +0400
[Message part 1 (text/plain, inline)]
On 06/02/2014 03:47 PM, Jan Tatarik wrote:

> There's still an issue. Pop-up notifications (notifications.el)
> triggered by emacs make the cursor disappear. The cursor remains hidden
> until emacs gets focus again.

I'm not familiar with this code and don't know how the notifications popup
window is created. Anyway, please try this tiny patch.

Dmitry


[bug17609_2.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17609; Package emacs. (Thu, 05 Jun 2014 20:43:02 GMT) Full text and rfc822 format available.

Message #29 received at 17609 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Dmitry Antipov <dmantipov <at> yandex.ru>
Cc: 17609 <at> debbugs.gnu.org, Jan Tatarik <jan.tatarik <at> gmail.com>
Subject: Re: bug#17609: 24.4.50; trunk r117096: disappearing cursor in X
Date: Thu, 05 Jun 2014 16:42:07 -0400
>> There's still an issue. Pop-up notifications (notifications.el)
>> triggered by emacs make the cursor disappear. The cursor remains hidden
>> until emacs gets focus again.
> I'm not familiar with this code and don't know how the notifications popup
> window is created. Anyway, please try this tiny patch.

I'm still seeing disappearing cursors as well in trunk.
These seem to be remaining bugs in the new Xfixes code in Emacs.
I haven't tracked down a recipe yet, but I'll try and do that soon.
In the mean time I have another related problem:

Apparently the xfixes code itself is buggy in the xinerama X11 server:
- when I hit a key in Emacs, the mouse cursor is not "undrawn" and so
  the drawing of that cursor lingers on the screen until the next time
  this part of the screen gets redisplayed.
- better yet, the "undrawing" actually takes place but in the wrong
  screen (and with the wrong pixmap).  So in the right screen I get lots
  of ghost cursors and in the left screen I get matching "square blobs".
[ See https://bugs.freedesktop.org/show_bug.cgi?id=79703 ]

So, while I'm not necessarily advocating reverting to the non-xfixes
code, I think it would be good if the user could tell Emacs not to use
xfixes, in order to work around these bugs.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17609; Package emacs. (Wed, 09 Sep 2020 12:00:02 GMT) Full text and rfc822 format available.

Message #32 received at 17609 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dmitry Antipov <dmantipov <at> yandex.ru>
Cc: 17609 <at> debbugs.gnu.org, Jan Tatarik <jan.tatarik <at> gmail.com>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#17609: 24.4.50; trunk r117096: disappearing cursor in X
Date: Wed, 09 Sep 2020 13:59:30 +0200
Dmitry Antipov <dmantipov <at> yandex.ru> writes:

>> There's still an issue. Pop-up notifications (notifications.el)
>> triggered by emacs make the cursor disappear. The cursor remains hidden
>> until emacs gets focus again.
>
> I'm not familiar with this code and don't know how the notifications popup
> window is created. Anyway, please try this tiny patch.

[...]

> +#ifdef HAVE_X_WINDOWS
> +  /* Don't confuse user with invisible cursor.  */
> +  if (FRAME_X_P (f) && f->pointer_invisible)
> +    FRAME_DISPLAY_INFO (f)->toggle_visible_pointer (f, 0);
> +#endif
> +
>  #if defined USE_X_TOOLKIT || defined USE_GTK
>    if (FRAME_WINDOW_P (f))
>      return xw_popup_dialog (f, header, contents);

This patch wasn't discussed or applied, as far as I can tell.

This was six years ago, though -- is this still an issue?  I can't
recall seeing the cursor disappearing lately, at least.

Stefan had some comments about xfixes in xinerama.  The issue in the bug
tracker there got no response, though:

https://gitlab.freedesktop.org/xorg/driver/xf86-video-fbdev/-/issues/4

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 09 Sep 2020 12:00:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17609; Package emacs. (Sun, 06 Dec 2020 15:58:02 GMT) Full text and rfc822 format available.

Message #37 received at 17609 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dmitry Antipov <dmantipov <at> yandex.ru>
Cc: 17609 <at> debbugs.gnu.org, Jan Tatarik <jan.tatarik <at> gmail.com>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#17609: 24.4.50; trunk r117096: disappearing cursor in X
Date: Sun, 06 Dec 2020 16:56:49 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> This patch wasn't discussed or applied, as far as I can tell.
>
> This was six years ago, though -- is this still an issue?  I can't
> recall seeing the cursor disappearing lately, at least.

More information was requested, but none was received, so I'm closing
this bug report.  If this is still an issue, please respond to the
debbugs address and we'll reopen the report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 17609 <at> debbugs.gnu.org and Jan Tatarik <jan.tatarik <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 06 Dec 2020 15:58:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 04 Jan 2021 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 228 days ago.

Previous Next


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