From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#73559: [PATCH] fix NS build focus-in event processing Date: Mon, 30 Sep 2024 14:41:49 +0300 Message-ID: <86v7yd2wsi.fsf@gnu.org> References: <871q113lil.fsf@dancol.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7974"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73559@debbugs.gnu.org To: Daniel Colascione , Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 30 13:45:54 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1svEqf-0001ue-OI for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 30 Sep 2024 13:45:53 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svEqM-0000pa-4x; Mon, 30 Sep 2024 07:45:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svEqI-0000p5-Mz for bug-gnu-emacs@gnu.org; Mon, 30 Sep 2024 07:45:30 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1svEqI-0006Hx-Bd for bug-gnu-emacs@gnu.org; Mon, 30 Sep 2024 07:45:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=K4QyrHp5+JYwnO9uLX4qBXXo19VTxSJxnlB5Uu/nX44=; b=RN+DNpIyHZsHU8nrqY32BSz82lt4twj3H1SnBNLuLFaPZslBaDydNprk7Xuf1sWKb44JIjsANtpH9i0I8UHQN+dFnl+O1Ihtu5NdsqSd63YY7f45w5WtdwAWyjrar8vq5Rzmjjh7AB7HH/hQbXwjjOIciBBfM4/FyI8LaDjBeqRF6UBHVyWO9hZc4JoCqTGqZ9/YMKpfpSFQIPBu4BIUwNaTRFpEW/ndyTIGpxgXSFBB+VG3Ng85boDLHvyFRX7GCR+R+6icqQeOWzi61eZ0MvQvJzWl7OeDrPq6Dv2MGS+k17T9a/aSw8J+JFFcefIBTNzwoOiyh0gVrxCZKZkbhw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1svEqn-0005lk-U5 for bug-gnu-emacs@gnu.org; Mon, 30 Sep 2024 07:46:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Sep 2024 11:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73559 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 73559-submit@debbugs.gnu.org id=B73559.172769671021500 (code B ref 73559); Mon, 30 Sep 2024 11:46:01 +0000 Original-Received: (at 73559) by debbugs.gnu.org; 30 Sep 2024 11:45:10 +0000 Original-Received: from localhost ([127.0.0.1]:44863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svEpw-0005ai-3U for submit@debbugs.gnu.org; Mon, 30 Sep 2024 07:45:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svEnh-0004t5-E2 for 73559@debbugs.gnu.org; Mon, 30 Sep 2024 07:43:23 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svEn4-0005w1-Mj; Mon, 30 Sep 2024 07:42:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=K4QyrHp5+JYwnO9uLX4qBXXo19VTxSJxnlB5Uu/nX44=; b=SyBlG3u1t7tJ 2dJgSTQSsxytTffmmxligK03XJOyCptc4hGndhJITkmwjg/1D9GbE/neTDNRHTUIrRcAV6YFAUvta sh1Rs5wBiZcWHJJ6ir6nvFhfKyzqUqZnDFCwt/bzyK7NoiXxbwQZ+S0j1HBlKNzT9nR+rS800ekUN ndMKBUQS+C3wBnfv/etlDs/whLxDmx/bo48mHuw/vgK1lQAryrGfCCdCKIKuzZMrcvzC73dWGCRSL q9GPS1e9ShG78RfmtJWyFXrNPpURX7AdrwvN6ncPgC4uLC0bcKPlFmIaBx5JCbGkLyxcxVsK34EUJ ISF6WBcywkL4u3IlN/WV8A==; In-Reply-To: <871q113lil.fsf@dancol.org> (message from Daniel Colascione on Sun, 29 Sep 2024 22:47:46 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:292706 Archived-At: > From: Daniel Colascione > Date: Sun, 29 Sep 2024 22:47:46 -0400 > > > In Emacs NS build, frames don't respond to focus-in events right away. > Instead, they store the focus-in event and process it (and other queued > events) whenever some other event happens to occur on that frame. Hmm... isn't this the same on all other GUI systems? kbd_buffer_store_event adds the event to the Emacs input queue, and AFAIU it will be processed as soon as Emacs gets back to its main loop and calls read_char. No other event should be needed, AFAIK. Po Lu, am I missing something here? > This patch kicks the NS event loop immediately when a focus-in event > happens, allowing Emacs to respond to focus-in events without some other > event triggering the processing. I know nothing about the "NS event loop", so I'm probably missing something. Thanks.