From: Eli Zaretskii <eliz@gnu.org>
To: Po Lu <luangruo@yahoo.com>
Cc: ofv@wanadoo.es, 61337@debbugs.gnu.org
Subject: bug#61337: 29.0.60; Setting frame-title-format makes Emacs to steal focus
Date: Thu, 09 Feb 2023 10:43:50 +0200 [thread overview]
Message-ID: <83ilgbmdo9.fsf@gnu.org> (raw)
In-Reply-To: <874jrv5k5w.fsf@yahoo.com> (bug-gnu-emacs@gnu.org)
> Cc: 61337@debbugs.gnu.org
> Date: Thu, 09 Feb 2023 16:15:39 +0800
> From: Po Lu via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> Óscar Fuentes <ofv@wanadoo.es> writes:
>
> > Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text
> > editors" <bug-gnu-emacs@gnu.org> writes:
> >
> >> If you set `icon-title-format' to the same as `frame-title-format', and
> >> in addition apply this patch:
> >>
> >> diff --git a/src/xfns.c b/src/xfns.c
> >> index 3a129211463..7f1128399a8 100644
> >> --- a/src/xfns.c
> >> +++ b/src/xfns.c
> >> @@ -2317,7 +2317,7 @@ x_implicitly_set_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
> >> x_set_title (struct frame *f, Lisp_Object name, Lisp_Object old_name)
> >> {
> >> /* Don't change the title if it's already NAME. */
> >> - if (EQ (name, f->title))
> >> + if (Fstring_equal (name, f->title))
> >> return;
> >>
> >> update_mode_lines = 38;
> >>
> >> does the problem go away?
> >
> > Yes!
>
> Thanks.
>
> Anyone know if this is ok for Emacs 29?
Which part? the change in xfns.c is fine (it just makes the code
slower, so perhaps test EQ first and Fstring_equal if EQ doesn't
return non-zero), but if someone sets icon-title-format in a way that
produces a different string from what frame-title-format does, it will
not work. And forcing these two formats to produce the same strings
is definitely NOT okay, not for emacs-29, not ever.
However, to tell the truth, I don't really understand the phenomenon
being complained about in this case. The original report says: "the
z-order is not altered", whereas the conclusion of the analysis is
"KWin seems to treat this as Emacs asking to be focused". Would you
please describe the problem in easier-to-understand terms and use the
user-facing behavior instead of technical terms like z-order, so that
I could at least make up my mind whether this issue is serious, and
perhaps think about alternative solutions? E.g., I don't yet
understand why returning early in x_set_title should help here, and
how.
Thanks.
next prev parent reply other threads:[~2023-02-09 8:43 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-07 5:07 bug#61337: 29.0.60; Setting frame-title-format makes Emacs to steal focus Oscar Fuentes
2023-02-07 14:15 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-07 15:29 ` Óscar Fuentes
2023-02-08 1:16 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-08 2:45 ` Óscar Fuentes
2023-02-08 3:59 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-08 4:15 ` Óscar Fuentes
2023-02-08 4:48 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-08 15:24 ` Óscar Fuentes
2023-02-09 2:20 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-09 3:17 ` Óscar Fuentes
2023-02-09 8:15 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-09 8:43 ` Eli Zaretskii [this message]
2023-02-09 10:23 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-09 11:22 ` Eli Zaretskii
2023-02-09 14:16 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-09 15:32 ` Óscar Fuentes
2023-02-09 15:53 ` Eli Zaretskii
2023-02-09 16:17 ` Óscar Fuentes
2023-02-09 16:50 ` Eli Zaretskii
2023-02-10 2:15 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-10 5:07 ` Óscar Fuentes
2023-02-10 7:15 ` Eli Zaretskii
2023-02-10 1:59 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-10 4:56 ` Óscar Fuentes
2023-02-13 16:02 ` Óscar Fuentes
2023-02-14 2:02 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83ilgbmdo9.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=61337@debbugs.gnu.org \
--cc=luangruo@yahoo.com \
--cc=ofv@wanadoo.es \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.