Commit graph

26781 commits

Author SHA1 Message Date
Vyacheslav Mayorov
4e01d2c8b7 workspace: fix syncing the stacking order with Xorg
Deleted windows have frameId zero, which makes Xorg stack other windows
below the bottom-most window instead of the correct one. To avoid that,
filter out deleted windows in Workspace::propagateWindows.

BUG: 478556
2024-05-03 20:00:19 +03:00
Xaver Hugl
33fe211471 placementtracker: fix restoring of windows in custom tiles
There were two problems preventing it from working:
1. The placement tracker didn't handle them correctly; now it sets the custom tile mode
after moving the window to its location
2. The window code used `output()` instead of `moveResizeOutput()`, which means when KWin
just moved the window to a different screen and immediately changes the tile mode
afterwards, it would tile the window on the wrong output
2024-05-03 16:47:47 +02:00
Xaver Hugl
14c08422ca placementtracker: fix quick tiled windows not being restored correctly
There were two problems:
1. Workspace interacted with the tile mode of windows before inhibiting
the placement tracker, so the wrong window state was stored in the placement
tracker
2. Window::setQuickTileMode is unintuitive and has some undesired side effects,
meant to handle quick tiling with keyboard shortcuts and by dragging the
window with a mouse specifically. This commit just works around that by
un-setting the tile mode first

BUG: 461886
2024-05-03 15:58:17 +02:00
Xaver Hugl
df9f8f8346 fix vertically maximized windows sometimes being moved out of the screen
...and add a test for it

BUG: 476037
2024-05-03 13:45:18 +00:00
Xaver Hugl
fb28d75ad8 placementtracker: fix vertically maximized windows being misplaced
...and extend the autotest to cover that situation.

CCBUG: 476037
2024-05-03 13:45:18 +00:00
l10n daemon script
6a44cce527 GIT_SILENT Sync po/docbooks with svn 2024-05-03 01:26:34 +00:00
Xaver Hugl
219f110093 backends: move render time queries into OutputFrame
This way, multiple OutputFrames can be pending at the same time, without
interfering in each other's render time queries
2024-05-02 13:03:27 +00:00
Vlad Zahorodnii
4470e82baa xwayland: Prevent kwin crashing when an xwayland socket cannot be created
If the X11 socket directory has wrong permissions, XwaylandSocket will
refuse to create sockets. Crashing in that case is undesired, just continue
executing without X.
2024-05-02 12:55:47 +00:00
David Redondo
c8de1aa677 Revert "Disable freebsd ci"
This reverts commit 57a79608da.
2024-05-02 09:39:13 +00:00
l10n daemon script
11cd27c793 GIT_SILENT Sync po/docbooks with svn 2024-05-01 01:24:50 +00:00
Arsen Arsenović
5980945ee4
dpmsinputeventfilter: Don't wake screens up on warp events
As pointer warps are not user interactions, they should not wake screens
up.

BUG: 480026
2024-04-30 19:01:15 +02:00
Arsen Arsenović
38c4980b0d
backends/drm: Prevent "recently disconnected" screen wakeup more aggressively
It seems that, on some systems (such as on mine), 1s is not long enough
for a spurious disconnect and reconnect to happen.  2s seems enough,
however, while still likely not being long enough to cause user
confusion.

