From unknown Fri Jun 20 19:53:11 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#58945 <58945@debbugs.gnu.org> To: bug#58945 <58945@debbugs.gnu.org> Subject: Status: 29.0.50; Setting frame name in pgtk Emacs is asynchronous Reply-To: bug#58945 <58945@debbugs.gnu.org> Date: Sat, 21 Jun 2025 02:53:11 +0000 retitle 58945 29.0.50; Setting frame name in pgtk Emacs is asynchronous reassign 58945 emacs submitter 58945 Thibault Polge severity 58945 normal tag 58945 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 01 10:58:52 2022 Received: (at submit) by debbugs.gnu.org; 1 Nov 2022 14:58:52 +0000 Received: from localhost ([127.0.0.1]:43979 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opsj6-0004fG-Gh for submit@debbugs.gnu.org; Tue, 01 Nov 2022 10:58:52 -0400 Received: from lists.gnu.org ([209.51.188.17]:44856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opsj4-0004f7-DW for submit@debbugs.gnu.org; Tue, 01 Nov 2022 10:58:50 -0400 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 1opsj4-0007K4-7U for bug-gnu-emacs@gnu.org; Tue, 01 Nov 2022 10:58:50 -0400 Received: from 4.mo581.mail-out.ovh.net ([178.32.122.254]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opsiu-0004D4-78 for bug-gnu-emacs@gnu.org; Tue, 01 Nov 2022 10:58:50 -0400 Received: from player788.ha.ovh.net (unknown [10.108.1.93]) by mo581.mail-out.ovh.net (Postfix) with ESMTP id BD55324292 for ; Tue, 1 Nov 2022 14:58:26 +0000 (UTC) Received: from thb.lt (lfbn-idf3-1-593-4.w86-252.abo.wanadoo.fr [86.252.170.4]) (Authenticated sender: thibault@thb.lt) by player788.ha.ovh.net (Postfix) with ESMTPSA id 386CE30453461 for ; Tue, 1 Nov 2022 14:58:26 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-97G0029975ace2-c7e1-4cc9-8a8d-9d87a6a0baeb, 23475F9B9015D82EF06BF9B783FA02D60958033E) smtp.auth=thibault@thb.lt X-OVh-ClientIp: 86.252.170.4 From: Thibault Polge To: bug-gnu-emacs@gnu.org Subject: 29.0.50; Setting frame name in pgtk Emacs is asynchronous Date: Tue, 01 Nov 2022 15:58:22 +0100 Message-ID: <87pme6oh69.fsf@thb.lt> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Ovh-Tracer-Id: 3752061440978305956 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvgedrudehgdejudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecunecujfgurhephffvufffkfggtgesmhdtreertddttdenucfhrhhomhepvfhhihgsrghulhhtucfrohhlghgvuceothhhihgsrghulhhtsehthhgsrdhltheqnecuggftrfgrthhtvghrnhepieehheeikeejieejhfeffeethfdtteevvdevfeegvdeiieefleegteegtdegvddunecukfhppeduvdejrddtrddtrddupdekiedrvdehvddrudejtddrgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehthhhisggruhhlthesthhhsgdrlhhtqedpnhgspghrtghpthhtohepuddprhgtphhtthhopegsuhhgqdhgnhhuqdgvmhgrtghssehgnhhurdhorhhgpdfovfetjfhoshhtpehmohehkedupdhmohguvgepshhmthhpohhuth Received-SPF: pass client-ip=178.32.122.254; envelope-from=thibault@thb.lt; helo=4.mo581.mail-out.ovh.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain In pgtk Emacs (built from a very recent git HEAD), running under the Sway window manager, setting a frame name like this: (set-frame-parameter (selected-frame) 'name "Some new name") (redisplay t) Doesn't immediately take effect. The example program below demonstrates this by triggering a race condition: it renames all frames, then immediately requests the state of the Sway window manager, and renames them back. Repeatedly eval'ing the final sexp randomly returns either the original or the renamed frame names. (When testing with a few frames, it never returned a mix of original or renamed names --- it's 100% one or the other) This is an issue because frame names is the only way to associate Emacs frames with Sway identifiers (or any wayland wm) on pgtk Emacs). MWE code follows. Best regards, Thibault --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline; filename=mwe.el Content-Transfer-Encoding: quoted-printable (require 'dash) (require 'json) (defun uniquify-frame-names () "Give all frames a unique numeric ID." (progn (mapc (lambda (it) ;; Preserve already saved names. (unless (frame-parameter it '--saved-name) ;; Save the frame name (set-frame-parameter it '--saved-name (frame-parameter it 'name))) (set-frame-parameter it 'name (frame-parameter it 'window-id))) (frame-list)))) (defun restore-frame-names () "Restore frame names from their saved value." (mapc (lambda (it) (when (frame-parameter it '--saved-name) (set-frame-parameter it 'name (let ((name (frame-parameter it '--saved-name))) ;; We can't restore names of the form ;; F, see frame.c:3080: error ;; ("Frame names of the form F are ;; usurped by Emacs"); (unless (string-match "^F[[:digit:]]*$" name) name))) (set-frame-parameter it '--saved-name nil))) (frame-list))) (defun collect-emacs-frames-from-sway-tree (tree) "Return frames belonging to this Emacs in parsed Sway tree TREE." (let ((next-tree (gethash "nodes" tree))) (if (and (zerop (length next-tree)) (not (string=3D "workspace" (gethash "type" tree))) (eq (gethash "pid" tree) (emacs-pid))) tree ; Collect (-flatten ; Or recurse (mapcar (lambda (t2) (collect-emacs-frames-from-sway-tree t2)) next-tree))))) ;; ! Eval this again and again=20 (prog2 ;; Rename all frames (progn (uniquify-frame-names) (redisplay t)) ;; Get list of containers from sway, and find our frames by pid. (mapcar (lambda (it) (gethash "name" it)) (collect-emacs-frames-from-sway-tree (with-temp-buffer (call-process "swaymsg" nil (current-buffer) nil "-t" "get_tree") (goto-char (point-min)) (json-parse-buffer :null-object nil :false-object nil)))) ;; Rename back frames. (restore-frame-names)) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 02 20:31:48 2022 Received: (at 58945) by debbugs.gnu.org; 3 Nov 2022 00:31:48 +0000 Received: from localhost ([127.0.0.1]:47414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqO96-0000UB-B8 for submit@debbugs.gnu.org; Wed, 02 Nov 2022 20:31:48 -0400 Received: from sonic302-22.consmr.mail.ne1.yahoo.com ([66.163.186.148]:35508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqO94-0000Tm-2D for 58945@debbugs.gnu.org; Wed, 02 Nov 2022 20:31:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1667435499; bh=khJDOI2wP12IrbgOiZTTGmIYtcMQtwo5PiCX7m6KQ+o=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=BQMzHiF1pwN8wSd70t2f51R+9tdIOkrIavudws9+PtNlncP0xjHohLfcBu84f5E9rTwuiJlSMVY4KK63monNZQaADNW57bW/ogfoi82NR9WDNx7hrRWatK7dWbJlSCJ9IxnOnVvPzWYErrbRJlNRdtnaEvb6pp9Ge3KCcbV8osbgAZnFDPENy7FgYo4W99uivae4a0hEHk3DcbSK/hRuEOyOiZCxMeGShISdDQRcSEmVbXMFDAkGzYP0rLcBDR8WXTrWtncWIMLXow0FvKQFKm7iodh0t4neaU9AE7O+qz1oVJ1A8vj6gguwaJYga1X5JLIN0KGlj0ZMlsZZuON1oQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1667435499; bh=LqLu1UAg12cCDZjKXAuuz/ObYSYuaTF4z4ygNEd9k5U=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=GSzNRJV196C6MdgzlR+9HhKxJ1/U6Awa2Lbb9cexazF9Rxl2nAbbyrjWSAVmpjAgC4QmFGJ6p5iWalRq1YSL2Q0dACBfXTmMma7xYo/VdywHNnYRKAQipQhNUOtGE3Bxr/tcTGOVmD2V5I01P+AKYEmEheYgKE2Oq1CYGOYjohv8y2LJ8FcpxHm5F0CBeq+loUEsjNy+oQneG6Y4e4sQqRrss5k6GybQ5nU6WSwtsPs1W+npIgXEnr6+oUORR+9rA/pwI1d/fz4AWBGsxlpXf0p56ngS2MRTBgbs7RZpKmT+UmDIJOiCaG7v0x5r6/IL1IRv1KdBkBj5X8W2FeiiMw== X-YMail-OSG: 7vkt34EVM1k6kx2Xk35_qoPh54gkiz0g719w3hILrVylJuinZaXn9V0zbDbCuMw GzoErUyok5iiU1tmoS2B8msi48IsTKhAfP_Y6d5Sbx9GDEJMVliEIOowklcJsbPa2f4HejjwfiuW ZosBWfKTiARzo9QemRY6Sys.lCpii22mKBnQofor0kXLIEBE.dtLb4.je9EuOTYQGrUuB2chwdik Vwah1iHn.IjmViklSGTcquTzB_wP.rF4r8o2PkS70bugM6hIZkMbhNfxh8VnnXMSGG8WrI.WduoR 32r744LFpMdr6SZ5Xhq2z3VWCTtNAj2zn.BOs2IweU9W5KLIeIfhi1rS688AQfm0WmxNc4BEwUbZ bhwXbUqdpIdRwbPJFq9u8d_WbZ4Xs2eUdvk3QUUoYSUTxMOw2cOvoGn.T04ekZLaRseHLibeMnbn wB.OZXUHGQE5DnNMAPRKZXZGCcBFvFACE5ism4Tzewa8uy1z_kJZJPK.Qa3yXNPyDVqh.9tYd1ER pxQbvTTcAHnEVhZ_rFAohzaHjnoEeaK3z.Qn5xm0ZyoXEMJ1Y2ll368I7Y9Hq22HfJrFTR1svc3Q dp8oGy4rljD5jSbK4c2bdvULmqaGSLujI9AABMP3rY0csvDOpx956.Va.TcAP7_PhHSVUI9kX3nN nfz.8gCDGTrOnga957ozMQMoY_yDO46O2k_OULiVDHFUA99skmwxWFAWnAnSnzQ4u_FBescgBt6P XWd0eb8MfHHAKX4n7sVI4quAP1KhtyZq2avWdUROKOeMbKaaYDEFg6GMrrSdutVv9T6.hNBBSh3h Fb8PxgJ.XUzakBgQzrzWbC3KmZh8tQGusEi5wD4OZmR30TtIfFG1FHQv6spBU3b8Daj59r0nOJ3e Hf.cDAGCKVEjEvVrNCdTEaeMF7Nk6UA3SZKW_vSuczbsxzDlpyMZGkSGZpawZ4zVoJ0y8oNvysux bYyBP4Y2YS4XFP0YIGZDGYz.ClvECD6kr_cTKTME7Yvc1Vawf6CLXYbp9hjIXAOq.ZBDDL.NusAM wCeq_LP9kDTRdcmrQDrvLEg0vqErRjhSpt0W6AbpR5abU__JvjM4qrt14JzbphaUv.OBruc2eyGy 1xGhiFMhc_oYQt.7Nib76X55ARY3IxQsN2ZIjlMiMJ.9y27zDZBfiSidmhcv4N_5zrPXXZQkJ01z hoIsQDFQ4rTx5cuWjVyrdTyqSHAv8q29kuDsAca_YgvnMRCTVs40YTN4oe..C6XbQilte35QnNz3 VrAsLqxWm3xmESWtJPP0U3PhQSdMDJtVUazewfCZNA5ACSlgY_mM494x8FaUWQeAVHLfOfwAqXC. gZdmQbGt7.usj0PZrVeKKvT.dqUQIQcl85tXx4x7KmYgbInLISTNlB1LQZqfWvD0Wu2FmHJ8vUDU TYe0MQF8oodpdO2xF_cobT1FLzGIpjtsjcSpezqDkrZXHIxOm41HMoEEYKOpeDo5ucFHpCMDj.Mr asivM6OB1y_4FA5raG1IICxfjkbycjtU8pwVzf26lf2MYD0tRIzLIdOTVQ.ueI.Dx5qGil1zjfME lJTnK3WFNgMcqgBEc4cgv0iFmikrI8zIllCHCLaoJ7EczYuvAq4NbAifTJwhIPSP4ZaZp.8HmL.. uUw46KkLkoK5p8WI.nEH3QQf5zXq22ga2e8Z3iBiXEnGoxuobAtt3Afh_6R236XHaOU0T4k7cpGy 1Z0QgczQZlZxij5z3T9MG.ujyqQVhmwv3TqRZcVXvIxuDse4ijqTDot9w_HIOYJtczNI7bT2xwrV kJ91neKPoRKviU6BHNK0tDwRA3gMC4b8hf_.UYqk9Z8k1rIdmne.FRjqiNa65XxDTowLejrrpJqj WQB1475fISPGG5OZlxBZIewjBBZ8jwIN4wRfWtU4GlSls3_nDUvzbxJ9eUUK.OqfkEbmVKhzkniW c4coxeQGnBgljzqs1dX3mSAy.m4gNxPiWIvEPHBa6ZMUsuks90nYq4imMpBoFTwwSkJF3SjA0KP. uhDMWLnUeWQD4DcZyZly1UHgNoNEUMn5PWe0wgSxdztnP2NFFeAXIrqqk0G6kH39a4crAqloR9Fs miqJ4RS9GPaCUoPzdnAkXQpKGYFSBFyyMRRjg1QfgqR9yRPsZrut5i1eLyDKEREJasKqinxUkQtG HuNBq6AVqo5TKrSJaWtFToyTnAaxrQPJCwb.JBdYBAMdGcMQmmBAG5EJLCEyCQ2mxs7MpahzeM_T 9j7c0Yv6Yfdu5ohel7_dc_fnT2uQbm.wCRg_RfSet9PO26LfSs9SZYfCH2R8i X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.ne1.yahoo.com with HTTP; Thu, 3 Nov 2022 00:31:39 +0000 Received: by hermes--production-sg3-6c8895b545-pb7wm (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 16e9321f528884bbaba8a4c292a41206; Thu, 03 Nov 2022 00:31:35 +0000 (UTC) From: Po Lu To: Thibault Polge Subject: Re: bug#58945: 29.0.50; Setting frame name in pgtk Emacs is asynchronous In-Reply-To: <87pme6oh69.fsf@thb.lt> (Thibault Polge's message of "Tue, 01 Nov 2022 15:58:22 +0100") References: <87pme6oh69.fsf@thb.lt> Date: Thu, 03 Nov 2022 08:31:30 +0800 Message-ID: <87fsf0g9p9.fsf@yahoo.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.20783 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 1200 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58945 Cc: 58945@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 58945 notabug thanks Thibault Polge writes: > In pgtk Emacs (built from a very recent git HEAD), running under the > Sway window manager, setting a frame name like this: > > (set-frame-parameter (selected-frame) 'name "Some new name") > (redisplay t) > > Doesn't immediately take effect. > > The example program below demonstrates this by triggering a race > condition: it renames all frames, then immediately requests the state of > the Sway window manager, and renames them back. Repeatedly eval'ing the > final sexp randomly returns either the original or the renamed frame > names. (When testing with a few frames, it never returned a mix of > original or renamed names --- it's 100% one or the other) > > This is an issue because frame names is the only way to associate Emacs > frames with Sway identifiers (or any wayland wm) on pgtk Emacs). Setting the title on Wayland is asynchronous, just as it is with X. By the time the request or PropertyNotify event reaches the compositor or window manager, other processes may already have run. In addition, running asynchronously improves performance. I would recommend just waiting a set delay after setting the title. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 12 15:34:26 2022 Received: (at 58945-done) by debbugs.gnu.org; 12 Nov 2022 20:34:26 +0000 Received: from localhost ([127.0.0.1]:49160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otxCr-0004mj-Vq for submit@debbugs.gnu.org; Sat, 12 Nov 2022 15:34:26 -0500 Received: from mail-ot1-f50.google.com ([209.85.210.50]:33500) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otxCn-0004m6-ML for 58945-done@debbugs.gnu.org; Sat, 12 Nov 2022 15:34:22 -0500 Received: by mail-ot1-f50.google.com with SMTP id 46-20020a9d0631000000b00666823da25fso4668497otn.0 for <58945-done@debbugs.gnu.org>; Sat, 12 Nov 2022 12:34:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=W3LJVjsvUe5YyzUM4b3uzOArVObTjWPuMMW3sD/hzsk=; b=cBfK08A2gh2kKCJmoJx0Dhv1/wUx7Fyrcemv4LAo2N0/aLLogbn2NFr5uCvzcteVVv yTLoFQTuX9NaZBpAv4OJo3IIPBXn8VU/qmFSfLK5a1LOWTxCE+1phxDOns6/yydlJZ2x F/7lJIYfSXJpX5C46GpF/GD/HZE68XNz8AurPiCfr77yVGOMq/6zfTRWXNQdQc4xHfLI HK51hTvz/v8kM8Qfv7G3ilmqmQeurwUuJGejf38m9mOEuFOgtrj33AWUdcPtzLWr8sas CMbtoglJD/yjkbTmnmVJ+wfQXw8rh47XmB1LbY8X8zyLmRDsEzieuxp5ZOAJyidX7aKh G5aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=W3LJVjsvUe5YyzUM4b3uzOArVObTjWPuMMW3sD/hzsk=; b=zGCfLE2Gz2RwLcxCpL1S5cx36l5Mvo7W1f/6B2j9iCfPNRUE3pjji7QtY4JrRD5b/3 +u839dLkT4v3oyiOJL0axBCkW3FbjvFIoe3voceCfWyLUJss6iw9SwMfuncA9/HrQFNo MkNZ35X+pbCjXnjtOcGw7elxPI+raIRCmXK3LTea26J8oc7CUc2BDGNkMOXYP5O+sPAZ DUSXaJTqWjfbz6qNh6SNVXFFvXBWfXuOmjAI1Eq6Tv4oH5XEJTOIETpoEUdOHrOyqQdI uO+Wq49Fi0uFCLqmHnoSLwZ2gtxgf6H0JyrejzDeSkzQLmIascZ0sHkra9qZMPGSE93y n5Ug== X-Gm-Message-State: ANoB5pmKqWJooD1Q4TulWVjjh4JvPBqQPH0gM+8ZVbtD0BAEXj4mHKdl ADO8iyNjlUh6SsPuSpzmaJ84gutPA/X2/bZLo3E= X-Google-Smtp-Source: AA0mqf62qBRHOpXrnG4cOVn3Y3fm+FLXB7GPPu0HZ9oYptHHJGWCR0vn2274Bc2lrU0W66kzQt42Px7MDooLRs9eFt4= X-Received: by 2002:a9d:6399:0:b0:661:c48b:12db with SMTP id w25-20020a9d6399000000b00661c48b12dbmr3776437otk.105.1668285256277; Sat, 12 Nov 2022 12:34:16 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 12 Nov 2022 12:34:15 -0800 From: Stefan Kangas In-Reply-To: <87fsf0g9p9.fsf@yahoo.com> (Po Lu's message of "Thu, 03 Nov 2022 08:31:30 +0800") References: <87pme6oh69.fsf@thb.lt> <87fsf0g9p9.fsf@yahoo.com> X-Hashcash: 1:20:221112:58945-done@debbugs.gnu.org::rvU7+IspREb/t2z0:1hzu MIME-Version: 1.0 Date: Sat, 12 Nov 2022 12:34:15 -0800 Message-ID: Subject: Re: bug#58945: 29.0.50; Setting frame name in pgtk Emacs is asynchronous To: Po Lu Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58945-done Cc: Thibault Polge , 58945-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Po Lu writes: > tags 58945 notabug > thanks > > Thibault Polge writes: > >> In pgtk Emacs (built from a very recent git HEAD), running under the >> Sway window manager, setting a frame name like this: >> >> (set-frame-parameter (selected-frame) 'name "Some new name") >> (redisplay t) >> >> Doesn't immediately take effect. >> >> The example program below demonstrates this by triggering a race >> condition: it renames all frames, then immediately requests the state of >> the Sway window manager, and renames them back. Repeatedly eval'ing the >> final sexp randomly returns either the original or the renamed frame >> names. (When testing with a few frames, it never returned a mix of >> original or renamed names --- it's 100% one or the other) >> >> This is an issue because frame names is the only way to associate Emacs >> frames with Sway identifiers (or any wayland wm) on pgtk Emacs). > > Setting the title on Wayland is asynchronous, just as it is with X. By > the time the request or PropertyNotify event reaches the compositor or > window manager, other processes may already have run. In addition, > running asynchronously improves performance. > > I would recommend just waiting a set delay after setting the title. No further comments within 1 week, so I'm closing this bug report. From unknown Fri Jun 20 19:53:11 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 11 Dec 2022 12:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator