Commit graph

26204 commits

Author SHA1 Message Date
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
Vlad Zahorodnii
63c1363ca1 Fix syncing Xwayland::Scale config option
The new scale value is written but it's not flushed to the disk so
when kcm_fonts_init and kcm_style_init run, they use the old scale
value.

CCBUG: 480792
2024-02-05 16:51:34 +00:00
Xaver Hugl
41aeecbb2a scene/surfaceitem: prevent division by zero
If the steady_clock's resolution is very limited, now - m_lastDamage might be zero,
so enforce a minimum time of 10us (or 100'000 fps)
2024-02-05 16:32:04 +00:00
Vlad Zahorodnii
e97b6032c2 effect: Allow ref'ing normal windows
It can be used to simplify state tracking in some effects. The
restriction exists because there used to be separation between normal
and closed windows (Toplevel and Deleted), and one could reference
only Deleted windows. So it was easier just to forbid referencing still
alive windows.
2024-02-05 15:06:13 +00:00
Vlad Zahorodnii
0c03e7ccfc plugins/slidingpopups: Always ref window when sliding it offscreen
Imagine the following case:

- the window is hidden, slideOut() is called but no deleted reference is
  created because the window is not deleted
- the window is closed, slideOut() won't be called because the window is
  hidden and SlidingPopupsEffect::slotWindowClosed() ignores closed windows
  that are already hidden
- the window is deleted in meanwhile
- the sliding popups effects attempt to delete m_animations[w] entry,
  but since "w" is a dangling pointer at this point, visibleRef is going
  to access released memory

To fix that, make slideOut() always ref the window.
2024-02-05 15:06:13 +00:00
Vlad Zahorodnii
69f344a439 plugins/screenshot: Cache screenshot attributes
When a QPromise reports results, it's not necessary that the
QFutureWatcher is going to report it immediately. That can happen at
some point in the future, which is okay according to the QFuture api
contract.

Due to that, we cannot assume that the stored Output and EffectWindow
objects pointers are valid when the QFutureWatcher::finished is emitted.
2024-02-05 16:24:48 +02:00
Vlad Zahorodnii
50fae55821 Revert "systemd: Set up a watchdog"
kwin_wayland has become unstable. Sometimes it works fine, sometimes it
is randomly killed. Things are quite bad after kwin_wayland --replace.

This reverts commit 71ade59f4b.
2024-02-05 12:54:47 +02:00
Xaver Hugl
6e4b5839ce Revert "opengl/openglcontext: require support for RGBA16F framebuffers"
This reverts commit a89d1f8058. Apparently lima does not
support the extension :|
2024-02-05 10:11:26 +00:00
Kai Uwe Broulik
68f1684031 killer: Initialize Xdg Importer in its constructor
Avoids having to do asynchronous code further down.
2024-02-05 10:04:12 +00:00
Vlad Zahorodnii
fec39141b5 Decouple updateLayout() from updateRootInfo()
It makes code more intuitive, updating X11 specific stuff should not be
needed to update the grid layout. Another advantage that this change
brings is that it should be possible to decouple X11 bits from the
virtual desktop manager completely, might be useful for running multiple
xwayland instances.
2024-02-05 11:52:36 +02:00
Vlad Zahorodnii
8b29f07dbe Make NETRootInfo initialization reasonable
The documentation of NETRootInfo::activate() says that it should be
called after creating the NETRootInfo object to read properties.

However, it's called in two places: VirtualDesktopManager::setRows()
and Workspace::initializeX11(). At quick glance, there's no justifying
reason to call activate() in setRows(), it doesn't fit the purpose
of setRows().

This change re-arranges NETRootInfo initialization code so it makes
more sense.
2024-02-05 09:45:22 +00:00
Vlad Zahorodnii
993f110d59 Don't overwrite current virtual desktop when restarting Xwayland 2024-02-05 09:36:57 +00:00
Aleix Pol Gonzalez
71ade59f4b systemd: Set up a watchdog
Allows to notify systemd whether kwin is still running and possibly
restart the service if it stops responding.

Use Type=notify-reload to watch the kwin service. This will make it so
we receive SIGHUP rather than SIGTERM on the wrapper which we can handle
gracefully and stop the kwin process and restart as expected.

https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2024-02-05 09:25:08 +00:00
Vlad Zahorodnii
aac5d562fb Drop "<N>" window caption suffix
The current implementation of the `<N>` suffix is still buggy and its
benefits are doubtful. One could argue that visual aids such as window
thumbnails or highlighting the windows are better. On its own, these
numbers don't have strong connections to the windows and can change on
a whim.
2024-02-05 11:10:53 +02:00
Vlad Zahorodnii
3f2b49be5d Stop emitting windowShown signal when XdgToplevelWindow is unminimized
Minimized state has no connection to the hidden state.
2024-02-05 08:44:14 +00:00
Vlad Zahorodnii
66a491bda6 wayland: Remove extra space around the wrapper window in X11 windows
This way no extra buffer space is going to be wasted for a decoration
that isn't there, and it might be nicer for fractional scaling as kwin
won't need to deal with border size voodoo cases.
2024-02-05 08:30:40 +00:00
l10n daemon script
ba37d18ab9 GIT_SILENT Sync po/docbooks with svn 2024-02-05 01:32:52 +00:00
l10n daemon script
909d83419c GIT_SILENT Sync po/docbooks with svn 2024-02-04 01:20:54 +00:00
l10n daemon script
94e1d6de3e GIT_SILENT Sync po/docbooks with svn 2024-02-03 01:23:52 +00:00
l10n daemon script
7c9fb68b14 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-03 01:15:33 +00:00
Vlad Zahorodnii
cc2e6fc96c Add fallback cursor shape for "default" shape
Some cursor themes don't have "default" shape, so fallback to "left_ptr"
with such themes.

BUG: 477476
2024-02-02 17:17:38 +02:00
David Redondo
ee782c8a91 Update to merged version of xdg-toplevel-drag 2024-02-02 14:44:23 +01:00
David Redondo
4d0cd42aef Revert "Use qt prefix variant of toplevel drag protocol"
The protocol has been merged upstream and Qt is now using it.

This reverts commit 216a268a43.
2024-02-02 14:44:23 +01:00
Niccolò Venerandi
79a61deb25 Register touch action to activate Overview instead of toggling it
This is because the Overview will activate itself at the end of a 1:1 gesture,
and a toggle action might actually deactivate it rather than activate it.
2024-02-02 14:42:06 +01:00
Vlad Zahorodnii
e58451fc01 wayland: Truncate virtual desktop names
Virtual desktop names are user defined strings so they can exceed
the maximum size of a wayland message size.

BUG: 480614
2024-02-02 12:03:33 +02:00
l10n daemon script
92f4a95bb5 GIT_SILENT Sync po/docbooks with svn 2024-02-02 01:19:44 +00:00
Vlad Zahorodnii
5896bab86f Activate next window when an X11 window is minimized
It matches the behavior of XdgToplevelWindow.

BUG: 479388
2024-02-02 02:01:39 +01:00
Xaver Hugl
880ce92fb2 xwayland/xwaylandlauncher: don't enable WAYLAND_DEBUG with KWIN_XWAYLAND_DEBUG=0 2024-02-02 02:01:13 +01:00