From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: make-pointer-invisible on Windows Date: Wed, 24 Jun 2015 22:21:48 +0300 Message-ID: <83k2usewtv.fsf@gnu.org> References: <558A75C6.7040003@gmx.at> <83zj3pdusu.fsf@gnu.org> <558AEB8D.4070603@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1435173749 20436 80.91.229.3 (24 Jun 2015 19:22:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Jun 2015 19:22:29 +0000 (UTC) Cc: emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 24 21:22:23 2015 Return-path: Envelope-to: ged-emacs-devel@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 1Z7qFa-0003jv-Eq for ged-emacs-devel@m.gmane.org; Wed, 24 Jun 2015 21:22:22 +0200 Original-Received: from localhost ([::1]:52585 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7qFZ-0000iG-U2 for ged-emacs-devel@m.gmane.org; Wed, 24 Jun 2015 15:22:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7qFH-0000hD-5T for emacs-devel@gnu.org; Wed, 24 Jun 2015 15:22:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7qFD-0001H6-Uo for emacs-devel@gnu.org; Wed, 24 Jun 2015 15:22:03 -0400 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:44787) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7qFD-0001Gy-HX for emacs-devel@gnu.org; Wed, 24 Jun 2015 15:21:59 -0400 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NQG00D00R3RUU00@mtaout28.012.net.il> for emacs-devel@gnu.org; Wed, 24 Jun 2015 22:21:39 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NQG00AHHR427830@mtaout28.012.net.il>; Wed, 24 Jun 2015 22:21:39 +0300 (IDT) In-reply-to: <558AEB8D.4070603@gmx.at> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.184 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:187496 Archived-At: > Date: Wed, 24 Jun 2015 19:40:29 +0200 > From: martin rudalics > CC: emacs-devel@gnu.org > > >> +static void > >> +w32_toggle_invisible_pointer (struct frame *f, bool invisible) > >> +{ > >> + block_input (); > >> + > >> + if (f->pointer_invisible != invisible) > >> + { > >> + f->pointer_invisible = invisible; > >> + SET_FRAME_GARBAGED (f); <<<<<<<<<<<<<<<<<<<<<<< > >> + } > > > > That sounds excessive: I think it means that every self-inserting > > character will trigger thorough redisplay of the frame. > > Hopefully only for the first self-inserting character typed. After that > the f->pointer_invisible != invisible fails until the mouse is moved. In theory, yes. But doing this makes me nervous, since inserting a single character is something the display engine knows how to optimize very well. This disables all those optimizations. > > Why do you > > need this? Is there any problem without marking the frame garbaged? > > Yes, unfortunately (this was the only time-consuming part of the patch). > If I don't mark the frame garbaged, the cursor sometimes disappears only > after typing at least two or maybe a couple of characters which is quite > distracting. There must be some redisplay optimization which gets into > the way. There are less radical ways of triggering more thorough redisplay, than redrawing the whole frame. I will look into this when I have time, if no one beats me to it. > > Also, what about the equivalent of the X code that makes the pointer > > visible on focus-in events -- don't we need that on MS-Windows? > > I don't know. It's certainly not necessary on XP here. People would > have to try though. In general, it seems that X and Windows differ > quite substantially in their respective behaviors. For example, on X, > when a synchronous shell operation is active, the cursor becomes visible > as soon as the mouse is moved. On Windows, the cursor remains invisible > until the shell operation terminates and the frame gets redrawn > (obviously, the frame doesn't look very decent in that period either, so > there are worse problems). I don't think this is related to the issue at hand.