This fixes the case in Show All Windows (F10) and Show Windows of
Current App (F7): non-minimized windows from other desktops suddenly
pop-up at the start of these effects instead of remaining hidden.
Note: don't test this with full-screen/maximized windows open on current
desktop otherwise you probably won't see any difference.
Make windows thumbnails use their native stacking order as a 'z' value
for current desktop while lowering windows from other desktops.
By lowering others instead of raising current ones we get to use
stacking order compatible with desktop & dock/panel window types.
For now they are drawn separately, so this change doesn't do much on its
own, but it would become useful during refactoring when putting all
windows (regular and panel types) in a single parent with shared z stack.
Creating a `DecorationPalete` (e.g. the `KColorScheme` inside) is
relatively expensive. Currently, this is done once a client is mapped,
regardless of whether it actually has a server-side decoration.
This change makes it create the palette only when it is actually used,
e.g. the window indeed has a server-side decoration or when the user
actions menu is invoked.
Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
This patch makes grid actually account for the spacing, so that when
fully shown it won't cut off bottom or right edge of desktops. It can
be easily seen with a wallpaper that has visible features on the edges
such as borders, or by settings rowSpacing & columnSpacing to an
absurdly high value.
It's broken and equal to a grid unit, all existing usages must ported
one way or another. Using `smallSpacing * 2` (the intended value of
largeSpacing) results in a gap that is too narrow to be consistent when
scaled down between multiple desktops.
This uses a sealed anonymous file (memfd) instead of a `QTemporaryFile`,
which is more efficient.
Ideally, this file was also reused if the keymap didn't change.
Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
This uses a sealed anonymous file (memfd) instead of a `QTemporaryFile`,
which is more efficient.
Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
This makes use of the new RamFile class to create a sealed anonymous
file to pass the keymap information to clients.
Since wl_seat version 7 [1] it is specified that clients must map the
received fd as `MAP_PRIVATE`. This means we can use `SEAL_WRITE`
on the file to prevent clients from tampering with it and subsequently
reuse the same file for all clients using wl_seat version 7 or above.
[1] 905c0a341d
Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
This class can be used to create an anonymous file, for instance
to pass data between compositor and clients, through means of a
file descriptor, as is done in various Wayland protocols, notably
the keymap exchange.
It also implements sealing the file, so that it can be shared
between multiple clients without them being able to modify it.
If supported, memfd_create is used, otherwise a `QTemporaryFile`
is used.
Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
More correct since QRegion models half open intervals (like QRect) and toPoint
rounds the coordinates. Fixes an issue where one could escape a pointer
confinement by just moving the mouse.
Keep properties sheet open when clicking on the button to add
a new property. This allows to add several properties in a row.
Clicking on the full row will keep the previous behavior for the
simple case, closing the sheet so the new property can be edited
right away
Also make the button on each delegate always visible (not only
on hover) to be more consistent with current status everywhere else.
Previously the sheet would remain open only after detecting some
window properties, which was a very hidden and confusing pattern.
BUG: 431228
FIXED-IN: 5.26
The main motivation behind moving kscreen integration to the
Workspace is to make output configuration work the same way
regardless of the backend and simplify the drm backend.
This slightly refactors the name generation in outputlocator to ensure
we don't add spaces when there's nothing to add a space to. It also
ensures that if we can't determine a proper name because all parts are
empty we return "Unknown" as name.
This removes a bunch of custom rendering, replacing it with a simple QML
file that makes use of KQuickCharts for chart rendering. Functionally,
it should be mostly the same except that I removed all configuration
options as I don't see why we have those.
There is nothing indicating that `OffscreenQuickScene::rootItem()`
releases ownership. Additionally, calling it multiple times currently
means we get a nullptr the second time we call it which crashes the
outputlocator effect.
Currently, we pass the logical size but setGeometry() expects the size
in device pixels. It fixes "kwin_wayland --scale 2" shrinking on every
configure event.
This helps with the Qt6 build, as KWaylandServer::SurfaceInterface is a
QObject subclass used in a property here, while we are only able to
forward declare it here as it comes from a library we don't link against.
And that's no longer supported in Qt6.
If the platform does not support configuring outputs, applying a config
must fail. However, almost all output backends support output
configuring except, perhaps, the x11 backend, but that case doesn't
matter.
Since both output-management-v2 protocol implementation and the rest of
kwin live in the same place and the fact that kde-output-management-v2
is very plasma specific, we can move Platform::requestOutputsChange() to
the implementation of kde-output-management-v2 protocol, it simplifies
the code a bit and improve code encapsulation.
In order to further simplify kde-output-management-v2 protocol, this
change alters the behavior of the protocol so an output configuration
can be applied only once, which is a very reasonable behavior.
It can happen that the window is resized after makeCurrent() and before
swapBuffers(). In that case, context()->makeCurrent() will re-create the
fbo and qpa will present an uninitialize fbo.
Assume that there's current context when swapBuffers() is called. Other
QPA already do this, for example, QtWayland. This would make the
behavior of our qpa consistent with QtWayland and fix resizing the fbo
in swapBuffers().
In general, kwin should be able to handle size mismatch between the fbo
and QWindow, but as an extra hardening measure, we could forbid resizing
windows during rendering, this can be done later though.
It implicitly already is not copyable, due to the unique_ptr member.
However, Qt6 moc code isn't realizing that and fails to compile the
DrmPlane Q_GADGET sub-class of this.
Buffers with implicit modifiers from another GPU must not be imported, as
the layouts may not be compatible.
For buffers with incompatible modifiers, direct scanout can also be rejected
early, saving some computational power.
BUG: 457851