emacs-devel
[Top][All Lists]
Advanced

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

Re: We should decouple focus and frame switching


From: T.V Raman
Subject: Re: We should decouple focus and frame switching
Date: Sun, 10 Jun 2018 17:04:27 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

address@hidden writes:

focus-in-hook and focus-out-hook are demonstrably broken --- I remember
sending a message here that showed those hooks firing multiple times
under stumpwm for a single window-switch event. I believe someone else
also reproed the buggy behavior under a different WM >>>>>>> "DC" == Daniel 
Colascione <address@hidden> writes:
>>
>> DC> How about this? We'll add a frame-focused-p function that returns nil,
>> t,
>> DC> or 'unknown, and wire up focus-in-hook and focus-out-hook to run only
>> when
>> DC> we actually observe a window system focus change, letting the frame
>> switch
>> DC> stuff run completely independently. This way, we'll be able to write
>> lisp
>> DC> (as I've been trying to do) that reflects the real window system
>> focus.
>>
>> DC> Sound good?
>>
>> Why might we not want this?
>
> First of all, I'm worried about backward compatibility with existing
> packages that rely on the current strange behavior of focus-in and
> focus-out. I briefly scanned the tree, ELPA, and EmacsWiki, and I didn't
> see anything that would obviously break, but that's no guarantee. The
> alternative I was considering is to keep the existing focus events as they
> are and add a new set of window-system-focus query functions and hooks
> alongside it.
>
> Second, Chesterton's fence: maybe there's a good reason the focus events
> are structured the way they are? I was hoping somebody knew why we did it
> this way in the first place.
>
>

-- 



reply via email to

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