all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Tim Ruffing <public@timruffing.de>
Cc: 49505@debbugs.gnu.org,
	Manuel Uberti <manuel.uberti@inventati.org>,
	Peter Oliver <p.d.oliver@mavit.org.uk>,
	Lars Ingebrigtsen <larsi@gnus.org>
Subject: bug#49505: 28.0.50; Multiple launchers in GNOME
Date: Tue, 24 May 2022 21:39:16 +0800	[thread overview]
Message-ID: <87leurkq2j.fsf@yahoo.com> (raw)
In-Reply-To: <8e5d9ea72584f981124ade5c69ec7162751723fe.camel@timruffing.de> (Tim Ruffing's message of "Tue, 24 May 2022 14:33:17 +0200")

Tim Ruffing <public@timruffing.de> 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.





  reply	other threads:[~2022-05-24 13:39 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-10 13:38 bug#49505: 28.0.50; Multiple launchers in GNOME Manuel Uberti
2021-07-10 14:48 ` Manuel Uberti
2021-07-10 16:31 ` Lars Ingebrigtsen
2021-08-10 21:22   ` Peter Oliver
2021-08-11  5:00     ` Manuel Uberti
2021-08-11 17:34       ` Peter Oliver
2021-08-11 17:52         ` Manuel Uberti
2021-10-09 11:19           ` Peter Oliver
2021-10-09 11:29             ` Lars Ingebrigtsen
2021-10-09 15:08               ` Manuel Uberti
2022-05-24 12:33                 ` Tim Ruffing
2022-05-24 13:39                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-05-24 14:10                     ` Tim Ruffing
2022-05-25  0:16                   ` Lars Ingebrigtsen
2022-06-20 19:13                   ` Peter Oliver
2022-09-20 12:19                     ` bug#49505: bug#51749: 29.0.50; Emacs 29 Creates Only Emacsclient Icon in Ubuntu Dock Lars Ingebrigtsen
2023-09-03  8:50                       ` Stefan Kangas
2021-08-11 11:10     ` bug#49505: 28.0.50; Multiple launchers in GNOME Lars Ingebrigtsen
2021-07-11 17:06 ` Manuel Uberti
2021-07-25  6:38 ` Manuel Uberti
2021-08-11 10:19   ` Utkarsh Singh
2021-10-04  5:38 ` Manuel Uberti
2021-10-04  9:34   ` Lars Ingebrigtsen
2021-10-07 11:21   ` Simen Heggestøyl
2021-10-07 18:10     ` Lars Ingebrigtsen
2021-10-08 13:02       ` Simen Heggestøyl
2021-10-09 11:18         ` Lars Ingebrigtsen

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=87leurkq2j.fsf@yahoo.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=49505@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=luangruo@yahoo.com \
    --cc=manuel.uberti@inventati.org \
    --cc=p.d.oliver@mavit.org.uk \
    --cc=public@timruffing.de \
    /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.