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: Blinking cursor on w32 Date: Sat, 27 Jul 2013 14:57:13 +0300 Message-ID: <83a9l8z04m.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1374926446 17176 80.91.229.3 (27 Jul 2013 12:00:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Jul 2013 12:00:46 +0000 (UTC) Cc: emacs-devel@gnu.org To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 27 14:00:47 2013 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 1V33B1-00057t-4n for ged-emacs-devel@m.gmane.org; Sat, 27 Jul 2013 14:00:47 +0200 Original-Received: from localhost ([::1]:50330 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V33B0-0005QM-OC for ged-emacs-devel@m.gmane.org; Sat, 27 Jul 2013 08:00:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56814) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V337b-0008UR-J8 for emacs-devel@gnu.org; Sat, 27 Jul 2013 07:57:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V337Z-0004hq-BO for emacs-devel@gnu.org; Sat, 27 Jul 2013 07:57:15 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:46751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V337Z-0004hl-3n for emacs-devel@gnu.org; Sat, 27 Jul 2013 07:57:13 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MQL00H00FHDSZ00@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Sat, 27 Jul 2013 14:57:11 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MQL00HCUFVAW400@a-mtaout21.012.net.il>; Sat, 27 Jul 2013 14:57:11 +0300 (IDT) X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.169 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:162198 Archived-At: It looks like the port to w32 of the latest changes related to blinking cursor is incomplete. If I put breakpoints on handle-focus-in/out, and do the mouse gestures that switch focus to and from the Emacs frame, I see handle-focus-in being called, but handle-focus-out never is. (On my system, just moving the mouse pointer off the Emacs frames switches focus out of the frame; on other systems, you'd actually need to click on some other frame. But I don't think this matters.) The result is that setting blink-cursor-blinks to zero does not work as intended: the timer continues to run even when none of Emacs frames have focus. The changes below fix this for me; OK to commit? === modified file 'src/w32term.c' --- src/w32term.c 2013-07-26 09:59:59 +0000 +++ src/w32term.c 2013-07-27 11:48:35 +0000 @@ -4923,16 +4923,11 @@ w32_read_socket (struct terminal *termin break; case WM_KILLFOCUS: + w32_detect_focus_change (dpyinfo, &msg, &inev); f = x_top_window_to_frame (dpyinfo, msg.msg.hwnd); if (f) { - if (f == dpyinfo->w32_focus_event_frame) - dpyinfo->w32_focus_event_frame = 0; - - if (f == dpyinfo->w32_focus_frame) - x_new_focus_frame (dpyinfo, 0); - if (f == hlinfo->mouse_face_mouse_frame) { /* If we move outside the frame, then we're