I doubt anybody actually had a Task Manager launcher for
their window manager pinned -ever-, and there was a broken
hardcoded fallback on "kwin" in there.
If the window never comes, the launcher would remain hidden otherwise;
also, if a startup times out before a window appears, we get an ugly
gap when using launch-in-place behavior (i.e. on Icontasks).
BUG:364612
This is a pretty big behavior change vs. libtm-old, and upon reflection
probably better done early in the 5.8 cycle to find out how deeply users
expect the old behavior.
This reverts commit f542116cc2.
We don't show a startup notification if we already have a matching
window -- however, this test was done against all window tasks, even
if some of them are being filtered out (e.g. by virtual desktop).
Now "do we have a window?" is checked against the filtered window
tasks, so a startup notification for $app is shown even if $app
already has a window on a different desktop.
When a launcher was removed, the cache was invalidated at the time the
top-level proxy removes the row for it. However this happens in
response to rowsAboutToBeRemoved from the source model, at which time
launcherList() still contains the launcher at the row about to be
removed. While invalidating the cache in response to rows being removed
from the top-level proxy is correct (for the case where a window task
shadowing a launcher is removed), to handle a launcher removal we also
need to invalidate it when the launcher list changes.
CCBUG:364537
This is an unfortunate regression that crept in via 7eff45a98f the
just the other day: Legacy config can have query items other than
iconData in launcher URLs, which also need to be stripped before doing
the equivalence test matching up launcher-backed window tasks with
launcher URLs. Back to venerable launcherUrlsMatch() as originally --
the real speed optimization is in fetching the right role, anyway, and
as it turns out we really can't save that one call to adjusted() as it
was necessary.
BUG:364492
Summary:
Changes the test from "client rect intersects with screen rect"
to "screen that contains the center of the client+deco rect or
screen this point is cloest to".
This is a behavior change also vs. libtaskmanager-old and should
address user bug reports like bug 364280.
BUG:364280
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1925
Summary:
Makes the API more complex, but it's worth it as it allows
knowledgable users to opt into avoding costly work and/or
data copies in very common use cases.
Significantly speeds up a lot of work in the models in the
presence of X apps that can't be identified and fall back to
the window icon.
Based on profiling by David.
Reviewers: dfaure, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1920
Summary: Second half of the merge of the functionality found in Netrunner's EITM fork.
Reviewers: davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1895
Summary:
When grouping inline, the group subtrees are flattened out into
the top-level list, parents removed, and move() treats groups as
singular entities.
This functionality was previously found in Netrunner's Expanding
Icons Task Manager fork.
This is the first half of the EITM functionality merge.
Reviewers: davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1881
Summary:
This also allows to only emit launcherCountChanged() when it actually changed.
The emit from TasksModel::filterAcceptsRow() is weird though.
Test Plan:
adding one launcher for dolphin, shows up. Running dolphin,
the launcher disappears. Switching desktops, it reappears. Coming back, it
disappears. Closing dolphin, the launcher reappears.
Reviewers: hein
Reviewed By: hein
Subscribers: broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1865
Summary:
This is needed for subsequent feature work which needs to be able
to turn this off.
This review also includes a number of bug fixes to the model:
- Fix an off-by-one when explicitly breaking a group apart.
- Fix rowCount() returning the value for a top-level item with
the same row when called for a group member.
- Fix updating/invalidating persistent indices endRemoveRows()
doesn't know how to handle.
- Update data for former parent item ahead of child-reparenting
insert when breaking a group apart.
None of these fixes actually matter for the applet view, but
they obviously improve correctness, and will matter for later
work.
Reviewers: davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1838
Summary:
QAbstractProxyModel forwards hasChildren() to the source model, which
will return a wrong value for our tree-restructuring model. Current
views/proxies don't call hasChildren(), which is how this oversight
happened, but implementing it improves model hygiene - could blow up
in the future otherwise.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1799
Summary: new library features new ABI
Reviewers: hein, jriddell
Reviewed By: jriddell
Subscribers: jriddell, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1785
This allows more complicated rules, useful for matching Chrome webapps to their
respective desktop file where we need to change crx_foo to chrome-foo-default.
BUG: 358277
CCBUG: 356609
FIXED-IN: 5.7.0
Differential Revision: https://phabricator.kde.org/D1673
Summary:
Also ports in-module users of the library.
Translation domain and pot file name remain unchanged, as the new lib
contains no strings.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1721
Summary:
When no match can be made from classClass, attempt a fallback where we
match any DesktopEntryName that contains classClass and drop all that
do not end with '.$classClass' (i.e. ones that certainly are not using
reverse-domain-name notation. classClass is usually the appname, but
without RDN.
So, when a RDN using application cannot be matched directly (i.e. its
classClass is different from its binary name) we'd end up with an
unsuccessful mapping and use the binary-path as launcherUrl. To improve
on this when that case occurs we now attempt to loosely find a single
matching RDN desktop file and prefer that over the binary fallback match.
Illustrative example:
- org.kde.dragonplayer.desktop
- binary is 'dragon'
- qapp appname and thus classClass is 'dragonplayer'
- classClass cannot directly match the desktop file because of RDN
- classClass also cannot match the binary because of name mismatch
- now *.classClass can match org.kde.dragonplayer though
Reviewers: hein
Reviewed By: hein
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1447
When new task is added to GroupManager, it will be ungrouped
if the task demands attention. Group it back again once it loses
demands attention state.
Differential Revision: https://phabricator.kde.org/D1267
Utilility windows are typically omitted from the task tree, unless they
are in demands-attention state. SVN r901886 (cf. bug 178509 from 2008)
introduced a bug by preventing tasks included in this fashion from
reaching active state, causing the demands-attention state not to ever
be cleared. Additionally, a separate bug prevented utility windows
losing demands-attention state from being removed from the task tree
thereafter. This patch fixes both.
This cropped up with recent versions of The Gimp, which curiously
sets its utility windows to demand attention when opened from within
the app. Since windows demanding attention are also implicitly exemped
from grouping, this appeared to users as a failure of the grouping
logic.
BUG:352477
CCBUG:178509
Libtaskmanager so far only has compile time checks for windowing
systems resulting in the X11 specific code to be executed on platform
wayland which of course causes crashers.
This is a workaround by at least ensuring that we only call X11 specific
code on platform X11.
REVIEW: 125445
This is a follow-up to fbd4a876, which introduced an option to
have running tasks always use the same icon that would be used
for a launcher item. The Task Manager applets subsequently were
updated to default this option to on, addressing frequent user
complaints that Task Manager launchers don't respect their
theming choices (due to window icons overriding the icon theme,
or custom configured icons) or that the icon changes when a
launcher item is replaced by a running task item.
However, for windows that can't be mapped back to an application
known to the menu system, this meant falling back to the MIME
type of the executable, making applications that aren't properly
installed usually end up with application-x-executable or some-
thing else.
This commit changes behavior so that if the launcher URL pro-
duced for a window isn't a valid KService storage id, the window
icon is used again. In turn, since the behavior is now no longer
a trivial yes or no, the option has been dropped from the
library again, making the menu-icon-takes-precedence approach
always-on. In turn, if a launcher item is generated while a
window is around, the icon is taken from the window and stored
persistently. If a launcher is added programmatically using an
URL that can't be mapped to the menu, the icon will be updated
from the window icon at runtime.
BUG:351624
CCMAIL:jkt@kde.org
With the option disabled, task items use the window icon whenever
possible. With the option enabled, the launcher icon is used
instead. This prevents a jarring icon change when applications use
a different icon theme from Plasma Desktop, at the cost of losing
realtime window icon updates being reflected in the Task Manager.
Defaults to on. The Task Manager applets are getting a checkbox
for it.
This is a rock-and-a-hard-place decision. Users are regularly
upset about what they perceive as their theming choice not being
respected, and pleading for app fixes appears to be fairly fruit-
less. It also looks like Wayland will nix runtime window icon
changes. Nonetheless this will likely produce complaints about
edge cases (e.g. Gimp miniature window previews).
CCMAIL:348050