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: [hober0@bogus.example.com: Re: mode-line redisplay bug] Date: Wed, 12 Oct 2005 15:42:31 +0200 Message-ID: References: <4972532.1129117678134.JavaMail.www@wwinf0103> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1129124809 19625 80.91.229.2 (12 Oct 2005 13:46:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 12 Oct 2005 13:46:49 +0000 (UTC) Cc: david.ponce@wanadoo.fr, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 12 15:46:48 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EPgtZ-0006by-3w for ged-emacs-devel@m.gmane.org; Wed, 12 Oct 2005 15:43:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EPgtY-0004Km-FK for ged-emacs-devel@m.gmane.org; Wed, 12 Oct 2005 09:43:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EPgt3-0004E1-6v for emacs-devel@gnu.org; Wed, 12 Oct 2005 09:43:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EPgt1-0004DB-IB for emacs-devel@gnu.org; Wed, 12 Oct 2005 09:43:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EPgt1-0004D7-F9 for emacs-devel@gnu.org; Wed, 12 Oct 2005 09:43:15 -0400 Original-Received: from [195.41.46.237] (helo=pfepc.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EPgt1-00015R-5d for emacs-devel@gnu.org; Wed, 12 Oct 2005 09:43:15 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (unknown [80.165.4.124]) by pfepc.post.tele.dk (Postfix) with SMTP id 3E4DA262829; Wed, 12 Oct 2005 15:43:13 +0200 (CEST) Original-To: YAMAMOTO Mitsuharu In-Reply-To: (YAMAMOTO Mitsuharu's message of "Wed, 12 Oct 2005 21:22:57 +0900") 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:43927 Archived-At: YAMAMOTO Mitsuharu writes: >>>>>> On Wed, 12 Oct 2005 13:47:58 +0200 (CEST), David PONCE said: > >> Oops I spoke too fast. Now I get the following message when the >> mouse is over the read-only/modified status characters on the >> mode-line: > >> Error during redisplay: (wrong-type-argument window-live-p nil) [126 >> times] > > Sorry. I've been using the patch for a long time, but I didn't notice > that. The last change was backed out. I think your change was pretty close to being ok. Here is something which seems to work for me on X -- maybe you can install it and adapt it to W32 and MAC if it works for you too. *** xterm.c 12 Oct 2005 14:42:03 +0200 1.883 --- xterm.c 12 Oct 2005 15:26:41 +0200 *************** *** 3582,3588 **** static XMotionEvent last_mouse_motion_event; static Lisp_Object last_mouse_motion_frame; ! static void note_mouse_movement (frame, event) FRAME_PTR frame; XMotionEvent *event; --- 3582,3588 ---- static XMotionEvent last_mouse_motion_event; static Lisp_Object last_mouse_motion_frame; ! static int note_mouse_movement (frame, event) FRAME_PTR frame; XMotionEvent *event; *************** *** 3596,3605 **** frame->mouse_moved = 1; last_mouse_scroll_bar = Qnil; note_mouse_highlight (frame, -1, -1); } /* Has the mouse moved off the glyph it was on at the last sighting? */ ! else if (event->x < last_mouse_glyph.x || event->x >= last_mouse_glyph.x + last_mouse_glyph.width || event->y < last_mouse_glyph.y || event->y >= last_mouse_glyph.y + last_mouse_glyph.height) --- 3596,3606 ---- frame->mouse_moved = 1; last_mouse_scroll_bar = Qnil; note_mouse_highlight (frame, -1, -1); + return 1; } /* Has the mouse moved off the glyph it was on at the last sighting? */ ! if (event->x < last_mouse_glyph.x || event->x >= last_mouse_glyph.x + last_mouse_glyph.width || event->y < last_mouse_glyph.y || event->y >= last_mouse_glyph.y + last_mouse_glyph.height) *************** *** 3609,3615 **** --- 3610,3619 ---- note_mouse_highlight (frame, event->x, event->y); /* Remember which glyph we're now on. */ remember_mouse_glyph (frame, event->x, event->y, &last_mouse_glyph); + return 1; } + + return 0; } *************** *** 6483,6490 **** case MotionNotify: { previous_help_echo_string = help_echo_string; ! help_echo_string = help_echo_object = help_echo_window = Qnil; ! help_echo_pos = -1; if (dpyinfo->grabbed && last_mouse_frame && FRAME_LIVE_P (last_mouse_frame)) --- 6487,6493 ---- case MotionNotify: { previous_help_echo_string = help_echo_string; ! help_echo_string = Qnil; if (dpyinfo->grabbed && last_mouse_frame && FRAME_LIVE_P (last_mouse_frame)) *************** *** 6523,6529 **** last_window=window; } ! note_mouse_movement (f, &event.xmotion); } else { --- 6526,6533 ---- last_window=window; } ! if (!note_mouse_movement (f, &event.xmotion)) ! help_echo_string = previous_help_echo_string; } else { -- Kim F. Storm http://www.cua.dk