https://bugs.kde.org/show_bug.cgi?id=518883

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REPORTED                    |CONFIRMED
     Ever confirmed|0                           |1

--- Comment #6 from [email protected] ---
I reproduced this down to `libtaskmanager` resolution on Plasma 6.7.4 Wayland.

KWin's live metadata is correct and remains correct when the icon changes:

```text
Firefox Developer Edition:
  desktopFile=firefox-developer-edition
  resourceClass=firefox-developer-edition
  resourceName=firefox

Firefox Nightly:
  desktopFile=firefox-nightly
  resourceClass=firefox-nightly
  resourceName=firefox
```

The installed `windowUrlFromMetadata()` resolver maps both variant app IDs to
`applications:firefox.desktop` when passed the shared resource name `firefox`.
The reason is that `serviceFromMetadata()` checks `StartupWMClass` with the
resource name before trying the exact desktop-file name, and regular
`firefox.desktop` has `StartupWMClass=firefox`.

This also explains the delayed nature of the bug. In my captured occurrence,
`~/.config/mimeapps.list` was replaced at 11:33:17 and KSycoca rebuilt at
11:33:20; cache invalidation causes the task metadata to be resolved again.

As a local confirmation, removing only `StartupWMClass=firefox` from a
user-level copy of the generic launcher and forcing a KSycoca rebuild changes
the installed resolver results to:

```text
firefox-developer-edition -> applications:firefox-developer-edition.desktop
firefox-nightly           -> applications:firefox-nightly.desktop
firefox                   -> applications:firefox.desktop
```

I prepared and uploaded as attachment a small `plasma-workspace` patch that
prefers an exact `serviceByDesktopName(appId)` match, retaining all existing
heuristics as fallbacks. It includes Developer Edition and Nightly regression
tests. `tasktoolstest` passes on Plasma/6.7, current master, and after adapting
the test rows to the active MR !6932 refactor.

This appears to be the same underlying issue as bug 507322. KWin MR !9709 and
`plasma-wayland-protocols` MR !142 also corroborate that desktop-file identity
and resource class/name need to remain separate.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to