Commit graph

26702 commits

Author SHA1 Message Date
Xaver Hugl
2e9e6893bb wayland: port linux drm syncobj from RenderBackend to DrmDevice 2024-05-22 00:26:14 +02:00
Xaver Hugl
0f41239515 waylandserver: set render backend for linuxdrmsyncobj directly
The code would previously never set the render backend, causing the use of explicit sync
to fail

BUG: 486391
2024-05-22 00:26:14 +02:00
Xaver Hugl
3465ecac16 wayland: implement plasma window management v17
This fixes plasmashell crashing because of the stacking order string exceeding
the size of a Wayland message

CCBUG: 479492
2024-05-21 17:48:55 +02:00
Jakub Piecuch
7bf40c3501 utils/edid: use detailed timings to compute physical screen size
An EDID can contain zero or more detailed timing definitions, which can contain
more precise physical dimensions of the screen (in millimeters, as opposed to
centimeters).

The Xorg server has similar logic for determining the physical screen size from
the EDID: pick the first sane size from the detailed timing definitions, and
fall back to the screen size given in the "Basic Display Parameters & Features"
section.

BUG: 486585
2024-05-21 11:22:51 +00:00
l10n daemon script
79357db409 GIT_SILENT Sync po/docbooks with svn 2024-05-21 01:33:01 +00:00
Nate Graham
dcd2f7b15a plugins/tileseditor: clarify wording in "split the view" buttons
Apparently people have differing ideas of what "vertically" and
"horizontally" mean, and some feel that this wording contradicts the
icon.

That's not accurate, but the wording is admittedly a little a bit
ambiguous. We can clarify this by using super duper explicit
terminology that always matches the icon.

BUG: 475103
FIXED-IN: 6.1
2024-05-20 15:58:01 +00:00
Volodymyr Zolotopupov
202356ba89 plugins/screenshot: Snap pixel grid for rectangular screenshots
To prevent blurring with fractional scaling
2024-05-20 14:23:38 +00:00
Volodymyr Zolotopupov
f4232bc391 plugins/screenshot: Round texture size
To prevent window screenshot blurring with fractional scaling
2024-05-20 14:23:38 +00:00
Vlad Zahorodnii
1ca7524853 plugins/nightlight: Correct time check in currentTargetTemp() 2024-05-20 14:09:15 +00:00
Vlad Zahorodnii
bc52189e20 plugins/nightlight: Remove unused typedef 2024-05-20 14:09:15 +00:00
Vlad Zahorodnii
1d9824d0a2 plugins/nightlight: Clean up the slow update code path 2024-05-20 14:09:15 +00:00
Vlad Zahorodnii
7880f879a3 plugins/nightlight: Make the slow transition more robust to fuzzy time values
If the slow transition is scheduled slightly earlier before m_next.first,
don't skip the "m_prev.first <= todayNow && todayNow <= m_prev.second" branch.

Also explicitly handle the case when resetSlowUpdateTimers() gets called
after m_prev.second, i.e. the previous transition has finished running.
2024-05-20 14:09:15 +00:00
Xaver Hugl
bbf4f46b28 compositor_wayland: properly handle moving the cursor plane failing
On test failure, the plane has to be disabled or future atomic tests fail

