Commit graph

26462 commits

Author SHA1 Message Date
l10n daemon script
866afcb94b GIT_SILENT Sync po/docbooks with svn 2024-03-25 01:39:13 +00:00
Bart Ribbers
d71243aa07 Add missing include on sys/types.h to fix build on Musl libc
I guess sys/types.h is implicitely included on glibc but that's definitely
not the case on Musl libc. The include is however necessary to define
dev_t introduced in 3c82d5a919
2024-03-24 20:09:22 +01:00
Nate Graham
a2cccf0d75 Port to Kirigami version of ContextualHelpButton
It's been added there after starting life in kcmutils. Depends on
https://invent.kde.org/frameworks/kirigami/-/merge_requests/1488.
2024-03-24 15:56:00 +00:00
l10n daemon script
9b5ee76683 GIT_SILENT Sync po/docbooks with svn 2024-03-23 01:22:35 +00:00
Nicolas Fella
0fef229587 kcms/decoration: Fix crash when preview cannot be generated
m_bridge->createDecoration() can return nullptr. Most codepaths
already guard against that, but not all of them

BUG: 456531
2024-03-22 13:42:47 +01:00
Xaver Hugl
6a4a68dea4 backends: expose the DrmDevice instead of an allocator 2024-03-22 12:07:29 +01:00
Xaver Hugl
221c6aaf2b backends/virtual: use DrmDevice 2024-03-22 12:07:29 +01:00
Xaver Hugl
08439957d0 backends/x11/windowed: use DrmDevice 2024-03-22 12:07:29 +01:00
Xaver Hugl
fb19774730 backends/wayland: use DrmDevice 2024-03-22 12:07:29 +01:00
Xaver Hugl
d0b69f3503 backends/drm: use DrmDevice 2024-03-22 12:07:29 +01:00
Xaver Hugl
3c82d5a919 core: introduce DrmDevice 2024-03-22 12:07:29 +01:00
Vlad Zahorodnii
831ca28f93 plugins/screencast: Prefer allocating 3 buffers per stream by default
The current default 16 is way too many. For example, when screencasting
a 4K output, about 500MB will be wasted.
2024-03-22 08:30:47 +00:00
l10n daemon script
5777b3c257 GIT_SILENT Sync po/docbooks with svn 2024-03-22 01:21:31 +00:00
Vlad Zahorodnii
8bf1f9203b plugins/screenshot: Fix a crash in ScreenShotSource2::marshal()
There are behavior differences between QFutureInterface and QPromise.
The QFutureWatcher::finished() signal will be emitted in both cases
when the promise reports results or it is canceled.
2024-03-21 12:35:46 +00:00
Vlad Zahorodnii
489cd31ee9 Disable placeholder output when removing it
The current assumption is that Output::enabledChanged(false) always comes
before Output::destroyed.
2024-03-21 12:19:20 +02:00
David Edmundson
4f322e24d3 xwayland: Sync X11 keyboard tracking options between kcfg file and code
amends: a136a159f9
2024-03-21 08:16:15 +00:00
l10n daemon script
232984ebd5 GIT_SILENT Sync po/docbooks with svn 2024-03-21 01:24:14 +00:00
Yifan Zhu
111657ad04 x11window: round border size to integral XNative units
Both frameSize and clientSize are rounded to integral XNative units.
So their difference must also be rounded to integral XNative units.
Otherwise we get cycles of rounding that can cause growing window sizes.

BUG: 481460
2024-03-20 21:24:37 +00:00
Yifan Zhu
5c16cdd4ed globalshortcuts: send mouse events to kglobalacceld
This is needed so that kglobalacceld can correctly handle modifier-only
shortcuts.
2024-03-20 20:22:45 +00:00
Vlad Zahorodnii
012c64b054 Fix warning about nullptr sender in QObject::connect()
When one sets "no border" property, the decoration can be null.
2024-03-20 14:17:33 +00:00
Vlad Zahorodnii
236baa63df backends/drm: Handle failing to reopen drm node
Otherwise the drm backend will crash.
2024-03-20 14:07:33 +00:00
Vlad Zahorodnii
8934a31dad Add more guards for closed windows 2024-03-20 13:55:24 +00:00
Vlad Zahorodnii
442648edc0 wayland: Remove zombie ClientConnection from Display later
Otherwise it's theoretically possible to create a new ClientConnection
object for the zombie wl_client when its resources are being destroyed.
For example

- process early wl_client destroy notification
- the ClientConnection objects gets removed from the client list in Display
- process wl_resource objects getting destroyed
- if some code calls display->getConnection(zombie_client), it's going to
  reintroduce the client in the client list
- process late wl_client destroy notification, it's going to destroy the
  original and the clone ClientConnection object

This change prevents reintoducing a clone client object, by keeping the
original for a bit longer until it's actually destroyed. In the future though,
it would be great to kill the client lists in Display and ClientConnection,
and just use `static_cast<ClientConnection *>(wl_client_get_user_data())`.
2024-03-20 13:41:59 +00:00
Vlad Zahorodnii
44b72823c2 Don't trigger screen edge if the pointer is constrained
If the pointer is constrained, the screen edge may push the cursor back,
which will work not as expected. It's also undesired to trigger the screen
edge while the pointer is constrained by some surface, in general.
2024-03-20 13:46:00 +02:00
Vlad Zahorodnii
6412fd2c34 autotests: Add WM_TRANSIENT_FOR tests 2024-03-20 08:12:54 +00:00
l10n daemon script
b4b9a28b6f GIT_SILENT Sync po/docbooks with svn 2024-03-20 01:24:48 +00:00
Vlad Zahorodnii
a7e7923d6b plugins/screencast: Enqueue buffers immediately
There's still a crash in pw_stream_queue_buffer().
2024-03-19 20:32:46 +00:00
Xaver Hugl
630ba5fab4 pointer input: handle warp events differently from absolute motion events
As Wayland doesn't have a warp event yet, before this commit, warps were
dealt with like normal absolute motion events. This trips up games though,
which don't deal with actual absolute motion events well. As a solution
to that, until an actual warp event is a thing, we send a motion event with
a position + a relative motion event with no motion

