Commit graph

26181 commits

Author SHA1 Message Date
Vlad Zahorodnii
857766eb74 scene: Fix DecorationItem reacting to new geometry
Window::layoutDecorationRects() uses KDecoration2::Decoration::rect() to
get the bounding decoration rect.

While Decoration::rect() should normally match Window::rect(), they can
diverge for a brief moment during async geometry updates. The worst
possible case is that the cached item quads may not be invalidated when
the geometry updates saddle.

To fix that, make DecorationItem monitor decorated client size changes
instead of window frame geometry changes. The reason for that is that
Decoration::size() is effectively decorated client size with added border
margins.
2024-02-12 13:16:58 +00:00
Pedro Nishiyama
a0d437163d Add Adaptive Sync window rule 2024-02-12 12:05:52 +00:00
Vlad Zahorodnii
b02190bf23 plugins/overview: Fix a warning about incorrect anchor
The mouse area is no longer a sibling of the window heap, which produces
a warning.

BUG: 481106
2024-02-12 11:09:19 +00:00
l10n daemon script
956451111c GIT_SILENT Sync po/docbooks with svn 2024-02-12 01:20:51 +00:00
l10n daemon script
4585cec7a1 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-12 01:13:13 +00:00
Jin Liu
daec969720 effects/outputlocator: add name and description metadata
Otherwise it's shown as a confusing empty item when "show
builtin" is on.
2024-02-11 01:28:20 +00:00
l10n daemon script
349f9c1fb6 GIT_SILENT Sync po/docbooks with svn 2024-02-11 01:23:44 +00:00
l10n daemon script
9187fe80f4 GIT_SILENT Sync po/docbooks with svn 2024-02-10 01:32:30 +00:00
l10n daemon script
ea8dd5f32c 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-10 01:17:39 +00:00
Vlad Zahorodnii
4e8f1bdfda Bring back decoration spacer buttons
They were lost during KDecoration 1 -> KDecoration 2 transition.

CCBUG: 348393
CCBUG: 438719
2024-02-09 18:20:33 +00:00
Vlad Zahorodnii
13e7cac019 Handle wl_surface destruction in SurfaceCursorSource
Wine/Wayland hides the cursor as follows:

[ 853107.473]  -> wl_pointer@15.set_cursor(172832, wl_surface@38, 0, 0)
...
[ 858989.757]  -> wl_surface@38.destroy()
[ 858989.759]  -> wl_pointer@15.set_cursor(172832, nil, 0, 0)

i.e. it destroys the cursor surface, then calls wl_pointer.set_cursor().

SurfaceCursorSource stores the wl_surface in a QPointer, furthermore it
is going to emit the changed signal, which is needed to force the
CursorItem to update its content, only if either a new hotspot or a
surface has been passed to SurfaceCursorSource::update(). So what happens
is the following:

- The SurfaceInterface object is destroyed and the QPointer resets its
  value to nullptr
- SurfaceCursorSource::update(nullptr, QPointF(0, 0)) gets called in
  response to wl_pointer@15.set_cursor(nil, 0, 0)
- but since m_surface has been implicitly reset to nullptr, no changed
  signal is going to be emitted

This change addresses the issue by making the SurfaceCursorSource track
the SurfaceInterface's destroyed signal.

BUG: 480582
2024-02-09 13:53:04 +02:00
David Edmundson
95d4671a10 quickeffect: Avoid double delete of QQuickViews
Views are owned by the C++ backend, but also retrievable by invokables
to get neighbouring screens from JS space. By default Qt then transfers
ownership of the view to the QML collector. This results in double
ownership.

BUG: 480788
2024-02-09 09:12:17 +00:00
l10n daemon script
914aeb32ec GIT_SILENT Sync po/docbooks with svn 2024-02-09 01:25:27 +00:00
Ismael Asensio
7c8b5be55a kcms/rules: Fix import/export FileDialog type
They were just missing the alias qualifier.

Add also explicit parameters to the signal handlers.

BUG: 481082
FIXED-IN: 6.0
2024-02-08 22:24:44 +01:00
Xaver Hugl
31ebdb73a0 scene/surfaceitem: change refresh rate estimation to frame time estimation
This is both more direct and avoids divisions by durations that can potentially
be zero

