Commit graph

26182 commits

Author SHA1 Message Date
l10n daemon script
6dc908908c 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"
2024-02-20 01:15:26 +00:00
Xaver Hugl
8fa782f1a8 autotests/integration/outputchanges: add geometry restore test 2024-02-19 17:18:28 +01:00
Xaver Hugl
2c280b1bb0 placementtracker: save geometry restores more explicitly
Geometry restores were only saved when maximize or fullscreen changed, which is
not the only time the geometry restores change. This adds a signal to Window for
that, which fixes a few bugs with windows being moved between screens while
maximized or fullscreened
2024-02-19 17:18:28 +01:00
Xaver Hugl
86db3b4336 placementtracker: don't set geometry to geometry restores
It can cause problems when the geometry restore value is invalid

BUG: 473602
2024-02-19 17:18:28 +01:00
David Edmundson
3ede995b27 overview: Only handled input events in on-screen desktops
kwin does not support true multiscreen drag and drops. Events are sent
to an offscreen location of the screen initiating the drag. Therefore it
is important that off-screen items do not process drop events

BUG: 481331
2024-02-19 15:28:25 +00:00
Vlad Zahorodnii
64e701fdaf Synchronize input transformation regardless of interactive move resize status
This check is old and I'm not sure why it even exists. It should not be
needed in general.

The problem with this check is that when interactive move/resize
operation finishes, the seat input transformation is not synchronized.
2024-02-19 15:21:19 +00:00
Yifan Zhu
c3cda8b62a effects/overview: implement new layout algorithm
Replace old "closest" and "natural" layout algorithms with new layout
algorithm. The new layout algorithm tries to
- use screen space efficiently, given diverse geometries of windows
- be aesthetically pleasing
- and minimize movement of windows from initial positions.

More concretely, find a layered layout, where each layer, or strip, is a
row or column. Ensure that different strips have similar widths, and use
binary search to find a packing with similar aspect ratio to the layout
area. Within each strip, minimize horizontal movement (for rows) or
vertical movement (for columns) of windows.

Run time is O(n) (up to log factors), where n is the number of windows.

CCBUG: 453749
BUG: 450263
BUG: 477833
BUG: 478097
BUG: 477830
2024-02-19 11:46:28 +00:00
Niccolò Venerandi
7732f0e56b Ensure that translations never change the size of a contrast effect / blur regions
BUG:480434
2024-02-19 11:11:01 +00:00
l10n daemon script
f349d8e132 GIT_SILENT Sync po/docbooks with svn 2024-02-19 01:24:42 +00:00
l10n daemon script
dfa1cbda4f 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"
2024-02-19 01:14:19 +00:00
l10n daemon script
86540cd344 GIT_SILENT Sync po/docbooks with svn 2024-02-18 01:23:34 +00:00
l10n daemon script
b3b2bcb369 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"
2024-02-18 01:15:04 +00:00
l10n daemon script
a1ae401240 GIT_SILENT Sync po/docbooks with svn 2024-02-17 01:22:53 +00:00
Xaver Hugl
742268bfa1 backends/drm: don't advertise support for wide color gamut on Intel
i915 doesn't implement the Colorspace property correctly, so exposing this
feature makes it look like our HDR implementation is broken. This hides the
HDR checkbox in system settings until Intel fixes their driver

For testing purposes, users can still opt into this with the environment
variable KWIN_DRM_ALLOW_INTEL_COLORSPACE.
2024-02-16 11:41:13 +00:00
Xaver Hugl
9ea6f311ea backends/drm: force a modeset when connectors are unplugged
And turn off unused CRTCs with legacy

BUG: 478476
2024-02-16 11:20:02 +00:00
Xaver Hugl
d69331d186 backends/drm: fix HDR with legacy modesetting
The properties were entirely ignored before
2024-02-16 11:09:56 +00:00
Vlad Zahorodnii
fc92544cb3 plugins/overview: Allow switching between modes using shortcuts while already active
Overview and Grid modes have shortcuts assigned to them. While they
provide a way to toggle the overview effect between on and off state, in
other words overview <-> off or grid <-> off, it's not possible to move
between the modes by pressing those shortcuts, e.g. off -> overview ->
grid -> overview -> grid -> ... -> off.

The culprit seems to be that EffectTogglableState has two "inactive"
states - Inactive and Stopped. It's counter-intuitive and needs a further
cleanup.

To make switching between overview modes work, this change makes
EffectTogglableState::toggle() toggle the state based on the Active state.
There's only one active state.

CCBUG: 481335
2024-02-16 08:59:06 +00:00
Ismael Asensio
0991cded05 kcms/rules: Fix section header and info button sizing
The section header being now a QQC2.ItemDelegate needs to explicitly
set the width to be visible.

