From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Simplification to mouse-avoidance-mode (patch) + redisplay bug? Date: Wed, 10 May 2006 16:01:21 +0200 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1147269857 9235 80.91.229.2 (10 May 2006 14:04:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 10 May 2006 14:04:17 +0000 (UTC) Cc: "Jan D." , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 10 16:04:15 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FdpHp-00061B-Ta for ged-emacs-devel@m.gmane.org; Wed, 10 May 2006 16:03:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FdpHp-0005qw-IY for ged-emacs-devel@m.gmane.org; Wed, 10 May 2006 10:03:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FdpHW-0005oB-Ly for emacs-devel@gnu.org; Wed, 10 May 2006 10:03:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FdpHU-0005lY-M8 for emacs-devel@gnu.org; Wed, 10 May 2006 10:03:14 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FdpHU-0005lL-CF for emacs-devel@gnu.org; Wed, 10 May 2006 10:03:12 -0400 Original-Received: from [195.41.46.237] (helo=pfepc.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FdpIk-0005CP-G0; Wed, 10 May 2006 10:04:31 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (unknown [80.165.4.124]) by pfepc.post.tele.dk (Postfix) with SMTP id EC68A8A0056; Wed, 10 May 2006 16:03:01 +0200 (CEST) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Tue, 02 May 2006 17:37:26 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:54190 Archived-At: Richard Stallman writes: > If you think your patch is correct, would you please install it? > > I notice that the final cursor shape often gets it wrong if I set the > style to "cat-and-mouse", it seems to happen if the cursor passes over > an area (eg. void or a mode line) along the chosen path. That looks > like a redisplay bug. > > You're the expert on redisplay--could you debug it (and ack)? I've debugged this far -- and need an X-pert (Jan?) to take over: mouse-avoidance-mode 'animate uses set-mouse-position to move the mouse cursor in ~10 steps to reach its end position. If I type very slowly, approaching the window cursor to the mouse cursor -- and don't type anything while the mouse cursor is moving, everything works, i.e. the mouse cursor shape at the final destination is ok. If I type more quickly, the mouse cursor still moves in steps, but it may end up with any of the cursor shapes it had along the path. I put some trace output into xterm.c, and it seems that (in the first case) for each call to x_set_mouse_position (which calls XWarpPointer), the event loop receives a MotionNotify event (event.type = 6) with the new mouse cursor position. .. unless I hit a key while the mouse is moving (the second case). As soon as emacs gets the key event (event.type = 2), no further MotionNotify events are delivered for the remaining mouse positions along the path. This looks like an X bug. This is the Xfree server from redhat 9.0. A work-around could be to unconditionally call "note_mouse_movement" in x_set_mouse_position ? In GNU Emacs 22.0.50.8 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2006-05-09 on kfs-l.imdomain.dk X server distributor `The XFree86 Project, Inc', version 11.0.40300000 configured using `configure 'CFLAGS=-O0 -g'' -- Kim F. Storm http://www.cua.dk