Summary:
Currently, if one wants to monitor for new X11 and Wayland clients, they
have to listen for two signals. Workspace::clientAdded() is emitted only
for X11 and Xwayland clients, while WaylandServer::shellClientAdded() is
emitted only for xdg-shell clients. Such design doesn't scale well.
As the first towards emitting Workspace::clientAdded() for new Wayland
clients, this change replaces the X11Client parameter in the clientAdded
signal with AbstractClient.
Test Plan: Tests still pass.
Reviewers: #kwin, cblack
Reviewed By: cblack
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29665
Summary:
The geometry property has been deprecated for quite some time and its
usage in scripts is highly discouraged. Since AbstractClient overrides
the geometry property to make it writable, the same thing must be done
for the frameGeometry property.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29666
Summary: Provide for KWin scripts the possibility to work with a activities aware ClientModel. In the same way that the ClientModelByScreenAndDesktop works with virtual desktops.
Reviewers: #kwin, mart, zzag
Reviewed By: #kwin, zzag
Subscribers: zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29284
Summary:
In order to allow shading wayland clients, this change moves core shade
code from X11Client to AbstractClient.
Test Plan: Shading still works on X11.
Reviewers: #kwin, cblack
Reviewed By: cblack
Subscribers: cblack, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29512
Summary:
cca0e15b45 broke code that calculates the value of the fps counter.
The frames field stores timestamps of previous frames, not time between
each two consecutive frames.
This change doesn't attempt to make the show fps compute more accurate
performance metrics, e.g. how much times it takes to execute rendering
commands on the GPU, etc.
Test Plan: The Show FPS effect displays more sensible values.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, broulik, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29247
Summary:
Remove anchors within `Kirigami.AbstractListItem` delegates.
They were causing random misalignment of items in the main and the overlay `ListView`s
Test Plan:
Before {F8284332}
After {F8284333}
Reviewers: broulik, #vdg, #kwin, ngraham
Reviewed By: #vdg, ngraham
Subscribers: ahiemstra, ngraham, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29423
Summary:
This change drops Workspace::sendPingToWindow() in order to better
separate X11-specific and more generic code.
Test Plan: Still able to close X11 windows.
Reviewers: #kwin, apol
Reviewed By: apol
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29472
Sub-surface contribute to the window quads cache. So, we must re-build
it, if any sub-surface has been changed.
Differential Revision: https://phabricator.kde.org/D29131
No window quads are generated for sub-surfaces right now. This leads to
issues with effects that operate on window quads, e.g. magic lamp and
wobbly windows. Furthermore, the OpenGL scene needs window quads to
properly clip windows during the rendering process.
The best way to render sub-surfaces would be with a little help from a
scene graph. Contrary to GNOME, KDE hasn't developed any scene graph
implementation that we could use in kwin. As a short term solution, this
change adjusts the scene to generate window quads.
Window quads are generated as we traverse the current window pixmap tree
in the depth-first search manner. In order to match a list of quads with
a particular WindowPixmap, we assign an id to each quad.
BUG: 387313
FIXED-IN: 5.19.0
Differential Revision: https://phabricator.kde.org/D29131
We need to release the previous window pixmap if the new pixmap is
valid. However, it's currently the case only when the client has
attached either an fbo buffer or a wl_buffer. If an internal client
has attached a raster buffer, the previous window pixmap won't be
released.
In order to ensure that we're going to release the previous window
pixmaps no matter what type of buffer has been attached, this change
refactors WindowPixmap to use isValid() to verify that the new
window pixmap is valid.
Differential Revision: https://phabricator.kde.org/D29131
In order to generate window quads for sub-surfaces, we need a valid
window pixmap tree. The problem is that the window pixmap tree is
created too late in the rendering process. This change adjusts the
scene so it creates window pixmap trees before buildQuads().
Differential Revision: https://phabricator.kde.org/D29131
Summary:
Small UX improvements when exporting rules
Add a `Select All` button
Disable `Save` if no rules are selected
In export mode set button text to `Cancel Export`
Test Plan: {F8276279}
Reviewers: #kwin, #vdg, filipf
Reviewed By: #vdg, filipf
Subscribers: filipf, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29341
Summary:
windowIcon.pixmap().bits() creates and deletes the QPixmap object.
Which means data is dangling when we call m_winInfo->setIcon()
Surprisingly harmless in real life.
Test Plan: Reran kwin_wayland on X11 with valigrind
Reviewers: #kwin, apol
Reviewed By: apol
Subscribers: zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D28667
Summary:
Add a shouldReturnNativeSize to screenshotFullscreen so that KWin can export
screenshot that are screen pixel accurate.
Useful for spectacle to be able to do rectangular selection kind of screenshot.
Test Plan:
Example of a top screen using a 1.25 scale ratio being export in native resolution
{F8255144}
(The top screen has a bigger size than its virtual geometry and next screen doesn't overlap)
Example of the same screen in virtual resolution:
{F8255146}
Reviewers: #kwin, davidedmundson, bport, zzag, apol
Reviewed By: #kwin, davidedmundson
Subscribers: broulik, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29122
In case Xwayland does not use multiple buffers, the currently attached
buffer is going to be destroyed if the frame window is resized. It may
render the previous and the current window pixmap invalid and thus result
in visual artifacts when an X11 client is being interactively resized.
In order to avoid the visual artifacts, this change disables support for
synchronized resizing for X11 clients if the version of Xwayland is less
than the version in which Xwayland started using multiple buffers, i.e.
1.21.
Differential Revision: https://phabricator.kde.org/D29250
Given that we now query the current X11 time stamp on Wayland, we can
enable synchronized resizing for Xwayland clients.
Differential Revision: https://phabricator.kde.org/D29250
Assume that Xwayland's current X11 time stamp corresponds to the system
monotonic time. Unfortunately, we cannot make roundtrips to Xwayland and
we cannot query the time stamp asynchronously because it may introduce
regressions in the standalone X11 window manager.
Differential Revision: https://phabricator.kde.org/D29250
Summary:
Currently this string is marked as untranslatable for the unknown reason
Patch by Victor Ryzhykh
Test Plan: Translate, run.
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29271
Summary:
Since QProcess::setProgram() doesn't split the command, we need to do it
ourselves.
Test Plan: `dbus-run-session kwin_wayland "kate foo.txt"` works again.
Reviewers: #kwin, cblack, davidedmundson, apol
Reviewed By: #kwin, cblack, davidedmundson, apol
Subscribers: apol, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29253
Summary:
In order to help with debugging why the OpenGL scene is not loaded,
it can be really helpful to know what scenes the Compositor attempts to
load.
Test Plan: Ran kwin with QT_LOGGING_RULES="*.debug=true".
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29261
Summary:
Use the properties `valueRole` and `currentValue`, introduced in Qt5.14 for `QQC2.ComboBox`
This didn't work before due to QQC2 version being mis-detected at build time, so the code mocked an internal `currentValue` property.
After D28859, it is now required to fix:
"file:///home/nate/kde/usr/share/kpackage/kcms/kcm_kwinrules/contents/ui/RulesEditor.qml"
"Error loading QML file.\n42: Type RuleItemDelegate unavailable\n68: Type OptionsComboBox unavailable\n35: Cannot override FINAL property\n"
QCoreApplication::postEvent: Unexpected null receiver
Test Plan:
Try to edit a rule or add a new one.
The rule editor page shows.
Reviewers: ngraham, #kwin, zzag
Reviewed By: ngraham, #kwin, zzag
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29145
Summary:
OtherDesktopsExclusion and OtherActivitiesExclusion flags must be
re-evaluated after user has switched between virtual desktops or
activities; otherwise ClientLevel may contain clients that are not
necessarily on the current virtual desktop or activity.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Maniphest Tasks: T12877
Differential Revision: https://phabricator.kde.org/D28827