The ContextualHelpButton size was getting constrained by the parent
layout's being adjusted to just the label height.
2024-02-16 08:36:16 +00:00
l10n daemon script
f364f3a923 GIT_SILENT Sync po/docbooks with svn 2024-02-16 01:23:20 +00:00
l10n daemon script
ac9d470ab8 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"
2024-02-16 01:15:32 +00:00
Vlad Zahorodnii
7297e62283 plugins/screencast: Make grabTexture() more nicer to memfd code path
OutputTransform::Normal is handled by doGrabTexture().

If the texture transform is neither normal nor flip-y, the GPU is going
to be used to transform the texture, however since it doesn't flip the y
axis, doGrabTexture() will flip the y axis on the cpu side. To fix that,
make the contents of backingTexture mirrored vertically.
2024-02-15 14:25:01 +00:00
Vlad Zahorodnii
af12a103ae plugins/screencast: Make region screen cast nicer to memfd
Set the FlipY flag so when the memfd code grabs the texture contents, it
doesn't need to flip the texture on the cpu side.
2024-02-15 13:54:56 +00:00
Vlad Zahorodnii
3388b7643c plugins/screencast: Fix window screencasts being vertically mirrored with memfd
WindowScreenCastSource::render(GLFramebuffer) renders windows with the y
axis flipped, but the offscreen has no FlipY flag set.

BUG: 478223
2024-02-15 13:54:56 +00:00
Xaver Hugl
3a8ae60f87 wayland/textinput_v2: copy the data instead of assuming ownership
The life time of the wl_array is limited to the callback, afterwards it's
a dangling pointer

BUG: 481239
2024-02-15 12:07:04 +00:00
Vlad Zahorodnii
5d787a4083 opengl: Invalidate cached vbo when content transform is different
When output rotation changes, the texture size stays the same, but the
texture coordinates are no longer valid and have to be recomputed.
2024-02-15 11:18:58 +00:00
David Edmundson
c6a3d76b92 decorations: Avoid opaque areas of decorations being larger than the rendered contents
Opaque is a QRegion in logical pixels, using .toRect will round to the
nearest integer in either direction. This can mean an area is considered
opaque outside the rendered area, leading to glitchy contents on
shadows.

This is most noticable on on X11 windows when fractional scaling is
used.

Long term I hope to move Item::opaque to QList<QRectF> and
WindowPrePaintData::opaque to device pixels.
2024-02-15 11:10:19 +00:00
David Edmundson
b36894884e wayland: Dispatch mouse events to internal windows via QWindowSystemInterface
QWindowSystemInterface goes via QGuiApplication which updates some
internal properties. Most notably QGuiApplication::lastCursorPosition
which is used by advanced menu closing behaviour.

BUG: 478061
2024-02-15 10:44:00 +00:00
Marco Martin
5244f9f406 Only show otherScreenThumbnail if we are actually dragging
otherScreenThumbnail is used to fake a window thumbnail being dragged
half in the old screen, half in the "new" one (or even more than two)

right now the condition to use it is purely the "real" thumbnail x
or y change, but sometimes especially when the item has just been created
and is being laid out it might trigger an itemDraggedOutOfScreen
when no-one was dragging.

We should never make otherScreenThumbnail visible when we aren't dragging
a thumbnail, so check for Drag being active in the source item.

the item will be kept visible even if drag becomes inactive as before,
as it still needs to be visible for the reset animation

BUG:480564
2024-02-15 09:58:35 +00:00
l10n daemon script
1b14b7b2f1 GIT_SILENT Sync po/docbooks with svn 2024-02-15 01:19:45 +00:00
l10n daemon script
46ca22f480 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"
2024-02-15 01:13:26 +00:00
Xaver Hugl
b7e5d3f232 wayland: slightly simplify idle inhibit implementation 2024-02-14 20:59:32 +01:00
Fushan Wen
f303ba4b59
plugins/colorblindnesscorrection: set translation domain in config ui
By default the translation domain of KQuickManagedConfigModule is the
unique identifier within the namespace of the plugin, but those i18n
strings belong to kwin.po.
2024-02-15 00:17:33 +08:00
Fushan Wen
f650ebe2fc
plugins/colorblindnesscorrection: support adjusting intensity
Though there are 3 common CVD types, each individual can have different
color perception level, and the default intensity might not be suitable
for everyone, so add an intensity slider to select how much the filter
affects the display.
2024-02-14 23:47:18 +08:00
Xaver Hugl
1f1c54ca6c window: use normal keyboard modifiers for triggering custom tiling
Modifiers for global shortcuts are handled differently from normal shortcuts,
because they need to consider modifiers that are consumed by xkb for keyboard
layout transitions and similar. This restriction is not relevant for custom
tiling.

