From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.bugs Subject: bug#17609: 24.4.50; trunk r117096: disappearing cursor in X Date: Wed, 28 May 2014 08:17:36 +0400 Message-ID: <53856360.5030401@yandex.ru> References: <87lhtnnxpy.fsf@nb-jtatarik2.xing.hh> <5384D0C7.2090808@yandex.ru> <87ppiz7zav.fsf@nb-jtatarik2.xing.hh> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030902070901010705060700" X-Trace: ger.gmane.org 1401250708 30806 80.91.229.3 (28 May 2014 04:18:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 May 2014 04:18:28 +0000 (UTC) Cc: 17609@debbugs.gnu.org To: Jan Tatarik Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 28 06:18:21 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WpVJk-00051I-92 for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 May 2014 06:18:20 +0200 Original-Received: from localhost ([::1]:39450 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpVJj-0004c8-MY for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 May 2014 00:18:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpVJa-0004c0-2r for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 00:18:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WpVJT-00011y-0l for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 00:18:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpVJS-00011k-Ro for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 00:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WpVJS-0004Gw-4B for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 00:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Antipov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 May 2014 04:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17609 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17609-submit@debbugs.gnu.org id=B17609.140125066716390 (code B ref 17609); Wed, 28 May 2014 04:18:02 +0000 Original-Received: (at 17609) by debbugs.gnu.org; 28 May 2014 04:17:47 +0000 Original-Received: from localhost ([127.0.0.1]:33902 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WpVJC-0004GI-GE for submit@debbugs.gnu.org; Wed, 28 May 2014 00:17:46 -0400 Original-Received: from forward10l.mail.yandex.net ([84.201.143.143]:59730) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WpVJ9-0004G0-Be for 17609@debbugs.gnu.org; Wed, 28 May 2014 00:17:44 -0400 Original-Received: from smtp6.mail.yandex.net (smtp6.mail.yandex.net [77.88.61.56]) by forward10l.mail.yandex.net (Yandex) with ESMTP id ED726BA122E; Wed, 28 May 2014 08:17:36 +0400 (MSK) Original-Received: from smtp6.mail.yandex.net (localhost [127.0.0.1]) by smtp6.mail.yandex.net (Yandex) with ESMTP id 960CA1640784; Wed, 28 May 2014 08:17:36 +0400 (MSK) Original-Received: from unknown (unknown [37.139.80.10]) by smtp6.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id f5HCHD9ErW-HaDSjESW; Wed, 28 May 2014 08:17:36 +0400 (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client certificate not present) X-Yandex-Uniq: 7791305f-51df-4931-8d27-b5220c91065d DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1401250656; bh=vwFf5fZHu+JbXbtGBHawOAEG5WXOJlxi0w/BfIaHXnc=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type; b=DSv6U11KBPqI4muDtcZhkA08Jqcm9aamfG6EbSvdRaYswnab4JN4Pq3M5e/9ga/EH wj2C5ra3GedVl+LWKLBj5+t9n3YBBanDOIa5dsFGU2zXna2+J61nEnebZj7B5sfNlL ooQALya1yItutcha/S7/DPp7b5CHtISyKmKSAHTg= Authentication-Results: smtp6.mail.yandex.net; dkim=pass header.i=@yandex.ru User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: <87ppiz7zav.fsf@nb-jtatarik2.xing.hh> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:89595 Archived-At: This is a multi-part message in MIME format. --------------030902070901010705060700 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 --------------030902070901010705060700 Content-Type: text/x-patch; name="bug17609.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="bug17609.patch" === 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. */ --------------030902070901010705060700--