From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: dancol@dancol.org Newsgroups: gmane.emacs.devel Subject: Re: We should decouple focus and frame switching Date: Sun, 10 Jun 2018 20:24:24 -0700 Message-ID: References: <6d1bc582-29be-5df7-56b1-e82305ee477f@dancol.org> <83tvqaqcdb.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1528687406 5151 195.159.176.226 (11 Jun 2018 03:23:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 11 Jun 2018 03:23:26 +0000 (UTC) User-Agent: SquirrelMail/1.4.23 [SVN] Cc: Daniel Colascione , emacs-devel@gnu.org To: "Eli Zaretskii" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 11 05:23:22 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fSDQP-0001F2-Q0 for ged-emacs-devel@m.gmane.org; Mon, 11 Jun 2018 05:23:22 +0200 Original-Received: from localhost ([::1]:46234 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSDSW-0001Tk-Oi for ged-emacs-devel@m.gmane.org; Sun, 10 Jun 2018 23:25:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41167) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSDRT-0001ST-Qt for emacs-devel@gnu.org; Sun, 10 Jun 2018 23:24:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fSDRT-0006lA-1A for emacs-devel@gnu.org; Sun, 10 Jun 2018 23:24:27 -0400 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:43622) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fSDRR-0006k0-Ft; Sun, 10 Jun 2018 23:24:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:To:From:Subject:Date:References:In-Reply-To:Message-ID; bh=pFIbHA+yZjaOTLcHeJTlAykZmkEo1ievGTrEhssH8gs=; b=iAn3YEECgpt0sDGMOoaq44HStVULWaimCakYEbRIV58UAkIX2FwLUB1LI/fvI5qJtBLhio9tW2V4YBsq1ACBCnrTqH8y4ec715UhA8uySDWSQP7YkLyWvUgO72LzFnbxlm1QVzGoWjGBqvaPxVGfpqmJb75fAE5tGSsT1NRkNXCKXYtonvk478h2Gs7J2a9s2xtpgjytn+mH4duC2qz/Woj0HzouwCO5MM0Pg3057nz91h4tuCyN2aD9NLyEiU/WKyEHfXjRdT/2Da+UOiZZJS1VJ6oK88oaAxmRyy3KQzyfX+YE6qVb+caKRgdZedhymeATgFG8coSmaodqjVOo2w==; Original-Received: from localhost ([127.0.0.1] helo=dancol.org) by dancol.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fSDRP-0003Xq-Ve; Sun, 10 Jun 2018 20:24:24 -0700 Original-Received: from 127.0.0.1 (SquirrelMail authenticated user dancol) by dancol.org with HTTP; Sun, 10 Jun 2018 20:24:24 -0700 In-Reply-To: <83tvqaqcdb.fsf@gnu.org> X-Priority: 3 (Normal) Importance: Normal X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:226184 Archived-At: >> From: Daniel Colascione >> Date: Sun, 10 Jun 2018 11:07:09 -0700 >> >> How about this? We'll add a frame-focused-p function that returns nil, >> t, or 'unknown, and wire up focus-in-hook and focus-out-hook to run only >> when we actually observe a window system focus change, letting the frame >> switch stuff run completely independently. This way, we'll be able to >> write lisp (as I've been trying to do) that reflects the real window >> system focus. > > Does that mean that clicking on a frame will no longer restart cursor > blinking when blink-cursor-mode is in its default configuration? It > does now. Oh, no. That'll work better than ever. Every time the focus state changes anywhere, we'll just rescan all the frames and enable the timer if at least one of them is a focused GUI frame, disabling otherwise. Assuming all focus events get delivered eventually, the right thing always happens.