Commit graph

26204 commits

Author SHA1 Message Date
l10n daemon script
602095ec52 GIT_SILENT Sync po/docbooks with svn 2024-02-22 01:22:16 +00:00
l10n daemon script
b7bdd4f3ff 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-22 01:15:21 +00:00
Xaver Hugl
8c3332f619 opengl/eglcontext: tell Qt when the OpenGL context gets changed
Otherwise, Qt thinks the old context is still current and will do things like
destroying VAOs with KWin's context, which ends up destroying the VAO of the
context and breaks rendering.

BUG: 479094
2024-02-21 20:58:09 +01:00
Xaver Hugl
564bfafb57 backends/drm: delay cursor updates with VRR by default for non-AMD GPUs 2024-02-21 16:28:50 +01:00
Xaver Hugl
039fd39e34 backends/drm: delay cursor updates with adaptive sync
While the primary plane delivers a high enough refresh rate for the cursor to be
at least usable, delay cursor updates to be in sync with the primary plane. This
avoids stutter of the content being shown on the primary plane.

Because amdgpu doesn't handle this correctly at the moment, this feature is guarded
behind the KWIN_DRM_DELAY_VRR_CURSOR_UPDATES environment variable.
See https://gitlab.freedesktop.org/drm/amd/-/issues/2186 for more details on that.
2024-02-21 14:35:12 +00:00
Xaver Hugl
080d28b3f9 backends/drm: move committing logic into a separate method
This makes the code a bit more readable
2024-02-21 14:35:12 +00:00
Jonathan Esk-Riddell
5306823435 Update Frameworks version requirement to 6.0.0
GIT_SILENT
2024-02-21 14:33:28 +00:00
Vlad Zahorodnii
c5c25a66f7 Remove legacy virtual desktop id from "Move to" action 2024-02-21 14:30:40 +02:00
Vlad Zahorodnii
2c445ebf3c Remove all legacy virtual desktop ids
Amends 0bd65de375.
2024-02-21 14:28:15 +02:00
Aleix Pol Gonzalez
ade5d72c3a qpa: Don't build SPI support if Qt wasn't build with it
Signed-off-by: Falko Becker <falko.becker@mbition.io>
2024-02-21 12:25:09 +00:00
Jin Liu
c2c19fe91f plugins/contrast: fix: effect not clipped to region
Introduced in:
7732f0e56b
2024-02-21 19:00:47 +08:00
Xaver Hugl
0bd65de375 useractions: remove legacy virtual desktop number from the menu
In almost all cases it's duplicated in the name, and if the user manually
changes the name, the custom name should be shown without additional numbers

CCBUG: 481576
2024-02-21 09:07:19 +00:00
Vlad Zahorodnii
f77f5b2342 plugins/overview: Make screen edge toggle overview rather than cycle between modes
The user may have no usecase for the grid view mode, i.e. they may want
to activate overview, do their thing, and then return back to normal
desktop. However, with the current behavior, there's one extra step
(switch to grid mode) in order to go back to desktop.

In hindsight, we should have added different screen edge actions for
overview and grid modes. This can be done in 6.1.

BUG: 481335
2024-02-21 08:44:10 +00:00
l10n daemon script
be3823e826 GIT_SILENT Sync po/docbooks with svn 2024-02-21 01:21:51 +00:00
l10n daemon script
af7fa6a040 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-21 01:14:15 +00:00
Vlad Zahorodnii
bb8b51a3ab Fix disappearing software cursor in overview and zoom effect
The overview and the zoom effect repaint the whole screen every frame.
But the problem is that there are cases when there's nothing to repaint.
I'm not quite sure why it happens. Maybe overview and other effects
should honor the repaint region, but on the other hand, they don't need
to because of the fullscreen effect api promises.

This change forces overview and zoom effect to use "generic paint" code
path in the workspace scene to force infiniteRegion() repaint regions.

BUG: 481523
2024-02-21 01:01:59 +02:00
Vlad Zahorodnii
b2450cfe14 plugins/wobblywindows: Ignore PAINT_SCREEN_TRANSFORMED
Screen transform apis have been dropped, so the wobbly windows should be
safe to ignore screen transformations.
2024-02-21 01:01:59 +02:00
Michael VanOverbeek
86f0d9914e Fix zoom push mouse tracking on multi-monitor workspaces
Zoom push tracking now considers the layout of the user's monitors, accounting for situations where the monitor layout doesn't form a perfect rectangle. These changes help prevent the zoom area from being unable to reach certain areas of the workspace depending on which edge of which screen the user pushes against.

One known issue is that, if the mouse moves too quickly, the zoom area can sometimes imperfectly track the movement. It will look the same as the original bug (areas of the screen will appear to be cut off/unreachable), but moving the mouse in the opposite direction a tiny bit snaps the zoom area back to where it should be. 

BUG: 467182

@teams/qa Heads-up that I'm very blind, and this is the first time I've ever contributed to a KDE project. I've tested the changes on my system and they fix the bug, but I want to make sure I didn't break anything in the process.
2024-02-20 20:23:35 +00:00
Jakob Petsovits
9e3e567592 backends/drm: Undo fade-out effect upon unsuccessful DPMS Off
DrmOutput::setDrmDpmsMode() already takes care of reverting any
pending output pipeline changes, but the aboutToTurnOff signal from
setDpmsMode() needs an explicit wakeUp signal to cancel it out.

BUG: 477916
CCBUG: 481520
2024-02-20 14:29:32 -05:00
Aleix Pol Gonzalez
79dd34b3f9 Do not rely on NETWM for the main Window class
NETWM forces a weird X11 dependency on KWin that doesn't necessarily
match what we want to do. Instead we decouple such a central class in
KWin like it's Window from KWindowSystem X11 support.

Signed-off-by: Falko Becker <falko.becker@mbition.io>
2024-02-20 18:04:06 +00:00
Nicolas Fella
afa450b97a Set componentDisplayName for shortcut migration
Otherwise the binary name is used as display name, causing all kwin
shortcuts to be registered under kwin-6.0-delete-desktop-switching-shortcuts
2024-02-20 11:22:11 +00:00
l10n daemon script
4045b3b389 GIT_SILENT Sync po/docbooks with svn 2024-02-20 01:23:39 +00:00
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