BUG: 465858
2024-02-14 14:25:03 +00:00
Xaver Hugl
a917d1885e input_event: remove modifiersRelevantForTabBox
It was only needed because the normal modifiers path considered caps lock
as shift lock
2024-02-14 14:25:03 +00:00
Xaver Hugl
8c543dbe7c xkb: caps lock is not shift lock
Caps lock only locks capitalization of letters, making it artificially also
trigger shift in the context of KWin only causes problems
2024-02-14 14:25:03 +00:00
Aleix Pol Gonzalez
c5305820d4 Reduce needed dependencies
For many components KConfigWidgets isn't necessary, just KColorScheme.

Signed-off-by: Falko Becker <falko.becker@mbition.io>
2024-02-14 14:45:24 +01:00
David Edmundson
5386360928 wayland: Send wl_pointer leave before data_device enter
SeatInterface currently has a separation of kwin's focus scope to
pointer input with early return guards in notifyPointerEnter and
notifyPointerLeave where clients don't get pointer events.

However we don't update the initial state when a drag is started, this
patch notifies sends a pointer leave to the new drag target before the
data_device enter so things are consistent.

This also brings it in line with Weston and Mutter.

notifyPointerLeave has it's early return removed as for wayland windows
as we know nothing will have pointer focus.
2024-02-14 12:39:32 +00:00
Vlad Zahorodnii
8a9cb06b41 Adapt to NETRootInfo::moveResize() changes 2024-02-14 10:43:00 +00:00
David Edmundson
eab90b6a0a overview: Explicitly reset parent on teradown
Instantiators create objects when they're added to a model, and
deference when when they're removed from the model.

When we explicitly set a parent in onObjectAdded we're creating a second
reference. This does get cleaned up later, but not in the same frame.

This brings us in line to what QQmlRepeater (which works with items)
does internally for items being added and removed.

BUG: 478777
2024-02-14 09:19:28 +00:00
l10n daemon script
b480297913 GIT_SILENT Sync po/docbooks with svn 2024-02-14 01:23:06 +00:00
l10n daemon script
1230c5ef92 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"
2024-02-14 01:14:48 +00:00
Xaver Hugl
c6be2b51a9 backends/wayland: support direct scanout
This allows for (mostly) overhead-less pass-through of fullscreen content
to the host compositor
2024-02-13 15:45:26 +00:00
Yifan Zhu
2f4db693e3 screenedge: don't reduce approachGeometry
Reducing approachGeometry is not needed.

During edge creation, createHorizontalEdge and createVerticalEdge
already substract the needed cornerOffset, and edges reserved by client
windows shouldn't be reduced in geometry.
In addition, during display, ScreenEdgeEffect confines the painted area
to approachGeometry. So approachGeometry shouldn't be reduced in
advance.

BUG: 481282
2024-02-13 15:30:22 +00:00
Vlad Zahorodnii
55ef69645c Fix a warning about null sender in QObject::connect()
The original assumption was that once PointerInputRedirection starts
pushing cursor sources to cursors, they cannot be null. In many cases,
it is true, but the tests are a bit special as many of them lack
wl_pointer.set_cursor requests, so it's possible to set a null source.
As an example, when the pointer moves from the decoration to the
surface. On the other hand, it also does make sense to allow having
no source connected.
2024-02-13 13:36:52 +02:00
Ismael Asensio
f6447ad188 tabbox/thumbnail-grid: Activate on thumbnail click when selected
While tabbox switching is usually a keyboard operation, we offer also
a mouse-friendly way to launch it via screen edges, and should allow
to switch directly on mouse click.

BUG: 481267
FIXED-IN: 6.0
2024-02-13 09:10:21 +00:00
l10n daemon script
62b55d0463 GIT_SILENT Sync po/docbooks with svn 2024-02-13 01:24:18 +00:00
l10n daemon script
77f3046ae0 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"
2024-02-13 01:14:57 +00:00
Xaver Hugl
8f27ee0cb8 input: remove hasAlphaNumericKeyboard method
It's completely unreliable
2024-02-12 18:19:23 +01:00
Vlad Zahorodnii
9abf7a9d61 plugins/blur: Fix blurred region sticking outside panel popups
The blur geometry is scaled in the global coordinate space, while it
works fine with integer scale factors, it's not okay with fractional
scale factors as it doesn't match how the ItemRenderer snaps quads to
the pixel grid.

Note that blur behind apps can be still off by one pixel, but it
should be harder to notice it. In order to fix it, it would be great
to apply effects behind Items, which is on my todo list.
2024-02-12 14:22:55 +00:00