BUG: 480971
2024-02-08 19:36:15 +01:00
Vlad Zahorodnii
06db626fc4 Reorder code in VirtualDesktopManager::setPlasmaVirtualDesktopManagement()
The code that initializes the initial state is buried between connect()s,
but there is no reason to do it and it is less organized.
2024-02-08 14:56:15 +00:00
Vlad Zahorodnii
764f0102fd Drop save() in VirtualDesktopManager::setVirtualDesktopManagement()
Changing the virtual desktop configuration when creating the plasma
virtual desktop global is wrong and it doesn't look like it happens.
2024-02-08 14:56:15 +00:00
Vlad Zahorodnii
d78dcc6140 Fix initialization of virtual desktop row count in plasma virtual desktop global 2024-02-08 14:56:15 +00:00
Vlad Zahorodnii
e974c07001 wayland: Schedule a configure event when borders change
Window::checkWorkspacePosition() before the window is mapped is still
problematic and should be avoided as it can produce undesired constrained
client size (1x1).

Given that XdgToplevelWindow tries to maintain the same frame geometry
size, it should be enough to schedule another configure event instead.
It is going to be in line with the other decoration logic in the
XdgToplevelWindow and it's a better way to handle async geometry updates.

BUG: 480910
2024-02-08 14:46:23 +00:00
Vlad Zahorodnii
5ad63f21e0 plugins/nightcolor: Rename d-bus interface 2024-02-08 14:24:51 +00:00
Xaver Hugl
a5726e19fd wayland: update xx-color-management to v2 2024-02-08 14:01:43 +00:00
Vlad Zahorodnii
cd43199e70 plugins/overview: Revoke Meta+Tab and Meta+Shift+Tab shortcuts
These shortcuts make more sense to be used with Meta+Tab and Meta+Shift+Tab.
Let's keep them reserved for the task switcher. Cycling between overview
modes is not something that requires Meta+Tab to be assigned to it by default.
2024-02-08 13:48:42 +00:00
Vlad Zahorodnii
540dff30e7 kconf_update: Drop kwin-6.0-overview-activities-shortcuts script
There are a few issues:

- it's incompatible with Version 6 format
- activity shortcuts cannot be changed in kwin
- overview shortcuts don't need to be touched

BUG: 480758
2024-02-08 13:48:42 +00:00
David Redondo
6b4018014c Guard against render time query failing
glGetQuery can fail (for example because of a context loss) in this
case the buffer stays unmodified. In this case this is zero resulting
in GLRenderTimeQuery::result() returning a negative value. Down the
line this leads to a negative duration in the RenderJournal and
RenderLoopPrivate::scheduleRepaint starting a timer with an amount
of milliseconds bigger than what an int can hold. This will not
actually start a timer but QTimer::isActive returns true resulting
in no futher repaints being scheduled.
BUG: 475605
FIXED-IN: 6.0
2024-02-08 13:29:05 +00:00
Marco Martin
51fb56773b Don't scale WindowHeap in overview mode
when in overview mode, don't scale down WindowHeap, as this
will cause ugly glitches, but resize it down instead.
Still use transforms when it goes in desktop grid mode, at least for now

probably future further refactor can still help things

Before:

![image](/uploads/7ca83e7e9292bd8489faaf76d4c12693/image.png)

After:

![image](/uploads/27b970d056c89486661d6695d09813ff/image.png)

CCBUG:475682
2024-02-08 13:01:27 +00:00
l10n daemon script
7c4bde3a32 GIT_SILENT Sync po/docbooks with svn 2024-02-08 01:22:46 +00:00
l10n daemon script
6cd615e4df 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-08 01:14:14 +00:00
Xaver Hugl
83fe158a16 backends/drm: fix night light updates after dpms
BUG: 480911
FIXED-IN: 6.0
2024-02-07 20:49:58 +01:00
Vlad Zahorodnii
4b7874391d kcms/tabbox: Update layout name in response to user input
The current index can change when populating the combobox.
2024-02-07 15:40:44 +00:00
Xaver Hugl
d3a2e07002 backends/drm: fix multi gpu transfers with mixed modifiers and implicit modifiers usage
BUG: 478921
2024-02-07 14:35:50 +00:00
Xaver Hugl
1583b2c717 backends/drm: fix EglGbmLayerSurface::doesSurfaceFit with multi gpu
CCBUG: 478921
2024-02-07 14:35:50 +00:00
Vlad Zahorodnii
6d0f1fedc0 plugins/backgroundcontrast: Correct texture transform
The y axis should be mirrored as the last step, otherwise it's going to
change the winding order in rotation transforms in the render target
transform.

