[plasmashell] [Bug 465393] mute icon on task bar appears on wrong applications

2023-02-07 Thread Alexis Murzeau
https://bugs.kde.org/show_bug.cgi?id=465393

--- Comment #5 from Alexis Murzeau  ---
I've tried the linked commit (c27fb3c0d25a0ad7af44acd1d9e957cdaae8802e) on
plasma-workspace and confirm that this fixes the issue.
Thanks :)

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

[plasmashell] [Bug 465393] mute icon on task bar appears on wrong applications

2023-02-07 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=465393

Nate Graham  changed:

   What|Removed |Added

 CC||n...@kde.org

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

[plasmashell] [Bug 465393] mute icon on task bar appears on wrong applications

2023-02-06 Thread Fushan Wen
https://bugs.kde.org/show_bug.cgi?id=465393

Fushan Wen  changed:

   What|Removed |Added

   Version Fixed In||5.27
 Resolution|--- |FIXED
  Latest Commit||https://invent.kde.org/plas
   ||ma/plasma-workspace/-/commi
   ||t/c27fb3c0d25a0ad7af44acd1d
   ||9e957cdaae8802e
 Status|REPORTED|RESOLVED

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

[plasmashell] [Bug 465393] mute icon on task bar appears on wrong applications

2023-02-06 Thread Fushan Wen
https://bugs.kde.org/show_bug.cgi?id=465393

Fushan Wen  changed:

   What|Removed |Added

 CC||qydwhotm...@gmail.com

--- Comment #4 from Fushan Wen  ---
appId shouldn't be empty. If it's empty there is a bug in libtaskmanager.

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

[plasmashell] [Bug 465393] mute icon on task bar appears on wrong applications

2023-02-06 Thread Alexis Murzeau
https://bugs.kde.org/show_bug.cgi?id=465393

--- Comment #3 from Alexis Murzeau  ---
I found that the issue is related to this line of code:
https://invent.kde.org/plasma/plasma-desktop/-/blob/1988f0756ec9b61d6eff6eae14c1023502d7f701/applets/taskmanager/package/contents/ui/Task.qml#L233

var streams = pa.streamsForAppId(task.appId);

Some applications like the first pinned application icon, foobar2000 and gitk
in the screenshots don't have a task.appId (using console.log() I found that
the string was empty).
I guess that when appId is an empty string, pa.streamsForAppId will return all
streams, that would explain why it shows a mute icon on them.

Adding a if(task.appId) around that line of code fixes the issue:
---
/usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml.bak
2023-01-19 12:40:03.0 +0100
+++ /usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml
2023-02-06 23:41:02.020817778 +0100
@@ -230,7 +230,10 @@

 // Check appid first for app using portal
 // https://docs.pipewire.org/page_portal.html
-var streams = pa.streamsForAppId(task.appId);
+var streams = [];
+if(task.appId) {
+pa.streamsForAppId(task.appId);
+}
 if (!streams.length) {
 streams = pa.streamsForPid(task.pid);
 if (streams.length) {

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

[plasmashell] [Bug 465393] mute icon on task bar appears on wrong applications

2023-02-06 Thread Alexis Murzeau
https://bugs.kde.org/show_bug.cgi?id=465393

Alexis Murzeau  changed:

   What|Removed |Added

Version|master  |5.26.90

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

[plasmashell] [Bug 465393] mute icon on task bar appears on wrong applications

2023-02-06 Thread Alexis Murzeau
https://bugs.kde.org/show_bug.cgi?id=465393

--- Comment #2 from Alexis Murzeau  ---
Created attachment 156012
  --> https://bugs.kde.org/attachment.cgi?id=156012&action=edit
plasma-desktop-5.26.90_duplicate_icons.png

I've added 2 screenshots. The difference between the two are:
- Opened some applications including Spotify, foobar2000 and gitk
- Spotify is the only application playing music
- Upgraded plasma-desktop from 5.26.5 to 5.26.90
- Run `plasmashell --replace` in a terminal

The first icon is a non-running, pinned, application.

When clicking on one of the mute buttons, Spotify is muted and all mute buttons
become "unmute" buttons (their icon changed).

I'm using pulseaudio and jackd only (no pipewire).

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

[plasmashell] [Bug 465393] mute icon on task bar appears on wrong applications

2023-02-06 Thread Alexis Murzeau
https://bugs.kde.org/show_bug.cgi?id=465393

--- Comment #1 from Alexis Murzeau  ---
Created attachment 156011
  --> https://bugs.kde.org/attachment.cgi?id=156011&action=edit
plasma-desktop-5.26.5_no_duplicate_icons.png

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