Summary:
Also drop checking if the suffix exists, the code is only reached
because this condition has been checked before
Seen while browsing code, no app known to me which would set a non-absolute
desktop file.
Reviewers: hein, broulik, #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D23417
Summary:
Only fetches the properties name and command.
Avoids bringing a libksysguard dependency into libtaskmanager.
I also checked that we don't have a space at the end of the command.
That appears to be a relic from an older time.
Test Plan:
Unit tests exist on KProcessList.
Task manager applications appear fine, I don't know any good edge cases
that go through this code to test.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D23185
Summary:
KwindowInfo already has the PID, which we use in another case where PID is used.
More importantly I have a patch coming to KWindowSystem that returns the correct PID
for processes inside a PID namespace, but I don't alter the NETProperties.
Reviewers: #plasma, apol, hein
Reviewed By: #plasma, apol, hein
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D22753
Summary:
Don't do queries on unknown values.
Don't create a KDesktopFile until we know we're going to need it
Test Plan: Ran plasma with debugs, didn't see any regressions.
Reviewers: #plasma, hein
Reviewed By: #plasma, hein
Subscribers: hein, ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D22162
Summary:
GIMP 2.10 is still being a bad desktop citizen and requires a workaround
of this sort as well.
A nicer fix to do at a later time would be a regex-based rewriting rule
that won't need version updates.
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D21954
Summary:
GIMP 2.10 is still being a bad desktop citizen and requires a workaround
of this sort as well.
A nicer fix to do at a later time would be a regex-based rewriting rule
that won't need version updates.
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D21954
Summary:
The WaylandPrivate::virtualDesktopManagement object is loaded
asyncronously.
It's null until we finish fetching the registry.
A code path could call the desktopNames in that time.
Test Plan:
Had a crash
Couldn't reproduce reliably
Reviewers: #plasma, hein
Reviewed By: #plasma, hein
Subscribers: hein, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D19029
Summary:
PlasmaVirtualDesktop at a protocol level is double buffered.
There's a done() command emitted after property changes. After this the
name might have changed.
Test Plan:
Changed a desktop name (with relevant kwin patch)
Name changed in the pager tooltip
Reviewers: #plasma, hein
Reviewed By: #plasma, hein
Subscribers: zzag, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D18512
Summary:
While I think mixing IPC systems in this class is not the way to go
long-term, we have a strong desire to ship a complete user experience
for virtual desktops on Wayland in 5.15. As D17691 has been delayed
and did not make the Frameworks 5 release we can depend on for 5.15,
this is Plan B.
Reviewers: #plasma, davidedmundson, mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D18290
Summary:
Includes, among other things:
* A refactoring towards supporting more than one desktop per window,
for an eventual virtual desktops / activities merge
* A scheme for process-internal window ids on Wayland as DND payload
so DND in and to the Pager works in the shell
* Implemented various previously missing behavior in WaylandTasksModel
such as implicit moves of windows to the current desktop on various
actions
* Expanded VirtualDesktopInfo API so the Pager can better abstract
over windowing systems
* Implicit internal sharing of VirtualDesktopInfo since there are many
more instances now
* Various cleanups
Still missing:
* Fixing the VirtualDesktops data role in the grouping proxy
* The protocol doesn't have desktop creation/destruction yet, so some
of the related logic is still missing
* Some FIXME TODOs in the code when I was unhappy with the current
KWayland API
This code is largely untested and subject to change.
Depends on D12820 and relates to T4457.
Reviewers: mart, mvourlakos, davidedmundson
Reviewed By: davidedmundson
Subscribers: alexde, anthonyfieroni, zzag, ngraham, abetts, plasma-devel
Tags: #plasma
Maniphest Tasks: T4457
Differential Revision: https://phabricator.kde.org/D13745
Trace:
Direct leak of 24 byte(s) in 3 object(s) allocated from:
#0 0x544cc0 in operator new(unsigned long) (/home/kfunk/devel/install/kf5/bin/plasmashell+0x544cc0)
#1 0x7fe4f0e82df9 in TaskManager::XWindowTasksModel::Private::windowInfo(unsigned long long) /home/kfunk/devel/src/kf5/plasma-workspace/libtaskmanager/xwindowtasksmodel.cpp:419:25
#2 0x7fe4f0e87e69 in TaskManager::XWindowTasksModel::data(QModelIndex const&, int) const /home/kfunk/devel/src/kf5/plasma-workspace/libtaskmanager/xwindowtasksmodel.cpp:646:38
...
Summary:
Due to not passing `parent` to QAIM::index(), we were moving top-level
indices in the map instead. This meant the sort map would become out of
sync with the row move, and to the user it would look like both the
group children and unrelated top-level entries moved.
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D15550
Summary:
Due to not passing `parent` to QAIM::index(), we were moving top-level
indices in the map instead. This meant the sort map would become out of
sync with the row move, and to the user it would look like both the
group children and unrelated top-level entries moved.
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D15550
Summary:
Due to not passing `parent` to QAIM::index(), we were moving top-level
indices in the map instead. This meant the sort map would become out of
sync with the row move, and to the user it would look like both the
group children and unrelated top-level entries moved.
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D15550
Summary:
Turns out c8358c203f only worked accidentally. We can't do this
via filterModel->mapFromSource, because in a lambda connected to
its source model's rowsInserted signal, the proxy hasn't seen that
row yet.
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D15462
Summary:
LibreOffice reuses the same main window for both its start center and
sub-apps like Writer launched from it, changing the window metadata on
the fly. This ensures we hide e.g. a launcher for Writer when picking
it in the LO start center.
Reviewers: broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D15458
Summary:
Some apps initially show their window with bogus/useless window
metadata and then update to useful metadata during early startup.
For example, LibreOffice sets WM_CLASS to soffice/Soffice and
then updates to libreoffice-writer/libreoffice. This leads to
a poor user experience on particular the Icons-only Task Manager,
but also the regular Task Manager depending on settings.
Depending on its configuration (and Icons-only Task Manager is
a particular set of configuration options, as far as the model
is concerned), TasksModel will try to sort a new window task
adjacent to its launcher task. The appearance of a new window
task also causes matching (in terms of identification) launcher
or startup tasks to be filtered out. To the user, this forms a
lifecycle of the launcher being replaced by the window in-place
(and a startup state inbetween, optionally but by default).
Prior to this patch, this sorting decision was only done once,
when a new window enters the source model stack. This meant the
LibreOffice window would initially be sorted into the "wrong"
spot (the bogus metadata doesn't allow us to relate it to its
launcher) and then, following the metadata change, stick to the
wrong position.
Simply changing the code to sort things again on any metadata
change would not have been good enough: Metadata changes can
occur at any time, and things should not just move around on
the user - this sort mode is called "Manual" for a reason. Also,
the visual result would still be poor: The window would initially
appear at the wrong position, then move to the right one a bit
later.
This patch takes the following approach:
* It adds a new config key to taskmanagerrulesrc for listing
ids of matching tasks to completely hide, and of course the
code needed to implement this.
* It adds LibreOffice' bogus initial metadata to this key, so
the tasks is initially hidden.
* The sort code skips over hidden window tasks in the sort
insert queue instead of moving them. The queue is marked as
stale then, and cleared on unrelated windowing system changes.
* It resorts when tasks are unhidden (i.e. once the metadata
update has occured and the task no longer matches the above
config key).
The visual result is that the startup notification on the
launcher spins a little bit longer than before, even though the
window has already appeared (although LO lags in filling in its
contents anyway), and then morphs into the window task
representation once the client has completed the window metadata
change. This happens in such a short order as to be more or less
imperceptible.
If startup notifications are turned off it's broadly the same,
minus the spinning.
BUG:396871
Reviewers: davidedmundson, broulik, ngraham
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D15410
Summary:
The overall mission of TaskTools::windowUrlFromMetadata is to use
various pieces of metadata to run KServiceTypeTrader queries and
get a list of matching services. Sometimes this will find more than
one service. So far we simply used whatever KServiceTypeTrader
returned first, but in some cases we can and should do better. The
included lengthy code comment names an example case.
In concert with D13058, this allows both the Linux-native and Wine-
installed (S|s)team.desktop files to coexist and their windows be
correctly mapped to the relevant .desktop file, by exploiting that
by their nature each case ends up with a different KService::menuId()
(that this is useful for differentiation is why the menuId differs,
after all).
This change looks like it introduces disgusting complexity at first,
but in some sense, trying to pick the most match-y out of the found
services instead of just randomly picking the first one makes sense.
Reviewers: broulik, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D13073
Summary:
After we improved our StartupWMClass handling we worked with Wine
in https://bugs.winehq.org/show_bug.cgi?id=32699 to get them to add
StartupWMClass=foo.exe keys to the .desktop files they generate,
since they have foo.exe in WM_CLASS.
This old rule short-circuits the StartupWMClass handling prevented
this from actually working on our side.
BUG:393787
Reviewers: broulik, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D13058
Summary:
In a log from someone talking about high CPU we can see get multiple X
events for the same window as multiple events, but directly next to each
other. This causes the TaskManager to process changes multiple times
instead of just once which is a waste.
An example is just pressing "enter" in konsole, which will pointlessly
update the title.
This causes problems for expensive app lookup and also QML performs text layouts immediately so any text changes cause quite large CPU usage if done more than 60fps; especially a task text resizing
could result in resizing the entire panel.
Something not relevant in kwin that also monitors these rolls.
This class sits between KWindowSystem and XWindowTasksModel
transparently buffering the changes.
CCBUG: 378010
BUG: 365317
Reviewers: #plasma, hein, broulik
Reviewed By: #plasma, hein, broulik
Subscribers: ngraham, cfeck, broulik, hein, graesslin, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D7481
Summary:
TaskGroupingProxyModel used to return QVariant() as the
AbstractTasksModel::VirtualDesktop role for task groups,
resulting in TasksModel to sort task groups indiscrimi-
nately at the front of the list. In this patch, it instead
returns the lowest virtual desktop found among the children.
BUG:384747
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D11257
Summary: Used in the minimizeAll plasmoid (see D10019)
Test Plan: Used in applet
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D11059
The window name and user visible name are not used in the app identification heuristic, so a change here cannot result in the icon,
app id, app name, generic name, PID or launcher changing.
Differential Revision: https://phabricator.kde.org/D11096
Summary:
The business logic was using the resolved URL in lookups in
internal data structures, instead of the internal key it
previously established equivalence to. This could lead to
junk in internal maps and unnecessarily emitted model changes.
This also improves the unit test not to require apps to be
installed, fixing the CI failure over missing Dolphin.
Reviewers: #plasma, kossebau
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10253