unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Óscar Fuentes" <ofv@wanadoo.es>
To: help-gnu-emacs@gnu.org
Subject: Re: select-frame-set-input-focus operates on wrong frame
Date: Sun, 20 Oct 2024 14:51:06 +0200	[thread overview]
Message-ID: <87v7xnuedh.fsf@telefonica.net> (raw)
In-Reply-To: jwvwmi482ur.fsf-monnier+emacs@gnu.org

Stefan Monnier via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:

> As you discovered, using something like `select-frame-set-input-focus`
> from within a `with-selected-frame` is not a good idea.
> I don't know why you did that, because it seems contradictory, I suspect
> it was an oversight.

Yeah, somehow I was under the impression that
select-frame-set-input-focus would be two orthogonal things: set the
selected frame *and* set focus, then `with-selected-frame' would reverse
the change of selected frame, but not the focus.

> Regarding the focus itself (which is a subtly different concept than the
> selected frame), the situation is very messy and what happens in which
> case can also depend on your window-manager (or the part of your OS
> which takes on that responsibility) as well as timing.  🙁

Indeed. On KDE using the default focus settings things work so far.

>> (setq server-window 'ofv-display-buffer-pop-up-frame)
>
> I recommend #' here to clarify that this is intended to set the var to
> a function.

Ok, thanks.




      reply	other threads:[~2024-10-20 12:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-14 15:01 select-frame-set-input-focus operates on wrong frame Óscar Fuentes
2024-10-15  1:25 ` Óscar Fuentes
2024-10-19 16:43 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-10-20 12:51   ` Óscar Fuentes [this message]

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=87v7xnuedh.fsf@telefonica.net \
    --to=ofv@wanadoo.es \
    --cc=help-gnu-emacs@gnu.org \
    /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.
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).