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#49505: 28.0.50; Multiple launchers in GNOME Date: Tue, 24 May 2022 21:39:16 +0800 Message-ID: <87leurkq2j.fsf@yahoo.com> References: <87sg0mnn9o.fsf@gnus.org> <2b12a676-2e15-1094-6525-4d11268912d@froglet.home.mavit.org.uk> <9245be25-3962-0b25-1c04-dabb77b6e9d7@inventati.org> <16370f3-a2a-9ce6-3af5-396da88a4dc8@froglet.home.mavit.org.uk> <87mtnio2qt.fsf@gnus.org> <8e5d9ea72584f981124ade5c69ec7162751723fe.camel@timruffing.de> 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="25644"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: 49505@debbugs.gnu.org, Manuel Uberti , Peter Oliver , Lars Ingebrigtsen To: Tim Ruffing Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 24 15:40:42 2022 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 1ntUm9-0006OU-F8 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 May 2022 15:40:41 +0200 Original-Received: from localhost ([::1]:56992 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ntUm8-0006wH-4w for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 May 2022 09:40:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntUlW-0006vZ-PA for bug-gnu-emacs@gnu.org; Tue, 24 May 2022 09:40:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57453) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ntUlW-00085e-Gx for bug-gnu-emacs@gnu.org; Tue, 24 May 2022 09:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ntUlW-00022n-Dx for bug-gnu-emacs@gnu.org; Tue, 24 May 2022 09:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 May 2022 13:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49505 X-GNU-PR-Package: emacs Original-Received: via spool by 49505-submit@debbugs.gnu.org id=B49505.16533995747818 (code B ref 49505); Tue, 24 May 2022 13:40:02 +0000 Original-Received: (at 49505) by debbugs.gnu.org; 24 May 2022 13:39:34 +0000 Original-Received: from localhost ([127.0.0.1]:51350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntUl3-000222-SQ for submit@debbugs.gnu.org; Tue, 24 May 2022 09:39:34 -0400 Original-Received: from sonic317-32.consmr.mail.ne1.yahoo.com ([66.163.184.43]:40033) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntUl2-00021o-FL for 49505@debbugs.gnu.org; Tue, 24 May 2022 09:39:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1653399565; bh=gmOZAlZIuLDrZQDcP8qk6RgilBtn/cpQgSWY/g5Y4lA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=hIxu86hqTp7eAyi1IFLreb3FsfBDzwGCCTRFddfvARRlwQxy4mcv7buiCY1wXc67nUv3MJLeFVdC8mtWpjDF/3ks1x5pFuAkn9ZArOvUcQJ1z1ucKo65Red/6uzHsPXp7LhYI3S7VcZ6lEA+DUYJ0GUghamD9m4WYPtN7EqLCOpA/zR2J5oDAvLl/mZiSXYSwuIylfDKbPMsaLGCRZZilEuUxsUfmLfAL2pFcOhHzbFnhaFO8IJreo0BBw05l4zGTXMYiyBBhFzcOTnXn7UcKSEaO5Bye/ydVwcBd6oppI+M2nTmXSeZaMZy/eajHfMsLdMYoqR2pf/JbLYYR4+ONQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1653399565; bh=cUh4k+lacsJSrPnwV3+WIdKdQ+ZkKaQ/bIlNG6P4C26=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=nJVam1q/EcnKaCYatYl9vj9lO7nEqT7qzYwcHSbwCdzrcj0mTx25adjQp9eK3RG9YyuUrdH0I3o51nP8OWR9HBxEqUiJchYNG4R7xUG5JP/IoGFXwigm61GyYMBn+fAwEMNLRm97MTmLmQriSRGFEvTqrTaDo/5OnVwpxrfxWXqaMKvjgteghWHWlRux6ek2G0a8JQkDnpHDIG2/EkWYF8xVGvuG4hY/QDzSJ2PhSsPG/9de4gU8NIYTXp7jHhyvxadUms8XV2PjKS8vSCF1H4VVqg12WVvh3M6kFKJTsUWCCMjp0XWUtgIVSS/AtO2/VbjQYqq5/WNzE4Al5BLhCQ== X-YMail-OSG: Z19fYioVM1lS9HOAw9dR6pAttwXoatUX666Yf9oSD69oDvI7vAoHfF3fs0n.abS Acry8as9EiTMJJnEmFypALoBR5r9VzdA6RP8AjrSp3abnun2VCWnD7IwlacQup6NAOXZFxrqNMOT DqlVlvRcqdcGBUXcj4695_Tms4liGNw2ipPsmIE1EGWddYDqe_aC.Z4lyg5hfXqu.WKHjjWP2URr aqUHHVmS1iTIi15LW2H8zF8tg7WBMpeL.h378sUbuDikr23.HTSs.oLx5NnYnx.Vem99Sm6w0m5L QUMdwElKPdsccb75QURbNNxvp.kDrEsmaPVjP3Rgq8rFMFNJzrcEWQeeOEJ1IcrXS5UkC4cMJkaB _HZ0qj1ISvkmNktpd3TdCmb8BbgnIQfVU0lqCUzDz2qDfeHxqfXreU9gZSnORloSjg7pKsObDrPA kzG0Cu7hm5wFQ..q48pGU_a1T5MjjQjjry9IhSJnqaDgD76bed8jbVKisWlbOYi7xYn6lKBO_NWh tudTBKWqjSdukmCtfSlO2EgpzFDorgRimsNQ6KA8dmAtQvnbnfMvqrmRpEUzp7XN1q.7cjNX9nEb LwsRv2f7.rZdKghJ_Iar1qURE18bhdPHMajaIcnCpSFjd50zO2NQBInWTI7eN_icBkb3Io7rRynG 9Mpv68HX4oGDHG2bIRWuHcu6NRUylcFG5oUl.D4DCkiSYnSgd90kTj5tH4vio3Xzeh.QQ.KJYY4x eh0GqT2MI.ak65NI18UUm4y3T9JUvOu1aSFrqMLpv5Ir_qLHsXqGQTS2G7cSpJ7bGbVxrtrBuug1 uqkgB0Owadrc5ZBhRO5Qw3ToMjjJaAtUNcau_ANoTR X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.ne1.yahoo.com with HTTP; Tue, 24 May 2022 13:39:25 +0000 Original-Received: by hermes--canary-production-sg3-7959d4d9bd-vdvd8 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID a4d4ccb472b3926441abd2686933001f; Tue, 24 May 2022 13:39:21 +0000 (UTC) In-Reply-To: <8e5d9ea72584f981124ade5c69ec7162751723fe.camel@timruffing.de> (Tim Ruffing's message of "Tue, 24 May 2022 14:33:17 +0200") X-Mailer: WebService/1.1.20225 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" Xref: news.gmane.io gmane.emacs.bugs:233008 Archived-At: Tim Ruffing writes: > We currently offer two .desktop files both specifying *the same* > StartupWMClass=Emacs. This means that desktop environments can't match > windows to applications. When my GNOME sees a windows with WMClass > "Emacs", it assigns it arbitrarily to emacs.desktop ("Emacs") and not > emacsclient.desktop ("Emacs (Client)") because there's no unique match. > That means that when I click the "Emacs (Client)" icon in my dash, a > window is created but GNOME assumes it belongs to "Emacs", creating > another icon in my dash representing the "Emacs" window. This is wrong > and very inconvenient. > > There are two ways that can be fixed, either we should have only a > single application (i.e., .desktop file) or we should make sure that > windows from emacs and emacsclient can be distinguished based on their > wmclass: I would prefer to only have a single desktop file. > 2. Keep the .desktop files separate, and use separate wmclasses for > daemon and non-daemon mode > > This has also been attempted in > 1a845a672dc73c8e98e6cb9bb734616e168e60ba by changing argv[0] but this > was reverted by f355f32e69b1389f7d51b8a50c0a9c064dc2cb32 because > changing argv[0] is not a great idea. But we could change wmclass > differently, just by calling gtk_init() with a different string > depending on whether we're in daemon mode or not. Not a good idea. Besides, the Emacs server can also be started inside a running session, so that wouldn't work perfectly either. We can have fine-grained control over WM_CLASS (despite whatever the toolkit does), since Emacs can use X Windows requests to directly set the WM_CLASS property, but changing that for individual frames based on how they were created sounds excessive to me.