Bug 373075 - Changing Resolution hides programs in task manager
Summary: Changing Resolution hides programs in task manager
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Task Manager and Icons-Only Task Manager (show other bugs)
Version: 5.16.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Eike Hein
URL:
Keywords:
: 375281 375343 375546 378350 400505 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-11-29 14:50 UTC by Bastian Köcher
Modified: 2022-09-04 10:23 UTC (History)
19 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.20


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bastian Köcher 2016-11-29 14:50:44 UTC
Hi, when I am changing the resolution of one of my monitors, all programs disappear in the task manager of the panel of the screen. The programs still run and I can switch to them via alt + tab. Restarting plasmashell fixes the problem. The programs also disappear, if I only change the position of the screen in regards to a second screen.

Basti
Comment 1 Eike Hein 2016-12-08 22:47:57 UTC
Patch under review at https://phabricator.kde.org/D3628
Comment 2 Eike Hein 2016-12-09 16:50:28 UTC
Git commit 0b0d14639a1a0eb2766d74daa3358c0939b6d8b3 by Eike Hein.
Committed on 09/12/2016 at 16:50.
Pushed by hein into branch 'Plasma/5.8'.

Refresh the ScreenGeometry data role whenever a screen is added or changes its geometry.

Summary:
As this happens the screen filtering higher up in the proxy chain
culimating in TasksModel needs to be re-executed, as it compares
ScreenGeometry against a property value set on the model. Without
this update, tasks may disappear from views using TasksModel.

Mapping the trigger conditions to affected rows is deliberately
maximally coarse; see implementation comment in code.

Reviewers: #plasma, davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D3628

M  +2    -0    libtaskmanager/CMakeLists.txt
A  +60   -0    libtaskmanager/abstractwindowtasksmodel.cpp     [License: BSD]
A  +53   -0    libtaskmanager/abstractwindowtasksmodel.h     [License: BSD]
M  +1    -1    libtaskmanager/waylandtasksmodel.cpp
M  +2    -2    libtaskmanager/waylandtasksmodel.h
M  +1    -1    libtaskmanager/xwindowtasksmodel.cpp
M  +2    -2    libtaskmanager/xwindowtasksmodel.h

https://commits.kde.org/plasma-workspace/0b0d14639a1a0eb2766d74daa3358c0939b6d8b3
Comment 3 Bastian Köcher 2017-01-18 09:03:17 UTC
Hi,
I am now using the 5.9 beta and that bug should be fixed in this release? Because I still observe the bug. If I remove my second screen, the applications in the task manager are not updated nor I can click on the applications that are visible in the task manager.
Comment 4 Eike Hein 2017-01-18 13:46:19 UTC
Yeah, it should be fixed. I can't reproduce the problem (I can only test res changes, I have no second monitor) so some other dev will need to try.
Comment 5 Eike Hein 2017-01-18 18:43:41 UTC
A code audit has uncovered that there's still a bug in plasma-framework "below" the improved libtaskmanager code.
Comment 6 Eike Hein 2017-01-18 18:44:18 UTC
Git commit 2c69d2254663955564ef26687797e3b977be5a38 by Eike Hein.
Committed on 18/01/2017 at 18:43.
Pushed by hein into branch 'master'.

Add missing screenGeometryChanged signal; use in AppletInterface; fix typos.

Reviewed-by: Marco Martin

M  +7    -2    src/plasma/corona.h
M  +12   -1    src/scriptengines/qml/plasmoid/appletinterface.cpp
M  +2    -1    src/scriptengines/qml/plasmoid/appletinterface.h

https://commits.kde.org/plasma-framework/2c69d2254663955564ef26687797e3b977be5a38
Comment 8 Bastian Köcher 2017-01-19 08:36:56 UTC
Thanks for the fast "support" :). I will try to find some time to test your patches!
Comment 9 Eike Hein 2017-01-19 12:01:25 UTC
*** Bug 375281 has been marked as a duplicate of this bug. ***
Comment 10 Eike Hein 2017-01-20 17:53:09 UTC
*** Bug 375343 has been marked as a duplicate of this bug. ***
Comment 11 Eike Hein 2017-01-25 14:55:37 UTC
*** Bug 375546 has been marked as a duplicate of this bug. ***
Comment 12 Bastian Köcher 2017-02-08 10:00:40 UTC
Now I am using 5.9.1 from the arch repos and the bug still occurs. My main taskmanager on my laptop display still does not update if I remove my second monitor.
Comment 13 Bastian Köcher 2017-02-08 10:08:53 UTC
Okay, I realised that I need to wait for the newest version of plasma framework. Sorry for spaming. I will mark this as resolved again.
Comment 14 Bastian Köcher 2017-02-14 08:54:22 UTC
Okay, I am back :D After upgrading to plasma-framework 5.31 the unplugging of Screens works perfectly for me. So, thanks for that :) However, changing the resolution still results in empty task managers on both screens (that also works with only one screen attached). After resetting the resolution, the task manager is filled again.
Comment 15 Radics Péter 2017-02-14 09:45:29 UTC
If I disable the secondary monitor via kscreen, then the laptop taskbar remains populated. If however I just disconnect the secondary monitor, then first the applications get migrated to the laptop screen (they appear on the laptop-screen-taskbar), then after some flickering the laptop-screen-taskbar gets empty...

