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 18:23:00 +0800 Message-ID: <87mt5n3zp7.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> <878rh760mc.fsf@yahoo.com> <87mt5nv864.fsf@telefonica.net> <874jrv5k5w.fsf@yahoo.com> <83ilgbmdo9.fsf@gnu.org> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15313"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: ofv@wanadoo.es, 61337@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 09 11:26:26 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 1pQ48I-0003p5-Al for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Feb 2023 11:26:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQ47w-0000ub-Ji; Thu, 09 Feb 2023 05:26:04 -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 1pQ47u-0000uI-Gk for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2023 05:26:02 -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 1pQ47u-0007j3-20 for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2023 05:26:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pQ47t-0002pJ-KH for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2023 05:26:01 -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 10:26:01 +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.167593831710801 (code B ref 61337); Thu, 09 Feb 2023 10:26:01 +0000 Original-Received: (at 61337) by debbugs.gnu.org; 9 Feb 2023 10:25:17 +0000 Original-Received: from localhost ([127.0.0.1]:57595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQ47A-0002o9-I4 for submit@debbugs.gnu.org; Thu, 09 Feb 2023 05:25:16 -0500 Original-Received: from sonic309-47.consmr.mail.ne1.yahoo.com ([66.163.184.173]:34624) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQ478-0002nu-QT for 61337@debbugs.gnu.org; Thu, 09 Feb 2023 05:25:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1675938309; bh=hDqFglfC8zxwta3nAM2O+som+tFcNyliCrVJfTQLrcM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=eVjfNLAeN7WNUkCTH6d/nXBJPiUmiRvs2VvyOSko/VUTeKmqaZtOphMh0wwGRDv6yjBzDQ9Fz9+2Os8WdZCnhyv9rJHS5yaNgLIx5q8VcLl9kpuNkKiJyEYYfIGmgWEeIfFd/KWFsYPbZvjalnyI89vPuuLBAPAu8JEmVw5WQ4eKbBYcLoWxvTypMFTNkpGBVTyIWGbIpgkBFbef2YUfZu+K7Vo8VLvtZxAKCDaRcQq8fr8X4LX8YhyC5UTxwLTT/JizZPpXJsSZ3xltD5ZX7ZO51X4Ij4CqBUP5qmk0UuemAXcp5SIICo4k2D6l3Xsl65d9omonPs6Chq4n6h+dsA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1675938309; bh=FVIiNbsVA1+ILDFuEtYbfUh7ownuPb+dEtuVSJuwIPg=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=GxmGivIhpCQzkE8qPSh4mHwmUxibfdVEo5OVB5BzA1sILQGNmk88DG4oC7DXxC3UfgM0HAGN5Dmb4QWrREUq5pIIEzwZ88msnzeYG1nUu82cm1SXYfEvGbmOlXfzGPFV9QXM2T6mE6lAnCk8v8m60wegWxF7mhfrvTL+GfOsu3xOJ74BL8Hje3/NXTjsmjxNlFo+aM5WjSWRxNUroTW6UyjmmADm/TjtLCZSP4qMm8eTkySPGNtSg8tpVEfLp9qmU6GvfJ+Dh4Vn8SAi2X+OCuPIcGzPRQbt+THRYsXXIDJiScAflotkv4+H2FVY+zyZUTBg3Mk3vUjsQa9Hw0nRhw== X-YMail-OSG: HJvgauoVM1kz2vc86PnWLPEexP4Ky0PWHB.wjiR53maAlXqUpPLCv7P6NPMtZDd fKDLRVnWHaJhn5i6pE76zle0c7VhXfY8IL4_frZpzqFRMuQBomE.zVK6m9ruv.kCeEiDWJxi7TBg 9HS2pKLMCGABuDATRxPWtbFll.E_2G8Fz_TwVCWQWgBa3N11_ytuuFWjtpAjKWdA_lrAgGfdza2R 0.a0wZnLtNKVTaovM5ftlcwNPFsgwp6UyWLvtTB39nQUAEmYdKPURs.Ay3kb4CddPwuvV7WHhyYj AqGpSluhJpQfvNH4oElTY.PZPoJWVrQ2aS4LfDyVVO92iv2VjglkmNKRNr_dPC3opDS4R7GjCKzf p7dc5ZVZpZmmJ1TfHqgXtj02U9WQok2eHdMCxh6Mrs05Q7UVChuQ5lIx51zvx3eYmqEB5NCXxmVz 3jck5cZEqjlZKf4RpWd8Tu4GMakOeak57ciXJXHIYZYhJL.BgZY4H_HPS_KsBezLG2nexcOqcWrh aeiy1UFaTJ._DAxD34va6Wy38qZYz7GGwxPkNSdUSXPSVETsJqTjxxaW0pE_uQoyQ6nJfkuA7x4k tRt93ovnFoVhI2e8T0gNZn0OxVxNpZjzgDo0I3whyHvle7mUN1bv4YDOxRfm.Q5.HWipWHAaf3Tx TAhqLGtK_9grYKVl4xPgzG1FKLAU7o4DIRWesLeaOpTKhcB9io23SRmOHHTuYYxOGsH_MPFi7eHT _Okfw8DbTI7RcbCQorB7CI7nHYOt5EX244IoJZD08SsAcxJgAe.Jm4VORIRZcgAg3f4MXhKykXxM b2_nOWqNasG2AMZKLb3Cd6K5zSzA4i1MpaAcD4xLNa X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.ne1.yahoo.com with HTTP; Thu, 9 Feb 2023 10:25:09 +0000 Original-Received: by hermes--production-sg3-9fc5746c8-97g7j (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID d900aaed9aee2f71dc1ab2b5f6bc93b4; Thu, 09 Feb 2023 10:23:06 +0000 (UTC) In-Reply-To: <83ilgbmdo9.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 09 Feb 2023 10:43:50 +0200") 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:255206 Archived-At: Eli Zaretskii writes: > 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) Just the change in xfns.c. It fixes a bug in the original code (which was trying to test whether or not both strings were equal, but didn't handle the case where the strings were equal, but not EQ.) >, 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. That isn't the change here. > 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. The problem is that KWin apparently focuses a window if its title changes while it is in a different workspace. That's misbehavior on KWin's part, and likely a bug. Since moving to a different desktop is a form of iconification under X, Emacs switches to displaying the icon title. The change to xfns.c prevents Emacs from changing the title if the icon title is identical to the frame title, which should make it possible to work around the problem by setting icon-title-format to the same text as frame-title-format; the rest is something that can only be fixed by its developers. The problem does not exist in Emacs 28, because icon-title-format did not work there at all. Thanks.