BUG: 487037
2024-05-20 11:14:01 +00:00
l10n daemon script
f5ac8968d8 GIT_SILENT Sync po/docbooks with svn 2024-05-20 01:28:06 +00:00
l10n daemon script
aae9eb9c65 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-05-20 01:18:51 +00:00
l10n daemon script
c919c91063 GIT_SILENT Sync po/docbooks with svn 2024-05-19 01:29:43 +00:00
Xaver Hugl
35ce8a6208 outputconfigurationstore: increase the default SDR brightness
200 nits is a bit dark in most situations, so this switches the default SDR
brightness to up to 500 nits (depending on what the screen supports)
2024-05-18 20:37:07 +00:00
l10n daemon script
22dffa4714 GIT_SILENT Sync po/docbooks with svn 2024-05-18 01:28:37 +00:00
Vlad Zahorodnii
ebe6f58d9a backends/wayland: Avoid attaching null buffer
Otherwise the window will be unmapped.
2024-05-17 11:20:35 +00:00
Ambareesh Balaji
0b2596b604 plugins/nightlight: handle imprecise timers
Due to QTimer sometimes firing a tad bit early, transitions get skipped, or we
end up in the "Error in time calculation" branch. This commit improves timer
handling to avoid this.
2024-05-17 09:46:34 +00:00
Niccolò Venerandi
b59ba5b9b7 Do not snap to windows of the Dock type
We do not snap to docks (i.e. panels) since the ones we
actually want to snap to (i.e. always visible ones) will
restrict the workspace area, and the window will snap to
that, effectively snapping to the panel too. Explicitedly
avoiding panel snapping solves any possible issue of
floating panels, since they change their size when a window
gets near them.
2024-05-17 09:17:24 +00:00
l10n daemon script
de88370577 GIT_SILENT Sync po/docbooks with svn 2024-05-17 01:28:13 +00:00
Vlad Zahorodnii
fa895828de plugins/screencast: Cleanup buildFormats()
The fixate branch makes sense only in case dmabuf is available.
2024-05-16 13:01:14 +00:00
Vlad Zahorodnii
9af15a979d backends/wayland: Check whether it's possible to create a swapchain with the given format+modifier
BUG: 485496
2024-05-16 12:44:21 +00:00
David Edmundson
df60eef0db wayland: Send dnd_cancelled to source before data_device.leave to target
Otherwise it is harder for clients to detect an actual cancellation when
dragging to itself.
2024-05-16 10:55:43 +00:00
Vlad Zahorodnii
856925bcc3 wayland: Print error code if accept fails for security context's listen fd 2024-05-16 10:32:38 +00:00
Vlad Zahorodnii
de15b87ea7 wayland: Fix security context failing to create a client
wl_client_create() can fail.
2024-05-16 09:44:56 +00:00
Vlad Zahorodnii
982a2e3a37 wayland: Lower severity of a log message about unknown uuid
The communication between the compositor and plasmashell is asynchronous.
It's possible that plasma can call get_window_by_uuid before it is notified
that the window has been closed. There's no any way around with the
current design of the protocol. So printing a warning message is
unjustified. This fixes kwin's logs being full of "could not find window"
warning messages.
2024-05-16 08:54:01 +00:00
David Edmundson
711c5bb43f wayland: send dndFinished to source if target fails to do so
After receiving a drop a client should call data_offer.finish
to tell the source it's done using the drop.

A client could delete an offer after drop before calling finish.

This can happen with misbehaving/buggy or malicious Wayland clients.
A real case was found in the wild with Chromium, as described in the
linked bug.

In this situation we should let the source know the dnd is finished
as there are no other transfers than can take place.

We don't want to universally send this in all data offer destructors
only, offers that are deleted post drop so the flag on the source is
exposed.

BUG: 482142
2024-05-16 08:23:00 +00:00
Vlad Zahorodnii
7710b44f1d plugins/screencast: Specify the effective drm format
Currently, the dmabuf format is hardcoded to DRM_FORMAT_ARGB8888, but
testCreateDmabuf() uses m_drmFormat.

Furthermore, if the shm buffers are used, it's preferred to use a buffer
format that's friendly to QImage and OpenGL, which is DRM_FORMAT_ARGB8888.
2024-05-16 10:59:35 +03:00
Vlad Zahorodnii
54f7079100 plugins/screencast: Use buffer format and modifier as specified in spa_video_info_raw
It appears like pipewire can ask kwin to allocate a drm buffer even
though m_dmabufParams has been reset. It's underspecified when pipewire
will start requesting new buffers after changing the stream params. So
use the last reported video info to allocate buffers. If even it is wrong,
then it's an issue somewhere in pipewire.
2024-05-16 07:38:38 +00:00
l10n daemon script
47484bb141 GIT_SILENT Sync po/docbooks with svn 2024-05-16 01:44:30 +00:00
Pau López
96c0d800b8 docs/contributing: Update windowswitchers location 2024-05-15 18:36:46 +02:00
Nate Graham
29a93a2e57 plugins/slidingpopups: use standard duration values
Right now the opening duration is 150ms, and the closing duration is
250ms. Neither are standard durations we use elsewhere, and it's also a
bit odd to be slower to close than to open--at least from a visual
perspective.

The average of these value happens to be 200ms, which happily is the
exact value of Kirigami.Units.longDuration.

As such, use that value instead, in the interests of visual consistency.
2024-05-15 09:06:05 -06:00
Vlad Zahorodnii
77794e1333 plugins/screencast: Call pw_deinit()
The constructor has a pw_init() function call, but the destructor lacks
the matching pw_deinit().
2024-05-15 12:16:40 +00:00
David Redondo
805435d157 xwayland: Enable xtest libei integration
Enabling this feature makes Xwayland send xtest events via
the remote desktop portal and libei.
XWayland will create a new session for each X client (it keeps
contexts around and reuses them if the cmdline matches, so not
every xdotool invocation produces a new portal prompt).
2024-05-15 09:31:53 +00:00
Vlad Zahorodnii
4ebb21e8c3 plugins/screencast: Refuse creating a dmabuf buffer if n_datas is wrong
n_datas must match the plane count in the graphics buffer. But apparently
pw buffers with wrong n_datas can still slip through somehow. It makes
the screen cast stream crash when filling in buffer data.

