[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: input-pending-p after make-frame-visible
From: |
Aaron Jensen |
Subject: |
Re: input-pending-p after make-frame-visible |
Date: |
Thu, 28 Oct 2021 14:12:17 -0400 |
On Thu, Oct 28, 2021 at 11:51 AM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Aaron Jensen <aaronjensen@gmail.com>
> > Date: Fri, 22 Oct 2021 09:58:28 -0400
> > Cc: martin rudalics <rudalics@gmx.at>, Alan Third <alan@idiocy.org>,
> > Gregory Heytings <gregory@heytings.org>, YAMAMOTO Mitsuharu
> > <mituharu@math.s.chiba-u.ac.jp>,
> > 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,
- Re: input-pending-p after make-frame-visible, (continued)
- Re: input-pending-p after make-frame-visible, Eli Zaretskii, 2021/10/21
- Re: input-pending-p after make-frame-visible, Aaron Jensen, 2021/10/21
- Re: input-pending-p after make-frame-visible, Eli Zaretskii, 2021/10/21
- Re: input-pending-p after make-frame-visible, Aaron Jensen, 2021/10/21
- Re: input-pending-p after make-frame-visible, Aaron Jensen, 2021/10/21
- Re: input-pending-p after make-frame-visible, Eli Zaretskii, 2021/10/22
- Re: input-pending-p after make-frame-visible, Aaron Jensen, 2021/10/22
- Re: input-pending-p after make-frame-visible, Aaron Jensen, 2021/10/26
- Re: input-pending-p after make-frame-visible, Eli Zaretskii, 2021/10/26
- Re: input-pending-p after make-frame-visible, Eli Zaretskii, 2021/10/28
- Re: input-pending-p after make-frame-visible,
Aaron Jensen <=
- Re: input-pending-p after make-frame-visible, Eli Zaretskii, 2021/10/28
- Re: input-pending-p after make-frame-visible, Alan Third, 2021/10/31
- Re: input-pending-p after make-frame-visible, Aaron Jensen, 2021/10/31
- Re: input-pending-p after make-frame-visible, Eli Zaretskii, 2021/10/21
- Re: input-pending-p after make-frame-visible, Alan Third, 2021/10/15
- Re: input-pending-p after make-frame-visible, Stefan Monnier, 2021/10/15
- Re: input-pending-p after make-frame-visible, Aaron Jensen, 2021/10/15
- Re: input-pending-p after make-frame-visible, martin rudalics, 2021/10/04