Summary: | Setting task manager to only show applications on current screen (monitor) does not work properly, and will display applications not on that screen | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Zachary Layne <z.buildrocks> |
Component: | Task Manager and Icons-Only Task Manager | Assignee: | Eike Hein <hein> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | blog, kde, plasma-bugs, theonlyianwood |
Priority: | NOR | Keywords: | regression, usability |
Version: | 5.3.0 | ||
Target Milestone: | 1.0 | ||
Platform: | Kubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Zachary Layne
2015-04-29 00:49:37 UTC
Possible dupe of bug 336570. Hmm, the bug is different, though they may be related. That bug is the task manager not updating, while my bug is that even though my task managers are set to only display applications on that screen, they display applications on other screens, as well as one application that for some reason doesn't even show up in the task manager. This was not an issue upon upgrading to Kubuntu 15.04, but after using the backport ppa to update to Plasma 5.3, this bug has appeared. I'm seeing this too on Ubuntu 15.04 (Version: 4:5.2.2-0ubuntu3 of plasma-workspace). *** Bug 347661 has been marked as a duplicate of this bug. *** Bug 336570 might be related. What would be necessary for this bug to become CONFIRMED? Personally the status doesn't matter much to me, my ticket searches list UNCONFIRMED as well. My problem is not having more than one screen myself. What a pity ... Anyway, thanks for your efforts so far. I started digging a bit into the code. applets/taskmanager/package/contents/ui/ConfigGeneral.qml contains the setting in question: CheckBox { id: showOnlyCurrentScreen text: i18n("Show only tasks from the current screen") } I grep'ed the whole repository git://anongit.kde.org/plasma-desktop for the string showOnlyCurrentScreen. I found a default value in applets/taskmanager/package/contents/config/main.xml: <entry name="showOnlyCurrentScreen" type="Bool"> <default>false</default> </entry> and a binding in applets/taskmanager/package/contents/ui/main.qml: Binding { target: backend.groupManager property: "showOnlyCurrentScreen" value: plasmoid.configuration.showOnlyCurrentScreen } I would think that an actual _usage_ of this setting would also contain the string "showOnlyCurrentScreen" - but I could not find any further occurences of the string. I also tried showOnlyCurrentDesktop and showOnlyCurrentActivity. For those, I could also find a usage in applets/taskmanager/package/contents/ui/Task.qml, but apparently that does not affect the filtering, but only the presentation of a single task. I am bit confused now. Am I missing something obvious, or is it really so simple, i.e. the settings are not considered at all? 'backend.groupManager' is an instance of TaskManager::GroupManager from plasma-workspace' libtaskmanager. The Binding block you quoted binds its 'showOnlyCurrentScreen' property to the current configuration value. The setting is used just fine, in other words. OK, I now found out that the usage apparently is in git://anongit.kde.org/plasma-workspace, namely in libtaskmanager/groupmanager.cpp. It's a bit hard to read this code, as there are nearly no comments at all ... I looked at GroupManagerPrivate::addTask(::TaskManager::Task *task), and that looks ok by itself: if (showOnlyCurrentScreen && !task->isOnScreen(currentScreenGeometry)) { //qDebug() << "Not on this screen and showOnlyCurrentScreen"; skip = true; } I guess the code should be easy enough to debug - when one has set up the entire development environment ... :-/ It's relatively easy to do: 1. Clone plasma-workspace and plasma-desktop 2. Grab build dependencies (most distros have some equivalent to yum-builddep for this) 3. cd <clone>; mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=/home/<user>/foo ../ 4. cd into libtaskmanager/ and applets/taskmanager/ in the respective build dirs, run 'make install' within them to build and install only the lib and the applet into the prefix used above 5. Stuff something like https://paste.kde.org/puib5apru/siofmg into your /etc/profile.d/ or (smarter) into a *.sh file in ~/.config/plasma-workspace/env/ (mkdir if necessary) 6. Relogin 7. You're not using a self-built Task Manager s/not/now/ Thanks, that indeed sounds relatively easy. I have also tried out something else: When I de-maximize a window, it is no longer shown in the taskbar of the other screen. TaskManager::isOnScreen contains this: // for window decos that fudge a bit and claim to extend beyond the // edge of the screen, we just contract a bit. const QRect window = wi.frameGeometry(); QRect desktop = screen; desktop.adjust(5, 5, -5, -5); return window.intersects(desktop); I first thought it has something to do with that. But apparently that code has been in for a long time. Furthermore, when I drag a non-maximized window to the edge of the screen, it is _not_ shown in the task manager of the other screen (even though I do see a slight glow on the other screen in that case -- something that does not happen with a maximized window). FWIW, show only taks from the current screen is working here git master on a dual screen xrandr arrangement. The workaround mentioned in Bug 268259 comment 43 works for me. So I would say this bug is a duplicate. Many thanks for your investigative efforts Jens. *** This bug has been marked as a duplicate of bug 268259 *** |