The crash is hard to reproduce, but on the other hand, according to
sentry, a substantial number of users is affected by this issue.

Taking the defensive approach is not great, there will likely be other
issues with screencasting, but it seems like the only feasible option
so far. Broken streams is better than kwin crashing. It also wouldn't
hurt to add some warning messages, that will be done in a follow up MR.
2024-05-15 08:58:27 +00:00
Vlad Zahorodnii
886f0e852b Disconnect Workspace::outputsChanged from InputPanelV1Window when it's closed
Otherwise the input panel window can be repositioned after it's closed,
which will crash.
2024-05-15 08:51:00 +00:00
l10n daemon script
0ce58c7cbf GIT_SILENT Sync po/docbooks with svn 2024-05-15 01:28:14 +00:00
Xaver Hugl
9fef6380d4 backends/drm: adapt the color factors to the target colorspace
Otherwise the effect of night color is much bigger in larger colorspaces.
This is mostly a workaround, but the better solution (adapting the color
temperature of the colorspace instead) will have to wait for 6.1

BUG: 483801
FIXED-IN: 6.0.5
2024-05-14 14:47:12 +02:00
Xaver Hugl
e04ec0ce29 opengl: make GLRenderTimeQuery::query non-destructive 2024-05-14 12:33:08 +00:00
Xaver Hugl
b167d1f56a core/renderbackend: improve handling of multiple render time queries
With multiple OpenGL render time queries, you can't just add the render
times together, because the GPUs execute commands asynchronously and you
may get a far too big result this way. Instead, this converts all timestamps
to steady_clock and correctly calculates the actual total time spent rendering
with the first and last timestamp.
2024-05-14 12:33:08 +00:00
Xaver Hugl
8d5ebb5e15 backends/drm: relax direct scanout rules for color management
The GL renderer currently doesn't apply any transformations except clipping,
so allowing direct scanout is okay as long as colorimetry and transfer
function match.
2024-05-14 08:08:08 +00:00
Xaver Hugl
22d0631b1b backends/drm: add support for an HDR brightness setting 2024-05-14 09:51:59 +02:00
l10n daemon script
589479c24a GIT_SILENT Sync po/docbooks with svn 2024-05-14 01:30:06 +00:00
Fushan Wen
7a2e6bb58e Constify Qt containers passed to ranges
This constifies a few mutable Qt containers passed to std::ranges to improve the efficiency.
2024-05-13 19:50:25 +00:00
Ismael Asensio
d2d92cdfd2 rules/RuleBook: Optimize saving discarded rules to config
After porting to KConfigXT settings some time ago, there was still an
inefficient and error-prone codepath between the `RuleBook` (which keeps
the runtime list of `Rules`) and the `RuleBookSettings` (responsible for
config reads and saves), in the form of the `setRules()` method.

We can eliminate the `setRules()` codepath, reducing unnecessary
runtime process and file access operations, and instead:
- Keep track of the config `id` in the `Rules` objects
- Keep a single `RuleBookSettings` object as a member
- Modify or delete the discarded rules settings directly
- Save when necessary

This also fixes two bugs/pitfalls of the previous solution:
- the config group id for each rule is now preserved instead of creating
  new ones
- no leftovers on the config file for the discarded groups and entries

Setting custom configs for the integration tests still works unchanged.

BUG: 446381
FIXED-IN: 6.1
2024-05-13 20:18:09 +02:00
Xaver Hugl
a3c763b8ef backends/drm: ensure that ctm and gamma_lut are always unset with color management
Otherwise night color will be applied twice
2024-05-13 08:32:03 +00:00
Xaver Hugl
dcda15e5e3 core/renderlayer: don't implicitly truncate width and height of the geometry
Otherwise, repaint regions will be limited to a pixel less than it should be
in some cases

BUG: 482987
FIXED-IN: 6.0.5
2024-05-13 08:07:38 +00:00
Jan Grulich
653938e456 plugins/screencast: fix damage region position
Damage reported from the output is output-local and therefore doesn't
need to be translated.

I tested this with Chromium, where the damage region on my 3-monitor
setup was always -4k something on the right screen, -2k on the middle
one and correct on the left screen. With this change I can confirm that
the position is now correctly reported for the right screen.
2024-05-13 09:52:27 +02:00