BUG: 458233
CCBUG: 482476
2024-03-19 20:13:11 +01:00
Kristen McWilliam
246824aa61 autotests: add test for global keyboard shortcut
Adds an integration test that verifies the screen locks when the global keyboard shortcut is invoked.
2024-03-19 18:00:12 +00:00
Vlad Zahorodnii
60d36c0753 Move X11Window::findModal() to Window and remove boolean trap 2024-03-19 12:47:59 +00:00
Vlad Zahorodnii
fb6ce3707a autotests: Add _NET_WM_STATE_MODAL tests 2024-03-19 12:47:59 +00:00
Vlad Zahorodnii
3ebe34bc3f plugins/screencast: Improve code readability 2024-03-19 12:25:33 +00:00
Vlad Zahorodnii
75f94c7cd0 plugins/screencast: Guard against having no dmabuf data for particular buffer 2024-03-19 12:25:33 +00:00
Vlad Zahorodnii
afbb878fca plugins/screencast: Properly mark pw buffers as corrupted 2024-03-19 12:25:33 +00:00
Vlad Zahorodnii
01fa6c0af0 plugins/screencast: Clean up how pw_buffer is initialized
The offset and the stride of dmabuf can be set during the pw_buffer
initialization.
2024-03-19 12:25:33 +00:00
Vlad Zahorodnii
7bfb4a93e2 plugins/kpackage: Fix mainscript for declarative effects 2024-03-19 12:04:40 +02:00
Yifan Zhu
701f914081 window: fix interactiveMove exit condition
Previously the <= 1.0 test always succeeds in the first try, causing the
loop to exit prematurely.

BUG:  481610
2024-03-19 03:33:06 +00:00
l10n daemon script
c1a2355d71 GIT_SILENT Sync po/docbooks with svn 2024-03-19 01:24:42 +00:00
Vlad Zahorodnii
6b1e2f24f4 autotests: Add _NET_WM_MOVERESIZE tests 2024-03-18 20:54:10 +00:00
Vlad Zahorodnii
8892b16626 autotests: Add tests to check unmaximizing X11Window by dragging it 2024-03-18 18:23:33 +00:00
Vlad Zahorodnii
bf6727b384 Fix the titlebar visibility check for small windows
Consider a window with the size of 50x100 and the titlebar height of 36px.
The maximum number of visible titlebar pixels is 1800, but the
titleBarRect() function reports 3600 instead, which is completely wrong.

Since the reported number of required visible pixels is wrong, the window
geometry constraining logic is mistriggered and it's possible to move the
window only by 1px.
2024-03-18 17:27:07 +00:00
Yifan Zhu
b6d315705b pointer_input: make edgeBarrier behavior consistent on corners
The pointer should cross a corner as soon as the movement in the barrier
zone exceeds barrierWidth. Previously horizontal and vertical movements
were separately considered, which made corners harder to cross compared
to edges even when the separate corner barrier was disabled.

CCBUG: 483651
2024-03-18 16:19:05 +00:00
Vlad Zahorodnii
29135f188f plugins/screencast: Add missing Q_OBJECT 2024-03-18 14:58:13 +00:00
Vlad Zahorodnii
fb7dd07076 plugins/screencast: Avoid closing dmabuf fds twice
dmabuf fds are owned by the GraphicsBuffer, which will be destroyed when
`m_dmabufDataForPwBuffer.remove(buffer);` is executed.
2024-03-18 14:42:13 +00:00
Xaver Hugl
0897dbff75 clang-format: change the indentation of lambdas
Instead of indenting lambdas to the start of the lambda, always indent them to the
start of the line, which is more consistent and easier to read
2024-03-18 14:04:33 +00:00
David Edmundson
e13a30f00f effects: Do not take ownership of QuickEffect::delegate
QuickEffect::setDelegate is exposed QML API.

The lifespan of assigned objects is therefore managed by the QML engine,
and we should be watching for deletion not actually deleting it.
2024-03-18 12:55:51 +00:00
David Edmundson
b2a48d09e7 xwayland: Allow pushing to the clipboard without focus
X11 did not have a requirement that apps needed keyboard focus to update
a clipboard. Apps could copy things on click. With context menus and
grabs there can be no active window at this point.

Kwin tried to retrofit a requirement, which doesn't work in all cases.

Whilst there are security implications of reading a clipboard there are
no security issues about pushing a new clipboard. Gnome also allows X11
apps to push to the clipboard at any point.
2024-03-18 12:40:29 +00:00
Vlad Zahorodnii
22ef6d9ddf autotests: Stabilize X11WindowTest
Make a roundtrip to the x server to ensure that WM_STATE changes have
been propagated. xcb_flush() is not good enough, there's still a race
condition between the wm flushing its connection and the client reading
window properties.
2024-03-18 08:46:11 +00:00
l10n daemon script
0bc3fc18aa GIT_SILENT Sync po/docbooks with svn 2024-03-18 01:39:04 +00:00
Xaver Hugl
5fd96620ed backends: use explicit sync for reusing graphics buffers with EGL
Otherwise there can be glitches on NVidia, and this also makes some future
code changes around multi gpu copies and shadow buffers easier
2024-03-17 18:47:21 +01:00