From: Daniel Colascione <dancol@dancol.org>
To: Po Lu <luangruo@yahoo.com>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: master 4b98a79a50: Improve X event timestamp tracking
Date: Sun, 7 Aug 2022 02:43:55 -0400 [thread overview]
Message-ID: <5b4dda05-45cc-6843-c87f-047efda257df@dancol.org> (raw)
In-Reply-To: <8735e8wpef.fsf@yahoo.com>
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?
next prev parent reply other threads:[~2022-08-07 6:43 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <165984385935.14715.8191942019361575877@vcs2.savannah.gnu.org>
[not found] ` <20220807034419.B5F2FC09BFD@vcs2.savannah.gnu.org>
2022-08-07 3:46 ` master 4b98a79a50: Improve X event timestamp tracking Po Lu
2022-08-07 3:48 ` Daniel Colascione
2022-08-07 3:51 ` Po Lu
2022-08-07 4:03 ` Daniel Colascione
2022-08-07 4:23 ` Po Lu
2022-08-07 4:39 ` Daniel Colascione
2022-08-07 5:26 ` Po Lu
2022-08-07 5:43 ` Daniel Colascione
2022-08-07 6:07 ` Po Lu
2022-08-07 6:25 ` Daniel Colascione
2022-08-07 6:41 ` Po Lu
2022-08-07 6:55 ` Daniel Colascione
2022-08-07 7:06 ` Po Lu
2022-08-07 5:41 ` Eli Zaretskii
2022-08-07 5:51 ` Daniel Colascione
2022-08-07 5:53 ` Po Lu
2022-08-07 6:04 ` Daniel Colascione
2022-08-07 6:15 ` Po Lu
2022-08-07 6:43 ` Daniel Colascione [this message]
2022-08-07 7:02 ` Po Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5b4dda05-45cc-6843-c87f-047efda257df@dancol.org \
--to=dancol@dancol.org \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=luangruo@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).