From: Dmitry Antipov <dmantipov@yandex.ru>
To: Jan Tatarik <jan.tatarik@gmail.com>
Cc: 17609@debbugs.gnu.org
Subject: bug#17609: 24.4.50; trunk r117096: disappearing cursor in X
Date: Wed, 28 May 2014 08:17:36 +0400 [thread overview]
Message-ID: <53856360.5030401@yandex.ru> (raw)
In-Reply-To: <87ppiz7zav.fsf@nb-jtatarik2.xing.hh>
[-- Attachment #1: Type: text/plain, Size: 240 bytes --]
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
[-- Attachment #2: bug17609.patch --]
[-- Type: text/x-patch, Size: 3516 bytes --]
=== modified file 'src/cmds.c'
--- src/cmds.c 2014-03-04 03:14:11 +0000
+++ src/cmds.c 2014-05-28 03:08:40 +0000
@@ -315,7 +315,7 @@
int val = internal_self_insert (character, XFASTINT (n));
if (val == 2)
nonundocount = 0;
- frame_make_pointer_invisible ();
+ frame_make_pointer_invisible (SELECTED_FRAME ());
}
return Qnil;
=== modified file 'src/frame.c'
--- src/frame.c 2014-04-03 20:46:04 +0000
+++ src/frame.c 2014-05-28 03:49:01 +0000
@@ -4373,16 +4373,11 @@
#endif /* HAVE_WINDOW_SYSTEM */
void
-frame_make_pointer_invisible (void)
+frame_make_pointer_invisible (struct frame *f)
{
if (! NILP (Vmake_pointer_invisible))
{
- struct frame *f;
- if (!FRAMEP (selected_frame) || !FRAME_LIVE_P (XFRAME (selected_frame)))
- return;
-
- f = SELECTED_FRAME ();
- if (f && !f->pointer_invisible
+ if (f && FRAME_LIVE_P (f) && !f->pointer_invisible
&& FRAME_TERMINAL (f)->toggle_invisible_pointer_hook)
{
f->mouse_moved = 0;
@@ -4393,17 +4388,11 @@
}
void
-frame_make_pointer_visible (void)
+frame_make_pointer_visible (struct frame *f)
{
/* We don't check Vmake_pointer_invisible here in case the
pointer was invisible when Vmake_pointer_invisible was set to nil. */
- struct frame *f;
-
- if (!FRAMEP (selected_frame) || !FRAME_LIVE_P (XFRAME (selected_frame)))
- return;
-
- f = SELECTED_FRAME ();
- if (f && f->pointer_invisible && f->mouse_moved
+ if (f && FRAME_LIVE_P (f) && f->pointer_invisible && f->mouse_moved
&& FRAME_TERMINAL (f)->toggle_invisible_pointer_hook)
{
FRAME_TERMINAL (f)->toggle_invisible_pointer_hook (f, 0);
=== modified file 'src/frame.h'
--- src/frame.h 2014-04-04 16:59:50 +0000
+++ src/frame.h 2014-05-28 03:08:21 +0000
@@ -995,8 +995,8 @@
#endif /* HAVE_WINDOW_SYSTEM */
extern bool window_system_available (struct frame *);
extern void check_window_system (struct frame *);
-extern void frame_make_pointer_invisible (void);
-extern void frame_make_pointer_visible (void);
+extern void frame_make_pointer_invisible (struct frame *);
+extern void frame_make_pointer_visible (struct frame *);
extern Lisp_Object delete_frame (Lisp_Object, Lisp_Object);
extern Lisp_Object Vframe_list;
=== modified file 'src/keyboard.c'
--- src/keyboard.c 2014-05-28 00:50:44 +0000
+++ src/keyboard.c 2014-05-28 04:05:53 +0000
@@ -6877,6 +6877,20 @@
}
}
+ /* If there was no error, make sure the cursor
+ is visible for all frames on this terminal. */
+ if (nr >= 0)
+ {
+ Lisp_Object tail, frame;
+
+ FOR_EACH_FRAME (tail, frame)
+ {
+ struct frame *f = XFRAME (frame);
+ if (FRAME_TERMINAL (f) == t)
+ frame_make_pointer_visible (f);
+ }
+ }
+
if (hold_quit.kind != NO_EVENT)
kbd_buffer_store_event (&hold_quit);
}
@@ -6887,8 +6901,6 @@
if (err && !nread)
nread = -1;
- frame_make_pointer_visible ();
-
return nread;
}
=== modified file 'src/xterm.c'
--- src/xterm.c 2014-05-14 13:55:37 +0000
+++ src/xterm.c 2014-05-28 04:10:30 +0000
@@ -9233,6 +9233,10 @@
commands to the X server. */
if (dpyinfo->display)
{
+ /* Always exit with visible pointer to avoid weird issue
+ with Xfixes (Bug#17609). */
+ FRAME_DISPLAY_INFO (f)->toggle_visible_pointer (f, 0);
+
/* We must free faces before destroying windows because some
font-driver (e.g. xft) access a window while finishing a
face. */
next prev parent reply other threads:[~2014-05-28 4:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-27 13:43 bug#17609: 24.4.50; trunk r117096: disappearing cursor in X Jan Tatarik
2014-05-27 17:52 ` Dmitry Antipov
2014-05-27 20:16 ` Jan Tatarik
2014-05-27 23:30 ` Stefan Monnier
2014-05-28 4:17 ` Dmitry Antipov [this message]
2014-05-28 7:44 ` Jan Tatarik
2014-06-02 11:47 ` Jan Tatarik
2014-06-03 12:40 ` Dmitry Antipov
2014-06-05 20:42 ` Stefan Monnier
2020-09-09 11:59 ` Lars Ingebrigtsen
2020-12-06 15:56 ` Lars Ingebrigtsen
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=53856360.5030401@yandex.ru \
--to=dmantipov@yandex.ru \
--cc=17609@debbugs.gnu.org \
--cc=jan.tatarik@gmail.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).