BUG: 480026
2024-04-30 19:01:11 +02:00
Vlad Zahorodnii
6acc652487 Rework how geometry updates blocking is handled in X11Window
Process the geometry update as usual but just avoid confuguring the x
windows. It simplifies the implementation of the move resize function
and makes it more refactorable.
2024-04-30 14:28:27 +00:00
Vlad Zahorodnii
801fecf821 Port some X11Window code away from GeometryUpdatesBlocker
GeometryUpdatesBlocker is unnecessary. One could just compute the
final geometry on a side and then issue one moveResize() rather than
call move(); resize(); moveResize() and so on in a sequence. The
advantage of the former approach over the latter is that the code
can be a bit more straightforward.
2024-04-30 14:20:59 +00:00
Vlad Zahorodnii
8f0425d91c Remove geometry updates blockers in X11Window teardown code
When a window is closed, its geometry should not change, so the geometry
updates blockers are not needed. There's also no code that could potentially
change the geometry in destroyWindow() or releaseWindow().
2024-04-30 14:06:49 +00:00
Xaver Hugl
93d810aaad backends/drm: unify primary and cursor plane layers
Drm planes aren't specialized enough to need completely separate code paths to
handle them, and having one class for all layers makes it easier to add support
for overlay planes
2024-04-30 13:43:36 +00:00
Xaver Hugl
a7e26a5770 backends/wayland: remove m_output member
It's in the base class now
2024-04-30 11:45:57 +00:00
Xaver Hugl
b976c274fd workspace: don't touch output configs on Xorg
It sets some output properties that don't match what Xorg knows about the outputs,
which may cause problems

CCBUG: 477268
2024-04-30 11:38:27 +00:00
l10n daemon script
aabadcee6d GIT_SILENT Sync po/docbooks with svn 2024-04-30 01:26:46 +00:00
Aleix Pol Gonzalez
04643fa3d8 Workspace: only calculate the clientArea for the wayland window when necessary
No need to calculate it just to discard it.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2024-04-29 21:41:49 +00:00
Aleix Pol Gonzalez
7916352f5b wayland: skip the outputs refresh if they didn't change
We have a bunch of logic in there that is effectively no-op if the
values don't change. We might as well skip it altogether and save some
code from being run to do nothing.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2024-04-29 21:41:49 +00:00
Vlad Zahorodnii
cdbe119789 Make GeometryUpdatesBlocker X11-specific
It's used only by X11Window so move it there.
2024-04-29 17:58:05 +03:00
Vlad Zahorodnii
b2193f370d Drop the remaining geometry updates blockers in Window
While these geometry updates blockers are used in functions that can
call moveResize() several times in a row, it's not critical.

On the other hand, by removing these blockers, no other core code is
going to rely on GeometryUpdatesBlocker, which opens us the future
opportunitinies to drop it and make geometry manipulation code simpler.
2024-04-29 14:40:16 +00:00
Xaver Hugl
e4e5c52300 autotests/integration: clean up remnants of "active output follows mouse" setting in screenstest 2024-04-29 14:13:32 +00:00
Xaver Hugl
55e5d50074 autotests/integration: fix xdg shell test
It made now-invalid assumptions about how the active output is decided
2024-04-29 14:13:32 +00:00
Xaver Hugl
354a71855e workspace: unify active screen modes
Instead of the active screen being purely defined by the mouse position,
or purely defined by the active window and keyboard shortcuts, this changes
it to make the active screen all about the last user interaction. This should
work for most workflows without needing a setting to choose between two flawed
approaches.

