Commit graph

26039 commits

Author SHA1 Message Date
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
Vlad Zahorodnii
b21229e59a wayland: Implement closeable window rule
BUG: 443129
2024-01-29 10:57:29 +02:00
Vlad Zahorodnii
35572904fc effect: Overwrite the output in OffscreenQuickView::setGeometry()
It seems like QWindow::setGeometry() won't update the associated output
if no platform window has been created, which is the case when running
overview or any other qml effect.

It's not clear whether this is a Qt bug or intended behavior.
qwindow.cpp contains comments assuming that the window is on the primary
output if no platform window exists.
2024-01-29 10:51:54 +02:00
Vlad Zahorodnii
601d33f294 effect: Allocate an offscreen fbo with correct scale in OffscreenQuickView
QQuickWindow::effectiveDevicePixelRatio() uses the device pixel ratio
of the attached QQuickRenderTarget. Instead, the scale factor of the
output should be used, which is what QWindow::devicePixelRatio() returns.
2024-01-29 10:51:54 +02:00
Fushan Wen
75b08a8fd9 tabbox/switchers/thumbnail_grid: use FocusScope as main item
By default the focus item in a tabbox is always the main item, so if the
main item is not a focus scope, the inner item will not get focused.

BUG: 477286
FIXED-IN: 6.0
2024-01-29 10:36:14 +02:00
l10n daemon script
ab631c2147 GIT_SILENT Sync po/docbooks with svn 2024-01-29 01:18:52 +00:00
l10n daemon script
53fa2bfbd6 GIT_SILENT Sync po/docbooks with svn 2024-01-28 01:22:25 +00:00
l10n daemon script
0300c17441 GIT_SILENT Sync po/docbooks with svn 2024-01-27 01:19:51 +00:00
Vlad Zahorodnii
1b6aa65ee5 autotests: Add layer_surface_v1.set_exclusive_edge test cases 2024-01-26 13:55:13 +02:00
Marco Martin
fe8fe42ea9 wayland: Add support for layer_surface_v1.set_exclusive_edge
This can be used to disambiguate the exclusive edge when the anchors are
on a corner (so there would be 2 candidates)

it's quite quick and dirty mostly to understand if we do want to push for
something along the lines (it should at least do a protocol error when
the requested edge is not within the anchors)
2024-01-26 13:34:48 +02:00
l10n daemon script
2d2ee710c8 GIT_SILENT Sync po/docbooks with svn 2024-01-26 01:22:02 +00:00
l10n daemon script
5876269f66 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-26 01:13:56 +00:00
Vlad Zahorodnii
91ae3d907e plugins/zoom: Unset PAINT_SCREEN_TRANSFORMED
It's not needed because of the offscreen texture.

BUG: 480216
2024-01-25 15:10:18 +02:00
Vlad Zahorodnii
2505fd03f1 kconf_update: Add script to drop old desktop switching shortcuts
BUG: 479984
2024-01-25 10:52:19 +02:00
Xaver Hugl
bbc833baa6 core/renderloop: take the output of the active window into account for vrr scheduling
If the active window is on a different output than the one the renderloop is for,
the scheduling logic would otherwise never schedule a repaint while adaptive sync
is active.

BUG: 480252
2024-01-25 10:29:57 +02:00
Xaver Hugl
bb2391133d plugins/screencast: hardcode DRM_FORMAT_ARGB8888 for screencasts
It's universally supported, and our format negotiation code needs improvements to
properly handle the receiving application not suporting the actual output format
2024-01-25 10:19:15 +02:00
Nicolas Fella
06230e43d6 Remove wrong handling of Qt::KeypadModifier
Qt::KeypadModifier doesn't actually map to any XKB modifier

The XKB_MOD_NAME_NUM modifier is (semi-)unrelated
2024-01-25 10:10:11 +02:00
l10n daemon script
957e73a889 GIT_SILENT Sync po/docbooks with svn 2024-01-25 01:18:34 +00:00
l10n daemon script
daad3b9d7c 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-25 01:12:07 +00:00
Vlad Zahorodnii
9cdf19c657 autotests: Add keypad global shortcuts test 2024-01-24 13:20:58 +00:00
Nicolas Fella
296d3f31be Consider Qt::KeypadModifier relevant for global shortcuts
Otherwise kglobalaccel can't distinguish between numbers on the num block and other numbers

BUG: 453423

