Bug 447016 - Taskbar controls (playback controls) affect the wrong window when several windows are grouped.
Summary: Taskbar controls (playback controls) affect the wrong window when several win...
Status: RESOLVED FIXED
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: Git (add output of "git log -1 --oneline" to description)
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-15 08:50 UTC by Johannes
Modified: 2022-01-15 09:57 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 22.04
Sentry Crash Report:


Attachments
Shows the bug in action. It is reproducible. (3.50 MB, video/mp4)
2021-12-15 08:50 UTC, Johannes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes 2021-12-15 08:50:37 UTC
Created attachment 144567 [details]
Shows the bug in action. It is reproducible.

CONTEXT
The taskbar, when hovered, allows to see thumbnails of the windows in a per-application basis. If a window has a playback of some sort, media controls are present, provided that the software in questions supports them (rarely the case, though). In the case of gvwenview, the media controls allow to switch images or to start a slideshow. 

ISSUE
When several windows are grouped, then the media controls from the taskbar may address the wrong window. In fact, they would all address the same window. The video provided shows this behaviour.


STEPS TO REPRODUCE
1. Open two windows of gwenview in a folder with several images,
2. Provided you use a taskbar that groups applications, hover the group,
3. Do next/previous and see what happens

OBSERVED RESULT
Always the same window would receive the commands, regardless of which was commanded.

EXPECTED RESULT
The correct window should receive the command.

SOFTWARE/OS VERSIONS
Linux kernel: 5.13.0-22-generic 64-bit
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.88
Qt Version: 5.15.2

ADDITIONAL INFORMATION
See video
Comment 1 Fushan Wen 2021-12-16 06:31:15 UTC
It seems Gwenview only registers one media instance. But I can also reproduce the bug by using two VLC windows.
Comment 2 Bug Janitor Service 2021-12-16 16:36:38 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/755
Comment 3 Fushan Wen 2021-12-29 15:19:45 UTC
Git commit eda364f0060e3bf24e68c9cb1f3dd68543281af3 by Fushan Wen.
Committed on 29/12/2021 at 15:19.
Pushed by fusionfuture into branch 'master'.

taskmanager: Check hasPlayer individually in grouped task tooltips

1. Copy `mprisSourceName`, `playerData` and `hasPlayer` to
   ToolTipInstance.qml, and add a new property named `appPid` to get
   individual PID of a task in grouped task tooltips.
2. Modify `sourceNameForLauncherUrl()`: First match PID, if PID match
   fails, fallback to desktopFileName match.

M  +1    -0    applets/taskmanager/package/contents/ui/ToolTipDelegate.qml
M  +4    -0    applets/taskmanager/package/contents/ui/ToolTipInstance.qml
M  +12   -2    applets/taskmanager/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/commit/eda364f0060e3bf24e68c9cb1f3dd68543281af3
Comment 4 Fushan Wen 2021-12-29 15:21:27 UTC
Now it's time to fix the bug in Gwenview.
Comment 5 Fushan Wen 2022-01-15 09:56:55 UTC
Should be fixed in Plasma 5.24 and Gwenview 22.04