From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Aaron Jensen Newsgroups: gmane.emacs.devel Subject: Re: input-pending-p after make-frame-visible Date: Thu, 28 Oct 2021 14:12:17 -0400 Message-ID: References: <6c69780538e1957d1002@heytings.org> <322f50be-0de1-c818-819d-6ecb400de928@gmx.at> <03ab7a19-6616-445c-cdcf-588fb30a514a@gmx.at> <3205a073-a6ca-b9a5-3834-929025b70b7b@gmx.at> <83wnm7absp.fsf@gnu.org> <83wnm68pc5.fsf@gnu.org> <83lf2m8eld.fsf@gnu.org> <83fssu8dao.fsf@gnu.org> <83y26l7fon.fsf@gnu.org> <83wnlxrvv1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18619"; mail-complaints-to="usenet@ciao.gmane.io" Cc: martin rudalics , Alan Third , Gregory Heytings , YAMAMOTO Mitsuharu , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 28 20:13:55 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mg9uV-0004fL-5G for ged-emacs-devel@m.gmane-mx.org; Thu, 28 Oct 2021 20:13:55 +0200 Original-Received: from localhost ([::1]:49794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mg9uT-0000Jh-B4 for ged-emacs-devel@m.gmane-mx.org; Thu, 28 Oct 2021 14:13:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mg9tA-00084P-Of for emacs-devel@gnu.org; Thu, 28 Oct 2021 14:12:32 -0400 Original-Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]:41638) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mg9t9-0007Nq-37; Thu, 28 Oct 2021 14:12:32 -0400 Original-Received: by mail-pf1-x430.google.com with SMTP id p40so1916991pfh.8; Thu, 28 Oct 2021 11:12:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=17I8161lrinbbCh/DqTAHHEd8MAB76MJ2Lq3Tq45KYo=; b=eEBil5JMa2NcA9x3PUP//8EpkrGf8XM2X2UR647YeUX5m+GIOFlYGE3lkggZTAGcaE 67WqJb1OJqKuNFjpEUcRWz14Z+RdOBYZ3d+hNcHLBCJRvCu7smNafNtiVC7x2hOK6fNf kj5sLfxxmwY+/vD7sn2cgMnr3dD4ciQPp6Q4eJK/1+zTXm+q1RuWXtzHJPrBfbr2oO3n vXm4OjyKV/oISsBdqalt+Zjzo9CfH9+gxfMcEZo10/NoFDm35hX0MxI+XwtGXcXZt5Gy 2V30wnObUDjG7UNBdYCQMoSAwQIwSVufKWx2YTclT86rrQSfJ/Am/I56j6h5Y6XbkMXH 3O2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=17I8161lrinbbCh/DqTAHHEd8MAB76MJ2Lq3Tq45KYo=; b=1Llpn9wvfwk79Y/PfeeGSDZcGYoBTYMJClc/XZ/34xdp5YkaUUvrheFmVGuhBCIorH YvuaaZWI++evBrWumXd0bCb7bgs0Vuoifkap5JIA6frlNan0ZyHvAN+uUTRCFfM/C7Ik CxJp/CfJnyRUv2B9LlBnnVROPOe+CqHawWFJzcS4QKL8vuCw2acWyI3eUSvU3gPDkrgu a1eFBp/JIV/r6YnigZ251WXsjYsZb9lxP1pOKwagnCz1hypOvjwkHVNQgdTW8rRGnQMr 6gPxGabt6/7cCY/4Eacn8Y7sZ2LWj/U4zo24TN9wYKcwRsLuo5DnPNRObn99ZFt/8T1D BjsA== X-Gm-Message-State: AOAM532kr+ib3By6c9emQZ0WK9pQf6z0orAet9vnMQS6FnQTZDqOgWik FpsEneIQpedu0nktuwSO/oJ3kh1LiSsYEdReG0y1mDTTtLg= X-Google-Smtp-Source: ABdhPJwEoY13d/YgmWyTBeKiRf0jBS2qJvozMPwIyVLlDMwD7tpyTGV5z6SDbx1adsNrD6jbImZCtLZ0zayRlnubxGY= X-Received: by 2002:a63:ce0a:: with SMTP id y10mr4437484pgf.133.1635444748786; Thu, 28 Oct 2021 11:12:28 -0700 (PDT) In-Reply-To: <83wnlxrvv1.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=aaronjensen@gmail.com; helo=mail-pf1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:278132 Archived-At: On Thu, Oct 28, 2021 at 11:51 AM Eli Zaretskii wrote: > > > From: Aaron Jensen > > Date: Fri, 22 Oct 2021 09:58:28 -0400 > > Cc: martin rudalics , Alan Third , > > Gregory Heytings , YAMAMOTO Mitsuharu , > > emacs-devel@gnu.org > > > > > > Documentation seems like it could be useful, would you want it to say > > > > it can't be used by anything but input-pending-p or that it is > > > > currently only used by it? > > > > > > The former. Something like "this is meant to be used only by > > > input-pending-p and similar callers, which aren't interested in all > > > input events". > > > > Thanks, updated the original patch "Ignore-non-input-events..." (and > > corrected some parens). > > > > I'm also attaching a second option, "Ignore-more-events..." that is a > > more minimal change. It only introduces a new variable and doesn't do > > any renaming. > > Thanks, I've installed the minimal change, with some minor changes. > The patch didn't apply, so I applied by hand, and made some too-long > variables have shorter names while at that. Also, a variable defined > via DEFVAR_BOOL conventionally has its C counterpart's name without > the leading "V", since it's actually a C int. > > Please see if the current master solves your problem. Thank you for making these corrections and describing what was wrong. It's odd that the patch didn't apply, but thanks for doing it by hand. It looks like you inadvertently reversed the condition for the variable check, so I need to set it to nil to get the fixed behavior. This should fix it: diff --git a/src/keyboard.c b/src/keyboard.c index c5400023e6..3933ea84e0 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -3472,10 +3472,10 @@ readable_events (int flags) #ifdef USE_TOOLKIT_SCROLL_BARS (flags & READABLE_EVENTS_FILTER_EVENTS) && #endif - ((input_pending_p_filter_events + ((!input_pending_p_filter_events && (event->kind == FOCUS_IN_EVENT || event->kind == FOCUS_OUT_EVENT)) - || (!input_pending_p_filter_events + || (input_pending_p_filter_events && is_ignored_event (event)))) #ifdef USE_TOOLKIT_SCROLL_BARS && !((flags & READABLE_EVENTS_IGNORE_SQUEEZABLES) Can you or Alan also please install this related change: diff --git a/src/nsterm.m b/src/nsterm.m index aa29c13eb2..f4dbe95965 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -7073,6 +7073,7 @@ - (void)windowDidResignKey: (NSNotification *)notification XSETFRAME (frame, emacsframe); help_echo_string = Qnil; gen_help_event (Qnil, frame, Qnil, Qnil, 0); + any_help_event_p = NO; } if (emacs_event && is_focus_frame) It is referenced earlier in this thread. It's probably not the best way to handle clearing help echos in the long term, but it will help for now. The commit message can be something like "Help echos are only cleared once in NS port" Thanks,