The first time the list in `Add properties` is shown, the position of the first
delegate is miscalculated as (0, 0) and gets hidden behind the section header.
It only repositions when the delegate is destroyed and re-created, for example, when
setting and deleting a filter text. (https://bugs.kde.org/show_bug.cgi?id=422289)
This works-around it by delaying the `overlayModel` filtering until the list is first
shown, which makes the delegate position correctly.
BUG: 421583
FIXED-IN: 5.19
The recommended way to get all EGL extension defines is to include
EGL/eglext.h. EGL/eglmesaext.h is a private header that compositors
should not use.
BUG: 422131
Since the port to KConfigXT, the placement setting in `kwinrulesrc` now stores the enum value instead of a string equivalent.
The strings and enum values are taken from `placement.h/.cpp`
This was suggested by @zzag in https://phabricator.kde.org/D29790
We don't need to bind disabled outputs to surfaces that overlaps them.
This prevents error down the line and warnings about ignoring surface.enter events with Qt.
BUG: 419749
Summary:
Present windows works as follows:
- It moves all windows about until nothing is overlapping with any
other window.
- This doesn't resize anything so ultimately we end up with a new
co-ordinate space that's bigger than the screen depending on the amount
of overlap.
- We then render this whole view transformed to the screen
The rectangle "bounds" is in overviewpixels, with "scale" being the
ratio to convert to screen pixels.
When adjusting the new bounds there's an attempt to centre align things.
As bounds is in "overviewpixels" we multiply references to the previous
bounds by scale, and divide everything through at the end. bounds.x/y
were missed.
This is mostly unoticable except on massive super-ultra-wide monitors
which will otherwise have a tendency to shift to the left.
Test Plan:
Kai created a whole new test framework for this code that copy pasted
this algorithm then showed mock windows as rectangles
Reviewers: #kwin, apol, broulik, zzag
Reviewed By: #kwin, apol, broulik, zzag
Subscribers: zzag, apol, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29705
Currently, the spinners used to edit position and size rules have an upper
limit of 4098, which may be not enough for wide/hdpi/mutiple screens.
The property itself has no such limit in the `.kcfg` schema
This is just an issue with the editor.
BUG: 421892
FIXED-IN: 5.19
Even though the frame geometry and the client geometry have a connection
between themselves, it doesn't mean that the frame geometry will change
if the client geometry has changed and vice versa. For example, it can be
the case when the border size changes. The frame geometry won't change,
but the client geometry will.
In general, similar to the frameGeometryChanged signal, we need another
signal that is emitted when the client geometry has been changed that
can be used then in DecoratedClientImpl.
Unfortunately, 5.19 release is around the corner and I would prefer not
to do any geometry-related changes in order to avoid introducing new
regressions.
In order to fix the propagation of the client size to decorations, this
change ports DecoratedClientImpl from frameGeometryChanged to a signal
that is emitted whenever geometry of any kind has been changed.
BUG: 419080
FIXED-IN: 5.19.0
In previous code we used to update/show cursor even when the pointer
device was present, e.g mobile device. Guard it behind the cursor
enabled check.
BUG: 418977
FIXED-IN: 5.19.0
In order to generate window quads for a window, the scene needs a valid
WindowPixmap tree. If it's time to render the window, the scene will
build window quads for the contents, the server-side window decoration,
the drop-shadow and cache the resulting window quads. With this way of
generating window quads, we need the window pixmap tree to be valid,
or else no contents window quads will be generated.
While the window pixmap tree is guaranteed to be valid at the time of
generation of window quads for Wayland and X11 clients, this is not the
case for Xwayland clients.
When an Xwayland client is created, some time may pass between the
moment it's been created and the moment when a regular wayland surface
has been associated with the xwayland window. If the compositor decides
to render the Xwayland client in that short period of time, the window
quads cache won't have window quads cache.
In order to work around the weird asynchronous behavior of Xwayland
clients, this change makes the scene discard the window quad cache when
a new window pixmap has been created. This will ensure that the current
window quads are always in sync with the current window pixmap tree.
The list of virtual desktops is retrieved using a DBus method, instead of
`KWindowSystem`, to make it work both in Wayland (as well as X11).
FIXED-IN: 5.20
BUG: 416165
Summary:
Since the port to KConfigXT, the setting "placement" is stored using the enum value, instead of a string equivalent.
This updates the kcm model to be able to communicate this property with the config schema.
BUG: 421586
FIXED-IN: 5.19.0
Test Plan:
- In a rule set the "Initial Placement" property
- The value is stored in `~/.config/kwinrulesrc`
- Close/reopen the kcm. The placement value is correctly loaded.
Reviewers: #kwin, #plasma, zzag
Reviewed By: #kwin, #plasma, zzag
Subscribers: zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29790
Summary:
Use `QSize`/`QPoint` to handle and store coordinate values (size and position)
Previously, the rules model stored the "coordinate" type properties as a
`QString` with format `x, y`.
This fails when setting the properties to the config schema, as it requires
a proper `QPoint` or `QSize` value, specially the latter which can't be
convert from such a string.
BUG: 421055
FIXED-IN: 5.19.0
Test Plan:
- Add a new rule and set its position and size properties
- Hitting apply stores the right values in `~\.config\kwinrulesrc`
- Close the kcm and reopen, the values are loaded
- Property detection still works for size and position
Please note that there is a pre-existing bug of some position/sizes not being
applied to the windows in some cases, when using `Apply Initially`.
Better try using the `Force` policy.
Reviewers: ngraham, #kwin, #plasma, zzag
Reviewed By: #kwin, #plasma, zzag
Subscribers: zzag, ltoscano, yurchor, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29764
Summary:
e.g. "Vertically maximize" is more natural and expressive than "Maximize (vertical only)"
See D29671#inline-169882.
Test Plan: New strings appear in the KCM
Reviewers: zzag, #vdg, #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29729
Summary:
Similar to regular cursors a drag surface can have a scale.
The buffer "rect" should be in logical pixels at which point QPainter
will automatically handle everything.
CCBUG: 421395
Reviewers: #kwin, zzag, apol
Reviewed By: #kwin, zzag, apol
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29672
Summary:
Currently, we use icons to display possible maximize button actions. The
problem with those icons is that they are confusing even for me, a person
who knows kwin in and out. The size_all icon implies that if you click the
maximize button, you'll be able to move the window around. Same goes with
the size_ver and size_hor icons, they indicate that user will start
resizing the window in the vertical and horizontal direction, respectively.
Test Plan:
Before
{F8312394}
After
{F8312395}
Reviewers: #kwin, #vdg, ndavis
Reviewed By: #vdg, ndavis
Subscribers: ngraham, ndavis, broulik, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29671
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