Commit graph

4340 commits

Author SHA1 Message Date
Vlad Zahorodnii
3aa635430b effects: Drop WindowPaintData.shader property
It allows us to encapsulate SurfaceItem rendering. It's needed to add
support for YUV->RGB conversion fallback path.

Effects that use this property must be ported to OffscreenEffect, see
also OffscreenEffect::setShader().

This is a BREAKING CHANGE!
2022-11-17 08:23:51 +00:00
Vlad Zahorodnii
4363b25b2d effects/invert: Port to OffscreenEffect
Allows us to drop WindowPaintData.shader and to encapsulate rendering of
windows, which is needed to provide YUV->RGB conversion path.
2022-11-17 08:23:51 +00:00
Vlad Zahorodnii
69859aec28 kwineffects: Bring back OffscreenEffect::setShader()
OffscreenEffect can be still used to apply a shader effect to a window.
2022-11-17 08:23:51 +00:00
Vlad Zahorodnii
f06dce9d12 backends/wayland: Remove unused includes 2022-11-16 22:19:00 +02:00
Vlad Zahorodnii
bcb38f366d backends/wayland: Port to xdg-decoration-v1
The server-decoration protocol is deprecated, and the clients should use
the xdg-decoration-v1 protocol instead.

kwin will indicate that it wants server side decoration. If the host
compositor insists on client-side decorations, the wayland backend will
render no csd. However, this is de-facto state at the moment too,
perhaps it can be improved by using libdecor?

Regardless, no csd is the current state too, except that both host and
nested compositors can enter a loop where one side says to use CSD and
the other side says that they want SSD.
2022-11-16 19:56:52 +02:00
Vlad Zahorodnii
be3146873f core: Drop OutputBackend::isReady()
OutputBackend has a concept of readiness. When the host compositor goes
down, the OutputBackend will be marked as not ready, and when it
reappears, the output backend will be marked ready again.

On the other hand, host compositor going down is a niche case, it's not
something that often happens and it's hard to justify adding more moving
parts to the startup code. It's easier to call initialize() and check
whether it fails rather than call initialize() and then monitor isReady.

Therefore, this change drops OutputBackend::isReady() to make startup
simpler.
2022-11-16 14:47:25 +00:00
Vlad Zahorodnii
6951d662d6 backends/wayland: Merge WaylandOutput and XdgShellOutput 2022-11-16 14:47:25 +00:00
Vlad Zahorodnii
d4676cceb3 backends/wayland: Linearize startup sequence
This change removes async bits from the startup code in the wayland
backend to make it simpler. The main motivation behind this change is to
refactor the wayland backend so OutputBackend::isReady() can be removed.
2022-11-16 14:47:25 +00:00
David Edmundson
319c6a4cfa activation: Guard against not having any active window
If we have no active window we shouldn't call lastUsageSerial. We may as
well activate whatever client requested it.
2022-11-16 07:44:52 +00:00
l10n daemon script
9e5c577fdb SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-11-16 01:56:45 +00:00
Vlad Zahorodnii
98b65bb447 Port a usage of QScopedPointer to std::unique_ptr 2022-11-16 00:38:05 +02:00
Xaver Hugl
34aa734c7b plugins: use more std::unique_ptr 2022-11-15 15:28:37 +00:00
Xaver Hugl
738b04a364 libkwineffects: use more modern C++ 2022-11-15 15:28:37 +00:00
Xaver Hugl
0f3ae0216c kcmkwin/kwinscreenedges: use more modern C++ 2022-11-15 15:28:37 +00:00
Xaver Hugl
95599d2ffd ruleitem: use std::unique_ptr 2022-11-15 15:28:37 +00:00
Xaver Hugl
65e886cde2 backends/drm: support the panel orientation property 2022-11-15 13:25:19 +00:00
Vlad Zahorodnii
e58affc71b wayland: Make debug console placeable
Since the debug console has Qt.BypassWindowManagerHint flag set, it
won't be placed or ensured that it stays in the work area.

On the other hand, unlike X11, kwin won't have problems if the debug
console is managed on wayland.

BUG: 453920
2022-11-15 14:11:18 +02:00
l10n daemon script
16de8cf19c SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-11-15 01:52:24 +00:00
Aleix Pol
ecbe29640c screencast: Fix how we tell pipewire that the stream has been resized
We need to send sizes in a format that param buffers understand.
This fixes some glitches we'd see when sharing a window and resizing it.

Thanks Jan Grulich for pointing me in the right direction!

