emacs-devel
[Top][All Lists]
Advanced

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

Re: master 4b98a79a50: Improve X event timestamp tracking


From: Daniel Colascione
Subject: Re: master 4b98a79a50: Improve X event timestamp tracking
Date: Sun, 7 Aug 2022 02:43:55 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0

On 8/7/22 02:15, Po Lu wrote:
Daniel Colascione <dancol@dancol.org> writes:

And I'd rather not explicitly bypass window manager policy. Let's not
get into an arms race.
We already do that all the time.  Just a few examples:
x-mouse-click-focus-ignore-position, x-wait-for-event-timeout,
x-frame-normalize-before-maximize, x-set-frame-visibility-more-laxly,
x-input-grab-touch-events.  Martin can probably name more.

None of those things is about working against policy implemented by the system on behalf of the user. Your patch is explicitly about making Emacs defy that policy. Is that how well-behaved X clients should behave?

By the way: if we're keen on making things work as documented,
shouldn't we add a bunch of workarounds for x-raise-frame, which
basically does nothing right now?
raise-frame is supposed to raise the frame without changing the input
focus, but if it doesn't work it should be fixed.

Window managers typically don't let you just raise frames arbitrarily. What should the documentation of this function say?

Don't we still have the problem of XSetInputFocus succeeding while
the EWMH activation fails, leaving the whole window stack in a state
confusing for both the human and WM components of the system?
XSetInputFocus is no longer called when EWMH activation is being used.
Calling it previously was a bug, it shouldn't be used with EWMH
activation.

Ok, thanks.

Even if the window disappears while we're waiting?
How can the frame be deleted while we're waiting?  I've never ever seen
such an unruly X program.
XDestroyWindow? Windows can die at any time, yes? Although I suppose if someone raced XDestroyWindow against XChangeProperty we'd either get the PropertyNotify or the xlib error callback would fire, depending on who won the race. I *think* we can't get into a situation in which we'd wait forever for the PropertyNotify. I'll have to double check.
It's hard to imagine any user sitting down and tweaking this
variable. This seems like one of those preferences added not to
account for differences in taste, but to punt a hard technical choice
to users not prepared to make it.
I also wrote something in etc/PROBLEMS.  Users are expected to read that
when they experience problems, and to try the different options in order
until it starts working.

It's not realistic to expect users to read any file in etc. When users have a problem, they try again, then ask their friends, then search the internet, and then give up and install VSCode. Like it or not, that's the flow, and checked-in documentation won't help.

Again, I disagree philosophically with the thrust of this patch.
Focus stealing prevention isn't some nuisance to work around. If
Emacs properly manages user-interaction timestamps, there's no need
to work around it. We don't need to pretend we're a panel or
something if we just give the window manager the information it needs
to make the right decision.
If you (or a user) don't like it, the variable can be set to nil.
But it would be best for our functions to behave according to their
documentation first.

Then let's change the documentation: add a note to x-focus-frame reminding callers that it's ultimately up to the window manager whether a window is activated --- and it is. A WM is free to ignore our activation requests even if we pretend to be a panel or a fire truck or a cool bird or whatever. Why implement three separate ways of working against that grain when we can do what the WM wants?





reply via email to

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