From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#61337: 29.0.60; Setting frame-title-format makes Emacs to steal focus Date: Thu, 09 Feb 2023 10:20:11 +0800 Message-ID: <878rh760mc.fsf@yahoo.com> References: <874jrydpw8.fsf@telefonica.net> <87ilgd7e9q.fsf@yahoo.com> <87mt5pxznh.fsf@telefonica.net> <875ycd6joo.fsf@yahoo.com> <87zg9ovps9.fsf@telefonica.net> <87wn4s6c40.fsf@yahoo.com> <87v8kcvllw.fsf@telefonica.net> <87o7q469vi.fsf@yahoo.com> <87r0v0uqnh.fsf@telefonica.net> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13718"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 61337@debbugs.gnu.org To: =?UTF-8?Q?=C3=93scar?= Fuentes Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 09 03:23:23 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pPwap-0003Q7-5o for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Feb 2023 03:23:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pPwaW-00063y-WD; Wed, 08 Feb 2023 21:23:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pPwaV-00063p-BT for bug-gnu-emacs@gnu.org; Wed, 08 Feb 2023 21:23:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pPwaV-00011q-3G for bug-gnu-emacs@gnu.org; Wed, 08 Feb 2023 21:23:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pPwaU-00047b-J1 for bug-gnu-emacs@gnu.org; Wed, 08 Feb 2023 21:23:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Feb 2023 02:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61337 X-GNU-PR-Package: emacs Original-Received: via spool by 61337-submit@debbugs.gnu.org id=B61337.167590935715802 (code B ref 61337); Thu, 09 Feb 2023 02:23:02 +0000 Original-Received: (at 61337) by debbugs.gnu.org; 9 Feb 2023 02:22:37 +0000 Original-Received: from localhost ([127.0.0.1]:57052 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPwa4-00046l-Hl for submit@debbugs.gnu.org; Wed, 08 Feb 2023 21:22:36 -0500 Original-Received: from sonic307-37.consmr.mail.ne1.yahoo.com ([66.163.190.60]:41748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPwa0-00046V-K9 for 61337@debbugs.gnu.org; Wed, 08 Feb 2023 21:22:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1675909344; bh=VKR+We4juxN4+jlAd4/CjfM4PTBhI8/S9zg5lg2FunM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From: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5xEYe5Py abB22KGmxN3dzXH6.C2Fq5nIMlOXPopo_HP2_4uaoZncUczBuV_Sbmo0AZt5k44F9joVwi7BLv7_ U8YB3zj3LBSqvsnOcUjsbp6o_noVmTUVNu3Il8beA4yLmrRiIf1dSJcB46s1cSLGQOeJ.dY3v6r_ wJbJiM1V2ZiqS8XzXk4D3YacUf3ZfKYwHZ6ynerCOEHcLCshaFN63Q7gyYpCnI_USYAlBRqGpbrV y4wHQvuG3zyyAzqXI.9DBVX2DQQqZu1Hv1nhYb0WAoVHBzuHbyviyIFk06Wqs4L3pNDI1._Ohm7j p6_YMK6lcRx7fCO9i1FGGFP4e0TIjhHjGj2b3I1exhPycKwILuBd.VISEoo5K5mp8Joc3BAbOOST O_Jm9ZVLBX70UfJJQNLpW_iER6CjpfvmsOUmPOBHnDb3OuChbajvUoKj4P3zMPnGYSLcG5Y.8K5d iXTotpKxY6n0d5ZWq.vB0_GFrZ5r2iXG363UVffUuEfRaqxkVlW7pcODF810une9SQwLfKDPl.8k sPjwRlIG7TOx8Uitrfd7bEHebcjaOohoftXQsU0YcDDoKA55GtB1i3RsBOBgvwTnnvSp7IUdn1Rz 5su7iY_yCZTISNsWwtrkZ3biv02pxFVPf0kab60jY8 X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ne1.yahoo.com with HTTP; Thu, 9 Feb 2023 02:22:24 +0000 Original-Received: by hermes--production-sg3-9fc5746c8-z4gft (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID e48c3c55cb6869d7862d236edd27e172; Thu, 09 Feb 2023 02:20:22 +0000 (UTC) In-Reply-To: <87r0v0uqnh.fsf@telefonica.net> ("=?UTF-8?Q?=C3=93scar?= Fuentes"'s message of "Wed, 08 Feb 2023 16:24:02 +0100") X-Mailer: WebService/1.1.21161 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255178 Archived-At: =C3=93scar Fuentes writes: > WM_STATE(WM_STATE): > window state: Iconic > icon window: 0x0 > WM_NAME(STRING) =3D "*scratch* - GNU Emacs at sky" > _NET_WM_NAME(UTF8_STRING) =3D "*scratch* - GNU Emacs at sky" > WM_ICON_NAME(STRING) =3D "*scratch* - GNU Emacs at sky" > _NET_WM_ICON_NAME(UTF8_STRING) =3D "*scratch* - GNU Emacs at sky" > _NET_WM_STATE(ATOM) =3D=20 > WM_NAME(STRING) =3D "Emacs: *scratch* -- @ sky" > _NET_WM_NAME(UTF8_STRING) =3D "Emacs: *scratch* -- @ sky" > WM_ICON_NAME(STRING) =3D "Emacs: *scratch* -- @ sky" > _NET_WM_ICON_NAME(UTF8_STRING) =3D "Emacs: *scratch* -- @ sky" > _NET_WM_STATE(ATOM) =3D=20 > _NET_WM_STATE(ATOM) =3D=20 > WM_STATE(WM_STATE): > window state: Normal > icon window: 0x0 > _NET_WM_USER_TIME(CARDINAL) =3D 132540735 > _NET_WM_STATE(ATOM) =3D _NET_WM_STATE_FOCUSED > _NET_WM_STATE(ATOM) =3D=20 > ^C > ~/dev/emacs/emacs$=20 I think I see the problem here: after moving to a different workspace, the window manager told Emacs that the frame was iconified (this is what most window managers report to windows in a different desktop), and as a result the icon and window manager names were changed to reflect `icon-title-format'. KWin seems to treat this as Emacs asking to be focused. 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 a= rg, 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; =20 update_mode_lines =3D 38; does the problem go away? Thanks.