emacs-devel
[Top][All Lists]
Advanced

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

We should decouple focus and frame switching


From: Daniel Colascione
Subject: We should decouple focus and frame switching
Date: Sun, 10 Jun 2018 11:07:09 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

Focus-in and focus-out don't do a good job right now of reflecting actual window system focus state, and that's in part due to the core considering frame switch evidence of a focus change and running the focus-in hooks in response. More than one frame can have window system focus at a time when we have multiple terminals, and even on a single terminal, internal frame switching for processing mouse wheel events and such shouldn't change the reported window system focus state.

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.

Sound good?



reply via email to

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