BUG: 479934
2024-02-07 13:53:20 +00:00
Vlad Zahorodnii
f75fb70ddc Move alternative cursor shape resolver from Cursor to CursorShape
This code is more related to CursorShape than Cursor, so move it there.
2024-02-07 08:46:20 +00:00
Vlad Zahorodnii
b1908949d0 autotests: Use ShapeCursorSource to load reference cursor images in testPointerInput 2024-02-07 08:46:20 +00:00
Vlad Zahorodnii
a472c90327 Prefer up-arrow cursor shape
That's what breeze only has.
2024-02-07 08:35:52 +00:00
Vlad Zahorodnii
c9c84b6859 Prefer cursor shape names from the CSS W3C specification
There is a mix of cursor shape names from the CSS W3C specification and
non-spec ones, which is confusing when deciding what cursor shapes need
aliases in Cursor::cursorAlternativeNames().
2024-02-07 08:35:52 +00:00
Columbariu S
7c2cf9c953 plugins/screencast: Announce size and stride only for SHM buffers
DmaBufs don't have a welldefined size or stride. Clients and PipeWire
shouldn't rely on those values. Therefore we better omit them.
2024-02-07 08:27:53 +00:00
Columbariu S
cb398ce6fe plugins/screencast: Reset dmabufParams if SHM buffers are negotiated
m_dmabufParams is initialised after a format with modifiers is
suggested. Should the negotiation process fallback to SHM buffers, we
should reset it, so it can be used to determine if the negotiated format
is of type DmaBuf or not.
2024-02-07 08:27:53 +00:00
l10n daemon script
b432c22e76 GIT_SILENT Sync po/docbooks with svn 2024-02-07 01:18:29 +00:00
Vlad Zahorodnii
b560ad56b6 tabbox: Add a placeholder message in the thumbnails grid switcher
It improves the visuals of the switcher when there are no entries to display.
2024-02-06 21:50:14 +02:00
Vlad Zahorodnii
3714dcc337 tabbox: Prevent including "show desktop" entry if there are no other windows
BUG: 419408
2024-02-06 16:28:29 +00:00
Vlad Zahorodnii
8086707d1c Revert "tabbox: Show window switcher only when there are two or more windows"
This reverts commit b31baaf0cd.

It's still a good idea to show the task switcher even if there's only
one window in order to provide the user feedback about their action.
Since the task switcher is not shown when there's only one window, it
can be confusing and lead to thinking that the task switcher is broken.
It also fixes a regression which prevents alt-tabbing to the only
remaining minimized window.

BUG: 480940
CCBUG: 419408
2024-02-06 15:59:14 +00:00
Vlad Zahorodnii
2556378dfa Fix X11Window wrapper window geometry
This amends 66a491bda6.

There are a few more cases that had been overlooked in the original patch.
2024-02-06 12:13:54 +00:00
l10n daemon script
9c0947ae15 GIT_SILENT Sync po/docbooks with svn 2024-02-06 01:37:43 +00:00
Xaver Hugl
3d21e41bc9 backends/drm: add workaround for an amdgpu adaptive sync cursor bug
See https://gitlab.freedesktop.org/drm/amd/-/issues/3034 for details
2024-02-05 23:00:46 +00:00
Xaver Hugl
14749e91e9 backends/drm: try to handle page flips timing out
While this should really never happen in the first place, if the kernel still accepts
atomic commits, this is better than the screen(s) freezing and never recovering.

BUG: 480895
2024-02-05 23:51:14 +01:00
Xaver Hugl
1c8bd1be62 backends/drm: use explicit sync where possible
Instead of calling glFinish, which blocks until it's done and has high CPU
usage on NVidia, use EGL_ANDROID_native_fence_fd to get an explicit sync
fd, which the commit thread automatically waits on before committing the
buffer to KMS.

CCBUG: 452219
2024-02-05 22:46:04 +01:00
Alexander Wilms
3118ba5982 Task Switcher KCM: Change Include "Show Desktop" icon to Include "Show Desktop" entry
Not all task switchers use icons, so "entry" is more fitting.
2024-02-05 21:01:34 +02:00
Vlad Zahorodnii
e7d6e8b217 kcms/options: Hide "active mouse screen" option
In the late Plasma 5 times we agreed that it would be better to drop
"active mouse screen" option and stick with last interacted screen
approach instead. However, it was forgotten and nobody has pursued this
goal, so let's hide the option in the system settings ui at least.

The option is not completely removed because some parts of kwin would
need adjustments.
2024-02-05 20:23:50 +02:00
Vlad Zahorodnii
8f7f97148c plugins/desktopchangeosd: Fix previous desktop indicator
BUG: 480630
2024-02-05 17:17:20 +00:00