Summary: | Task Manager tooltips don't display window name when it's customized to remove the " - [app name]" part | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | bj.cardon |
Component: | Task Manager and Icons-Only Task Manager | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | nate |
Priority: | NOR | ||
Version: | 5.25.5 | ||
Target Milestone: | 1.0 | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/plasma-desktop/commit/626167b3c7be11afa35dd0d5ecbdfdf37a1ef897 | Version Fixed In: | 5.27.5 |
Attachments: |
what you see on hovering the item in the task manager
the header of the Chrome window when the name of the window is set |
Created attachment 154411 [details]
the header of the Chrome window when the name of the window is set
Can reproduce. A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1481 Git commit 8537e82c4f4215f83a525719da889b7a60f4112d by Fushan Wen, on behalf of Nate Graham. Committed on 21/04/2023 at 14:58. Pushed by fusionfuture into branch 'master'. applets/taskmanager: fix tooltip text with custom window title The logic here makes an assumption that the window title will always be in the form of "[window title] — [app name] [optional KWin numerical suffix]" which is not always the case, and breaks when this assumption is not met. Exceptions to that pattern used to be rare, but now we are doing it in several of our own apps, and it's also possible for users to set custom titles in Chromium, so it's not so rare anymore. To handle this case, add an early return that handles the custom window title. FIXED-IN: 5.27.5 M +8 -0 applets/taskmanager/package/contents/ui/ToolTipInstance.qml https://invent.kde.org/plasma/plasma-desktop/commit/8537e82c4f4215f83a525719da889b7a60f4112d Git commit 626167b3c7be11afa35dd0d5ecbdfdf37a1ef897 by Fushan Wen, on behalf of Nate Graham. Committed on 21/04/2023 at 15:01. Pushed by fusionfuture into branch 'Plasma/5.27'. applets/taskmanager: fix tooltip text with custom window title The logic here makes an assumption that the window title will always be in the form of "[window title] — [app name] [optional KWin numerical suffix]" which is not always the case, and breaks when this assumption is not met. Exceptions to that pattern used to be rare, but now we are doing it in several of our own apps, and it's also possible for users to set custom titles in Chromium, so it's not so rare anymore. To handle this case, add an early return that handles the custom window title. FIXED-IN: 5.27.5 (cherry picked from commit 8537e82c4f4215f83a525719da889b7a60f4112d) M +8 -0 applets/taskmanager/package/contents/ui/ToolTipInstance.qml https://invent.kde.org/plasma/plasma-desktop/commit/626167b3c7be11afa35dd0d5ecbdfdf37a1ef897 Git commit ad81c1ab6544c8c8fc357785d759bb31f9bf9855 by Fushan Wen. Committed on 21/04/2023 at 15:09. Pushed by fusionfuture into branch 'master'. applets/taskmanager: also check title contains "-" M +1 -1 applets/taskmanager/package/contents/ui/ToolTipInstance.qml https://invent.kde.org/plasma/plasma-desktop/commit/ad81c1ab6544c8c8fc357785d759bb31f9bf9855 Git commit df39f05070cd74000050d746814ed65851129820 by Fushan Wen. Committed on 21/04/2023 at 15:12. Pushed by fusionfuture into branch 'Plasma/5.27'. applets/taskmanager: also check title contains "-" (cherry picked from commit ad81c1ab6544c8c8fc357785d759bb31f9bf9855) M +1 -1 applets/taskmanager/package/contents/ui/ToolTipInstance.qml https://invent.kde.org/plasma/plasma-desktop/commit/df39f05070cd74000050d746814ed65851129820 |
Created attachment 154410 [details] what you see on hovering the item in the task manager SUMMARY In Chrome 88 released in January 2021, Google introduced a "Name Window" function. When you set this, the name of the entire window is changed to the value you set. This makes it very easy to organize tabs by Window and find those tabs from the task manager. On Windows, the task bar shows the name of the window by the window preview, but on KDE the name of the Window is changed to "_" in the task switcher. I'm using the Icons-Only Task Manager. STEPS TO REPRODUCE 1. Open a Chrome window 2. Right click in the header area of Chrome and click "Name Window..." 3. Type a name for the Window (I typed "Personal Chrome" for the example) 4. Hover over the Chrome icon in the task manager and note that the window name was changed to an underscore (or maybe it's supposed to be a hyphen, I dunno). OBSERVED RESULT The Window name is changed to the wrong string EXPECTED RESULT The window name shows "Personal Chrome" in this example. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Kubuntu 22.04 KDE Plasma Version: 5.25.5 KDE Frameworks Version: 5.98.0 Qt Version: 5.15.3