bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#49997: 27.2; idle-time reset when switching desktop-page


From: Eli Zaretskii
Subject: bug#49997: 27.2; idle-time reset when switching desktop-page
Date: Sun, 15 Aug 2021 19:54:40 +0300

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: pm@a16n.net,  49997@debbugs.gnu.org,  rudalics@gmx.at
> Date: Sun, 15 Aug 2021 18:17:06 +0200
> 
> static void
> x_focus_changed (int type, int state, struct x_display_info *dpyinfo, struct 
> frame *frame, struct input_event *bufp)
> {
>   if (type == FocusIn)
>     {
>       if (dpyinfo->x_focus_event_frame != frame)
>         {
>           x_new_focus_frame (dpyinfo, frame);
>           dpyinfo->x_focus_event_frame = frame;
>           bufp->kind = FOCUS_IN_EVENT;
>           XSETFRAME (bufp->frame_or_window, frame);
>         }
> 
>       frame->output_data.x->focus_state |= state;
> [...]
>   else if (type == FocusOut)
>     {
>       frame->output_data.x->focus_state &= ~state;
> 
> So we lose focus and then get it back, and that makes Emacs unidle.

Actually, I think we need the details.  When the user changes the
page, which event do we get? focus-out or focus-in? or both one after
the other?

If we get the focus-out event, what is the frame's focus_state at that
point?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]