Commit graph

26073 commits

Author SHA1 Message Date
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
Vlad Zahorodnii
c733e7a7b6 backends/virtual: Fix OutputFrame 2024-02-02 02:00:51 +01:00
Xaver Hugl
c2749e3acf x11window: explicitly resize when the Xwayland scale changes
With how Xwayland scaling works, KWin assumes the window already uses the
new coordinate system - but that doesn't happen until Xwayland and the client
know about the new size as well.

BUG: 480642
2024-02-02 02:00:27 +01:00
Vlad Zahorodnii
93b9fdd391 effect: Fix initialization of QEvent::isAccepted() in cloned events in OffscreenQuickView
QEvent::isAccepted() is initialized to true by default.

BUG: 480538
2024-02-02 02:00:07 +01:00
Xaver Hugl
67b1a88466 autotests/integration: re-enable lid closed output changes test
KWin is handling the lid switch now
2024-02-02 01:59:36 +01:00
Xaver Hugl
cc72778d5e plugins/nightcolor: clamp preview color temperature to be somewhat sane
BUG: 480700
2024-02-02 01:59:06 +01:00
Yifan Zhu
ae7fb3885b inputmethod&plugins/buttonrebinds: use new KKeyServer API
To correctly handle Qt::Key_Calculator corresponding to both
XF86Calculator and XF86Calculater.
2024-02-01 23:11:32 +00:00
Vlad Zahorodnii
795b619704 Take surface idle inhibitors into account only after window is added to the workspace
This helps to reduce having N sources for the same information.
2024-02-01 10:49:39 +02:00
Marco Martin
19970bd639 plugins/wobblywindows: Use snapping when the window isn't moving
disable pixel snapping when the window is moving with some velocity/acceleration,
reenable it when is (alsmost) stopped
2024-02-01 10:47:45 +02:00
Jay Paul
5ae170f1d6 plugins/screencast: set frame timer to one shot
BUG: 469777
2024-02-01 10:27:15 +02:00
Xaver Hugl
896a57d3be opengl/glshader: make uniform enums type safe 2024-01-31 13:24:48 +01:00
Xaver Hugl
a649be64db backends/drm: use the correct uniform type 2024-01-31 13:24:48 +01:00
Xaver Hugl
6db05aaef1 backends/drm: merge all commits and try again if atomic commits fail
The failure might be from the commit reordering going wrong in some way.
The total accumulated state might still work even if an individual commit
does not though, so before considering the whole frame lost, merge all the
commits and try again
2024-01-31 13:24:24 +01:00
Xaver Hugl
9c0085f5a9 colorspace: make sdr colorimetry not be about rec.2020 anymore
This was just done because of the wrong assumption that displays needed that
to show the full native gamut. That turned out to be an amdgpu bug though; with
that fixed, most of the 0-100% range is wildly oversaturated.
To make the slider more intuitive, this changes the sdr gamut wideness to instead
interpolate to the native display primaries as indicated by the EDID.
2024-01-31 13:23:03 +01:00
Xaver Hugl
8d44ece874 input: increase raise timeout for drag and drop to 1s
This should be long enough to not happen accidentally, but short enough to not be
annoying and discoverable.

BUG: 480511
2024-01-31 10:41:03 +02:00
Vlad Zahorodnii
3a1b9414ed plugins/screencast: Fix hidden cursors
The screencast plugin doesn't take into account the hidden status of
the cursor, which results in the cursor being visible when screencasting
even though it's hidden.
2024-01-31 10:38:56 +02:00
l10n daemon script
120e36da2a GIT_SILENT Sync po/docbooks with svn 2024-01-31 01:25:39 +00:00
l10n daemon script
788f42ddd4 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-01-31 01:13:52 +00:00
Vlad Zahorodnii
def3a50558 Ignore external updates of _NET_DESKTOP_LAYOUT and _NET_DESKTOP_NAMES
At the moment, the desktop layout in _NET_DESKTOP_LAYOUT overwrites new
desktop layout with outdated information. This happens because kwin tries
to honor the desktop layout set by the pager. However, kwin itself
already acts as the pager. The pager applet in plasma doesn't attempt to
maintain _NET_DESKTOP_LAYOUT with proper values.