BUG: 446389
2024-01-24 13:20:58 +00:00
Vlad Zahorodnii
25150633ed kconf_update: Update Version
kconf_expects version 6.
2024-01-24 12:16:22 +02:00
Vlad Zahorodnii
3bce89553c Prefer QRegion::operator+=
`QRegion::operator|=` has some optimizations but it basically boils
down to

  QRegion result(*this);
  result.detach(); // it will make a copy because this is shared
  result.d->append(rect);
  return result;

On the other hand, `QRegion::operator+=` tries to add the new rect
in-place.
2024-01-24 10:26:02 +02:00
Vlad Zahorodnii
f44484137e plugins/blur: Fix blur behind decoration
Currently, if only blur behind decoration is enabled, no m_windows entry
is going to be created and so the blur effect won't blur the background.

BUG: 479893
2024-01-24 10:24:57 +02:00
Vlad Zahorodnii
e01116149b tests: Fix constraint region in pointerconstraints example 2024-01-24 10:23:45 +02:00
l10n daemon script
a1b47dfa08 GIT_SILENT Sync po/docbooks with svn 2024-01-24 01:19:44 +00:00
l10n daemon script
f065ee6d06 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-24 01:12:23 +00:00
Vlad Zahorodnii
3663e1ec13 Apply "Accepts focus" window rule to WM_TAKE_FOCUS messages as well
Currently the window rule is not 100% effective because the "take focus"
message is not guarded. So depending on the input model of the X11
window, kwin can still activate a window even if it has a window rule
to force no focus.

workspace()->setShouldGetFocus() should be guarded too to help the focus
stealing prevention logic.

Technically though, forcing XSetInputFocus() or WM_TAKE_FOCUS if the
client doesn't advertise supporting them is finiky. But on the other
hand, the window rules are an advanced feature, so its assumed that the
user knows what they do.
2024-01-23 22:11:16 +02:00
Vlad Zahorodnii
bbb40a9a84 Fix lingering dpms input event filter after cancelling scheduled dpms mode change
The output goes through the following stages when it changes its dpms
mode:

- Output::aboutToTurnOff()]
- some time later, Output::dpmsModeChanged() to indicate that it's off
- Output::dpmsModeChanged() to indicate that it's back on
- Output::wakeUp()

The Output::dpmsModeChanged() signals in the middle are optional. They
may not be emitted after Output::aboutToTurnOff() if the user quickly
cancels the dpms mode transition.

The Workspace should monitor the Output::wakeUp() signal instead.
Alternatively, create the dpms input event filter only after the dpms
mode has changed. While the screen won't be turned back on immediately,
it's still going to produce acceptable visuals. Either solution is fine.
This patch makes the Workspace monitor the wakeUp signal because it
takes fewer lines of code.

BUG: 479659
2024-01-23 22:05:25 +02:00
Yifan Zhu
adc076322b plugins/fallapart: use InCubic easing
This visual effect corresponds to visible to invisible. So use InCubic
easing for opacity and speed.
2024-01-23 22:00:14 +02:00
Vlad Zahorodnii
d0a49a6b77 helpers/wayland_wrapper: Bump the buffer size for display_name
The compiler prints the following warning at the moment:

    wl-socket.c:143:9: note: ‘snprintf’ output between 10 and 20 bytes into a destination of size 16
2024-01-23 21:55:19 +02:00
Xaver Hugl
8db8dd24bf move vao from WorkspaceSceneOpenGL to GlxContext
EglContext already had a vao, and it makes more sense for the context to
take care of this than the scene
2024-01-23 19:40:30 +00:00
Xaver Hugl
7e095412aa outputconfigurationstore: add a fallback for when edid parsing fails
When edid parsing fails, KWin will base output settings on the connector, which
isn't great on its own, but at least works in many cases. When the edid can be
parsed later though, the display settings will reset because now the edid identifier
is used to exclude the old config (in which the latter is missing).
To work around that, this commit adds output identification based on the edid hash,
which is also not ideal, but can be safely matched with in case no output config
with a matching edid identifier exists.
2024-01-23 19:34:06 +00:00
Xaver Hugl
3cafc20981 backensd/drm: directly try presentation with changed properties
This optimizes out an unnecessary atomic test - instead of testing the new state and
then attempting to present with that new state, this just directly tries to present the
full state. If that commit fails, the backend just tries again with the safer presentation
mode.
2024-01-23 19:25:05 +00:00
Xaver Hugl
7a2d95ddc8 outputconfigurationstore: take rotation into account for the position
Otherwise outputs may overlap
2024-01-23 19:19:49 +00:00