BUG: 461590
2022-11-14 13:40:13 +00:00
Xaver Hugl
5fd9871fa7 workspace: silence signed unsigned comparison warning 2022-11-13 14:32:16 +00:00
Xaver Hugl
704d1d639a qBound -> std::clamp 2022-11-13 14:32:16 +00:00
Xaver Hugl
d265535f9b qMin -> std::min 2022-11-13 14:32:16 +00:00
Xaver Hugl
b0b7c8b1d3 qMax -> std::max 2022-11-13 14:32:16 +00:00
Vlad Zahorodnii
f1f58a186d plugins/nightcolor: Add a todo note reminding to remove legacy shortcut 2022-11-13 14:24:54 +02:00
l10n daemon script
4cb06a3713 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-11-13 01:51:17 +00:00
Arjen Hiemstra
cd65515ea6 scene: Store renderTargetRect as QRectF
This allows the projection matrix calculation to properly calculate the
screen edges without losing bits due to earlier rounding.
2022-11-11 13:10:41 +00:00
Xaver Hugl
9130b947e0 backends/drm: generate modes even if some common modes are available
Some monitors claim to support some but not all common modes, despite the display
supporting them all.
2022-11-10 16:07:52 +00:00
Vlad Zahorodnii
f1e8ce9456 x11: Rename X11StandalonePlatform to X11StandaloneBackend 2022-11-10 16:21:00 +02:00
Vlad Zahorodnii
b830d408af core: Rename Platform to OutputBackend 2022-11-10 10:10:28 +02:00
Vlad Zahorodnii
72883df2aa core: Move workspace bits from Platform to Application
Platform will become OutputBackend so some workspace bits, e.g. the
effects handler, have to move a layer above.
2022-11-10 10:10:28 +02:00
Vlad Zahorodnii
f1369a40f9 core: Drop Platform::supportsNativeFence()
Use Scene::supportsNativeFence() directly.
2022-11-10 10:10:28 +02:00
Vlad Zahorodnii
4610aaf614 plugins/idletime: Adjust the poller to deprecation of simulateUserActivity()
Wrap the implementation of the simulateUserActivity() function in an
BUILD ifdef and make it noop since there are valid usecases in the real
world.
2022-11-10 07:27:20 +00:00
Vlad Zahorodnii
e91b621d53 x11: Stop requesting XCB_EVENT_MASK_COLOR_MAP_CHANGE
It's unused.
2022-11-09 11:52:14 +00:00
Vlad Zahorodnii
af39185a9a wayland: Avoid selecting unused X11 events
We don't use input events on Wayland so Xwayland doesn't need to report
them back to us.
2022-11-09 11:52:14 +00:00
Vlad Zahorodnii
9f345d4dd3 autotests: Fix remaining "using namespace KWayland::Client" 2022-11-08 23:15:17 +02:00
David Edmundson
dadfd7aec8 Drop isCompletelyOpaque optimisation
With the floating geometry this becomes a non-trivial check, at some
point this will cost more than the gl blend itself.
2022-11-08 15:04:48 +00:00
David Edmundson
bcd9f1e958 Provide SurfaceItem::shape as a floating vector
Our logical co-ordinates for shape can be floating. The shape is used to
determine final vertices on screen.

The commit appears to introduce some new loops but they're mostly what
QRegion would be doing internally so it shouldn't impact performance.
For most cases we just have a single rectangle in our shape anyway.

opaqueRegion is unchanged for now.
2022-11-08 15:04:48 +00:00
Zhiyi Zhang
68d1ee8f08 x11window: Don't send a final ConfigureNotify event in leaveInteractiveMoveResize()
With 74eb0d8, ConfigureNotify events are always sent when moving windows. It's no longer necessary
to send a final ConfigureNotify event after a window is moved.
2022-11-07 21:16:06 +08:00
Zhiyi Zhang
74eb0d861b x11window: Send ConfigureNotify events when moving windows
This removes the optimization that sends only one ConfigureNotify event after moving is completed.
However, other windows may depend on ConfigureNotify events to adjust their position in a timely
manner. For example, the shadow window surrounding the main login window of WeChat on Wine.

BUG: 449302
2022-11-07 16:11:23 +08:00
l10n daemon script
163c36595e SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-11-07 01:51:06 +00:00
Vlad Zahorodnii
5762b9a4cc core: Drop Platform::supportsGammaControl()
If the platform doesn't support setting gamma ramps, let the request
fail. In long term, we need a software fallback too so this property is
not that relevant.
2022-11-05 09:03:39 +00:00
Vlad Zahorodnii
084f92bd7a backends/x11: Make OverlayWindow factory function private to the backend
The concept of an overlay window is specific to X11 and it's not present
on other platforms.
2022-11-05 08:44:58 +00:00
Vlad Zahorodnii
1f7bfc7902 backends/x11: Move OverlayWindow handling to standalone backend 2022-11-05 08:44:58 +00:00
Aki Sakurai
62af17617f Screencast: Fix inverted screencast on OpenGLES and memfd
The output of glReadPixels is in inverted when GLTexture is not inverterd.
2022-11-04 23:19:42 +00:00
Marco Martin
a8d0d7f8a5 Option for WindowHeap to not alter the layout
Bring back the DesktopGrid option to not alter window position
so that the grid look like perfect screenshots of each desktop

BUG:455350
2022-11-04 12:15:50 +01:00
Vlad Zahorodnii
432d1f9d31 Remove unused include 2022-11-03 20:30:06 +02:00
Vlad Zahorodnii
af0d39c118 Remove some commented out code 2022-11-03 17:55:46 +00:00
Aleix Pol
fee348d147 buttonrebindsfilter: Add bracesbuttonrebindsfilter: Add braces 2022-11-03 16:41:44 +01:00
Aleix Pol
baac63ca13 buttonrebinds: Fix infinite loops with RebindScope
This way it's possible to assign A to B and B to A (i.e. swap buttons)
without getting it crash in your face.
2022-11-03 16:41:44 +01:00
Aleix Pol
6bcedf3aad buttonrebinds: Allow sending tablet tool button events
Makes it possible to trigger button events from your tablet tool.
2022-11-03 16:41:44 +01:00