On the other hand, kwin trying to both update and also sync its state to
_NET_DESKTOP_LAYOUT and _NET_DESKTOP_NAMES has created a series of
issues, like lockups or rendering glitches.

Given that the window manager can ignore these properties, and the fact
that kwin already does act like a pager, this patch makes kwin ignore
external updates to _NET_DESKTOP_LAYOUT and _NET_DESKTOP_NAMES.

In order to modify the desktop layout on X11, use the dbus api. On
Wayland, either the dbus api or the virtual desktop wayland protocol.

BUG: 422319
BUG: 480371
2024-01-30 14:14:09 +02:00
l10n daemon script
98dcf82ada GIT_SILENT Sync po/docbooks with svn 2024-01-30 01:22:09 +00:00
Xaver Hugl
b1414033ef colorimetry: use 4x4 matrices for colorimetry transforms
This is so that offsets can be represented in the matrices and not just
scaled and rotated coordinate systems
2024-01-29 22:15:21 +00:00
Xaver Hugl
4dd1e91bda wayland: implement experimental tag of the upstream color management protocol
Support is hidden by an environment variable to prevent accidental standardization
on this experimental version. It allows app devs to already implement and
test it though, and easily switch to the proper protocol later
2024-01-29 23:07:38 +01:00
Vlad Zahorodnii
a64c86b73f wayland: Install headers generated by qtwaylandscanner 2024-01-29 22:32:57 +02:00
Vlad Zahorodnii
e23cb52a16 wayland: Add windows when readyForPainting changes
A window is added to the workspace when it's mapped. It's assumed that
the first Window::windowShown signal indicates that. But it's not
entirely true. For example, if setHidden(false); setHidden(true); are
called in succession, the window will be marked as ready for painting
even though it isn't.

The Window::readyForPaintingChanged() signal fixes that. It's emitted
when the window is actually mapped.
2024-01-29 12:35:10 +02:00
Xaver Hugl
b05fa94d32 backends/drm: don't set the content type drm property
We haven't seen any benefit from passing it through from apps and apparently
it can make atomic commits fail in some cases.

BUG: 480454
2024-01-29 11:55:50 +02:00
Akseli Lahtinen
91974b7794 Set correct opaqueRegion for Xwayland apps 2024-01-29 09:34:57 +00:00
Vlad Zahorodnii
d9e96223f4 plugins/slidingpopups: Avoid sliding already hidden popups 2024-01-29 11:14:15 +02:00
Vlad Zahorodnii
341067d4d7 Port ScreenEdges::recreateEdges() to std::span 2024-01-29 11:14:15 +02:00
Vlad Zahorodnii
16aaf92782 Reserve a screen edge on the same output as the window
This makes the association between the window's output and the screen
edge's output more robust.
2024-01-29 11:14:15 +02:00
Vlad Zahorodnii
2d399e93f0 Relax constraints for screen edges reserved by windows
At the moment, if the workspace extends or shrinks by an output, the
hidden panel will be shown. It doesn't make sense in all cases.

Furthermore, no screen edge will be reserved if the layer surface has
some margins.

To address that, allow "floating" panels reserve screen edges and also
make kwin try harder to preserve window edges if the output layout
changes.

CCBUG: 448420
2024-01-29 11:14:15 +02:00
Vlad Zahorodnii
aaa35d455c plugins/shakecursor: Ignore pointer motion events when the pointer is constrained
The main motivation is to prevent the shake cursor from triggering in
video games. It's not a bullet-proof solution though.
2024-01-29 11:05:15 +02:00
Vlad Zahorodnii
1eb95982dc autotests: Disable outline in breeze
Some our tests assume that with "none" border size, the decoration has
no borders. When breeze paints an outline, that's not the case.
2024-01-29 11:04:05 +02:00