BUG: 482865
BUG: 484902
BUG: 484902
2024-04-29 14:13:32 +00:00
Xaver Hugl
336b2fd2f6 backends/x11/standalone: remove the code that runs on return to the event loop
It's unclear why it would be needed
2024-04-29 14:13:32 +00:00
Xaver Hugl
26b15feb61 backends/x11/standalone: remove on-demand mouse polling
Instead, rely on XInput if available, and fall back to polling every 50ms if not
2024-04-29 14:13:32 +00:00
Xaver Hugl
20d5f9bc6e backends/drm: work around amdgpu bugs with DCC modifiers
See https://gitlab.freedesktop.org/mesa/mesa/-/issues/10875 for details. The workaround
can be disabled again with the KWIN_DRM_NO_DCC_WORKAROUND=1 environment variable
2024-04-29 13:16:20 +00:00
Xaver Hugl
445567f54e backends: move more things from output layers to kwin core 2024-04-29 15:02:33 +02:00
Xaver Hugl
3232a63ac1 backends: put damage into OutputFrame, instead of passing it into the direct scanout function
This way, damage tracking for screen casting is a bit more decoupled from the output layers, and
can actually work for direct scanout
2024-04-29 15:00:12 +02:00
Xaver Hugl
06ba20cc2e compositor: move the composite method into X11 and Wayland implementations
There's a bunch of differences between them, like direct scanout, adaptive sync, content type
and the actually painted output in the Wayland session but not on Xorg, so keeping them in one
method doesn't really make sense
2024-04-29 14:56:20 +02:00
l10n daemon script
6b5571b023 GIT_SILENT Sync po/docbooks with svn 2024-04-29 01:27:07 +00:00
Vlad Zahorodnii
55cccf3779 plugins/screencast: Rename "_damagedRegion" parameter 2024-04-28 18:40:21 +03:00
Vlad Zahorodnii
ce9531d549 plugins/screencast: Throttle cursor updates 2024-04-28 18:40:21 +03:00
Vlad Zahorodnii
4e4186aa48 plugins/screencast: Negotiate a stream with new resolution right after enqueueing a buffer
This simplifies how the stream resolution is updated and removes a couple
more of failure points. This also appears to fix window screencasts freezing
in obs when those windows are resized.
2024-04-28 15:30:52 +00:00
Vlad Zahorodnii
a2185d0836 plugins/screencast: Remove SPA_ID_INVALID check
This should be unnecessary or pipewire is broken beyond repair.
2024-04-28 15:23:14 +00:00
Vlad Zahorodnii
5c93c4251b Fix scanout device information when running nested kwin
Without it, there are issues with running Xwayland.
2024-04-28 15:15:20 +00:00
Justin Gatzen
75ab5b8353 backends/drm: fix udev event KWIN_DRM_DEVICES check
The existing check incorrectly compares the directory path only. This
allows unintended GPUs to be added when events occur for them, such
as with "udevadm trigger".

Update the check to use the full path.
2024-04-28 00:49:09 -04:00
l10n daemon script
eb331a5df4 GIT_SILENT Sync po/docbooks with svn 2024-04-28 01:22:23 +00:00
Xaver Hugl
77cf49aa72 backends: refactor direct scanout and dmabuf feedback
This moves some of the responsbilities up in the stack, which simplifies
the backends and opens up some future possibilities like making direct scanout
work for non-surface items
2024-04-27 18:39:23 +00:00
l10n daemon script
f5120e570b GIT_SILENT Sync po/docbooks with svn 2024-04-27 01:21:46 +00:00
Xaver Hugl
4037f093db plugins/qpa: support recovering from GPU resets
When the context experienced a GPU reset, the context and all swapchains need
to be recreated or there will be glitches
2024-04-26 14:27:07 +00:00
Vlad Zahorodnii
e2611d710f plugins/screencast: Avoid resetting m_dmabufParams when resizing the stream
ScreenCastStream::onStreamAddBuffer() can be called before the stream
params are updated. This is problematic because that function expects a
valid m_dmabufParams.

The reason why m_dmabufParams is reset is to force the onStreamParamChanged()
function to check whether dmabufs can be still allocated with the new size.
2024-04-26 13:31:17 +00:00
Vlad Zahorodnii
31f80d18f2 wayland: Use xdg-dialog-v1 basename 2024-04-26 11:31:34 +00:00
David Redondo
2e92fca017 plugins/zoom: Center cursor on active screen on shortcut
BUG:435108
2024-04-26 10:41:49 +00:00
Vlad Zahorodnii
69b8c91655 Drop more (unnecessary) geometry updates blockers 2024-04-26 08:01:21 +00:00
Jakob Petsovits
351f613ef4 kcms/desktop: Expand button label from "Add" to "Add Desktop"
Also pull "Rows" out of the SpinBox into a dedicated label.

Both to address concerns "Add" about being misinterpreted as
"Add Row", given that the button to add a new virtual desktop
now sits right next to the row count spinner.
2024-04-26 00:00:11 -04:00
l10n daemon script
e804b45d86 GIT_SILENT Sync po/docbooks with svn 2024-04-26 01:21:46 +00:00
Xaver Hugl
4dffc09aaa input: fix warning about nodiscard
std::any_of is used here in a way it was never meant to be used...
Instead just write out the loop
2024-04-25 19:24:19 +02:00