All returns to normal when I reconnect the external monitor.
(running plasma-framework 5.31.0 and other plasma stuff at 5.9.1 on arch)
Comment 16 . 2017-03-10 21:16:50 UTC
The bugs as I observed them on Plasma 5.9.3/KDE FWs 5.31.0/Qt 5.7.1:

Steps to reproduce:

1. prepare a laptop, an external monitor and an HDMI cable
2. start up some apps, so that there are some icons on the taskbar
3. connect the external monitor via HDMI
4. close the lid of your laptop
5. observe that the taskbar has now moved from the laptop screen to the external monitor and is lacking app icons
6. open the lid of your laptop
7. observe that the taskbar is back on the laptop screen, but is still lacking the app icons and that the external monitor screen lost its wallpaper and is completely black
9. disconnect the external monitor
10. observe that the taskbar is still missing the app icons

In order to regain the taskbar app icons, one has to either reconnect the external monitor and move the taskbar to the external monitor screen and back, or proceed with the steps described here - https://superuser.com/a/1091973/248776.

Related: https://bugs.kde.org/show_bug.cgi?id=353722, https://bugs.kde.org/show_bug.cgi?id=348095, https://bugs.kde.org/show_bug.cgi?id=360856, https://bugs.kde.org/show_bug.cgi?id=371734
Comment 17 Nicolás Alvarez 2017-03-31 01:33:13 UTC
(In reply to Jan Chren (rindeal) from comment #16)
> 4. close the lid of your laptop
> 5. observe that the taskbar has now moved from the laptop screen to the
> external monitor and is lacking app icons

To follow these steps you also need to make sure the energy settings are configured to turn off the screen when the lid is closed, rather than suspending the system.
Comment 18 Eike Hein 2017-04-19 10:37:02 UTC
Git commit e34b0064d6ff787270127d261be65c3b6780b31f by Eike Hein.
Committed on 19/04/2017 at 10:36.
Pushed by hein into branch 'Plasma/5.8'.

Fix off-by-one.

M  +1    -1    libtaskmanager/abstractwindowtasksmodel.cpp

https://commits.kde.org/plasma-workspace/e34b0064d6ff787270127d261be65c3b6780b31f
Comment 19 Eike Hein 2017-04-27 09:21:48 UTC
*** Bug 378350 has been marked as a duplicate of this bug. ***
Comment 20 Gábor Katona 2017-06-02 11:36:15 UTC
The problem is still present in 5.9.5.
Comment 21 Christian González 2017-08-17 12:01:53 UTC
I see the same problem in my KDE Neon User Edition with Plasma 5.10.4, Frameworks 5.37.0 and Qt 5.9.1.
Comment 22 Alexander Mentyu 2018-02-28 07:42:02 UTC
I have no external display - i just tested appearance of programs in Task Manager on various screen resolution changed - and they appear ok

Plasma: 5.12.2
Apps: 17.12.2
Frameworks: 5.43.0
Qt: 5.10.1
Kernel: 4.14.20-2-MANJARO
OS: Netrunner Rolling
Video: Intel 4400
Screen: 1600x900
Comment 23 David Redondo 2019-05-14 11:07:54 UTC
Still in Plasma 5.15.5 with Frameworks 5.57.
Unplugging second screen resulted in empty taskmanager on the first screen.
Comment 24 Germano Massullo 2019-09-16 12:16:34 UTC
Devs: could you please read https://bugs.kde.org/show_bug.cgi?id=404295#c7
Comment 25 Alexander Kandaurov 2020-05-31 18:50:16 UTC
*** Bug 400505 has been marked as a duplicate of this bug. ***
Comment 26 Nate Graham 2020-07-06 20:42:00 UTC
Git commit 7852de5e697c17565fda8d0b24c062ea00605a37 by Nate Graham, on behalf of Alexander Kandaurov.
Committed on 06/07/2020 at 20:40.
Pushed by ngraham into branch 'master'.

Notify of screen geometry changes only after DesktopView has updated

Currently updating the DesktopView geometry and emitting signals notifying of changes to screen geometry are connected independently to QScreen::geometryChanged(), while screenGeometry() as well as availableScreenRect() and availableScreenRegion() depend on the DesktopView geometry. The incorrect order of slots being called causes the task manager to behave incorrectly on screen configuration changes, displaying either no windows or windows from a wrong screen. This also affects the desktop pager widget when configured to show the current desktop only.

M  +1    -0    shell/desktopview.cpp
M  +1    -0    shell/desktopview.h
M  +2    -2    shell/shellcorona.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/7852de5e697c17565fda8d0b24c062ea00605a37