GNOME Bugzilla – Bug 646689
Wrong icon shown in app menu
Last modified: 2013-08-15 01:51:11 UTC
The app menu (i think it's called that, it's near the top of the screen with current app name and faded icon) has the wrong icon when I: 1. Click on accessibility menu (right hand side of top panel). 2. Choose "Universal Access Settings" 3. Click on "All Settings" 4. Go to any other control panel. In addition with any other control panel open, if I repeat steps above, the 'Universal Access Settings' does not appear.
Created attachment 185092 [details] Screenshot which demonstrates the problem.
Also see: https://bugzilla.redhat.com/show_bug.cgi?id=690852 For a more detailed description as well as some possibly related side effects wrt launching capplets from the user / accessibility panek menus.
Created attachment 185219 [details] [review] ShellWindowTracker: Ensure WM_CLASS remains canonical if it matches I unintentionally made .desktop->pid association "win" over WM_CLASS. Fixing this makes the case of ancillary .desktop file entry points (e.g. gnome-control-center's various shortcut .desktop files) correctly show System Settings, and not whatever the shortcut is. In the future I'd like to have a way to say "this .desktop file is a shortcut, ignore me" or something.
This turned out to be a trivial fix.
(In reply to comment #3) > > In the future I'd like to have a way to say "this .desktop file > is a shortcut, ignore me" or something. This would allow us to e.g. show the correct name during startup-notification. Basically: X-GNOME-Shortcut-For: gnome-control-center.desktop Exec=gnome-control-center (that'd be it, no need for translations since we don't show them, etc.)
Comment on attachment 185219 [details] [review] ShellWindowTracker: Ensure WM_CLASS remains canonical if it matches this looks right, as far as it goes, but the icon is still wrong(?) while the control center is starting up. (It shows the a11y icon until the window is mapped, at which point it switches to the control center icon.) > In the future I'd like to have a way to say "this .desktop file > is a shortcut, ignore me" or something. gnome-universal-access-panel.desktop: Exec=gnome-control-center universal-access gnome-control-center.desktop: Exec=gnome-control-center They have the same argv[0], so the one with the argc>1 Exec key must be a specialized form of the one with the argc==1 exec key.
(In reply to comment #6) > (From update of attachment 185219 [details] [review]) > this looks right, as far as it goes, but the icon is still wrong(?) while the > control center is starting up. (It shows the a11y icon until the window is > mapped, at which point it switches to the control center icon.) That's expected, and what I was explaining here: > > In the future I'd like to have a way to say "this .desktop file > > is a shortcut, ignore me" or something. > > gnome-universal-access-panel.desktop: > Exec=gnome-control-center universal-access > > gnome-control-center.desktop: > Exec=gnome-control-center > > They have the same argv[0], so the one with the argc>1 Exec key must be a > specialized form of the one with the argc==1 exec key. Hmmm...I'm wary of trying to unify on argv[0]. For one thing, consider interpreters like /bin/sh.
but you'd never have a .desktop file with *just* Exec=/bin/sh. So you wouldn't be able to unify "Exec=/bin/sh foo" with "Exec=/bin/sh bar", etc. (I guess I wasn't totally explicit on that before; it's not just that one .desktop file's Exec key is a prefix of the other's, it's that the shorter one takes no arguments, and the longer one launches the same program with arguments.) ...except that that wouldn't actually work, because gnome-control-center.desktop runs "gnome-control-center --overview". Hm. Also, we'd have to allow %f/%F/%u/%U in the "no arguments" one, or else it wouldn't work anywhere. With that exception though, it would match brasero-nautilus ("nautilus --no-default-window --no-desktop burn:///") to nautilus ("nautilus %U") and vinagre ("vinagre %U") to vinagre-file ("vinagre -F %U"). It would not know what to do with shotwell ("shotwell %U") vs shotwell-viewer ("shotwell %f") though. (And those 4 are the only duplicate argv[0]s in my current F15 install.)
Comment on attachment 185219 [details] [review] ShellWindowTracker: Ensure WM_CLASS remains canonical if it matches at any rate, the state with the patch is certainly better than the state without the patch, and it looks like there may not be an easy better fix for now
*** Bug 647167 has been marked as a duplicate of this bug. ***
Comment on attachment 185219 [details] [review] ShellWindowTracker: Ensure WM_CLASS remains canonical if it matches Was pushed
Removing from the GnomeShell301 tracker, though possibly this should be closed if "In the future I'd like to have a way to say "this .desktop file is a shortcut, ignore me" or something." is just a vague wish list that we don't have concrete plans to fixed.
*** Bug 651074 has been marked as a duplicate of this bug. ***
This has been fixed at some point.