Commit graph

27058 commits

Author SHA1 Message Date
Vlad Zahorodnii
ddfb26fc8e utils: Provide size hints in native pixels
This is mainly to make the Xcb utils api consistent.
2024-07-18 13:39:11 +03:00
Vlad Zahorodnii
95f56399b8 utils: Make Xcb::WindowGeometry return native geometry 2024-07-18 13:38:09 +03:00
David Redondo
ccde653ac2 plugins/eis: Ignore duplicate key and buttons events
Some clients (like xdotool) can send multiple events for the same
key. In some instances the number of presses and releases can even
be mismatched leading to stuck keys. While we clean up pressed keys
when the client vanishes, this doesnt help when it doesnt immediately
disconnect (for example Xwayland keeps client connections live
longer than the actual x client to reuse them).
Also fixes a copy paste mistake where key presses where also written
to buttons.
2024-07-18 10:17:31 +00:00
Jakob Petsovits
6ca6308ccd wayland: Use brightness range 1..max for internal displays
This avoids regressing compared to PowerDevil in 6.1 which also
protected against setting internal display brightness to 0.

CCBUG: 430439
CCBUG: 483490
2024-07-18 07:13:27 +00:00
Bruno Filipe
998be47ac1 backends/libinput: Ignore redundant events for pointer buttons and keyboard keys when pressed/released on multiple devices
BUG: 486034
2024-07-18 06:56:18 +00:00
l10n daemon script
ea4b2c2b20 GIT_SILENT Sync po/docbooks with svn 2024-07-18 01:25:49 +00:00
Xaver Hugl
6b42e59677 colors/colordevice: remove brightness factor
It's completely unused. If brightness modification is desired for night light
for example, it should be tied in with the actual brightness controls for outputs
instead
2024-07-17 16:08:18 +00:00
Xaver Hugl
cb830957aa core: remove unused colorlut class 2024-07-17 16:08:18 +00:00
Xaver Hugl
0260c2e9cd backends/drm,x11/standalone: apply night light in linear space
It's more correct and, as long as you have a programmable LUT, also not less efficient
2024-07-17 16:08:18 +00:00
Xaver Hugl
a86a914f70 backends/drm: allow offloading more complex color pipelines to legacy modesetting
This is done by combining multiple transfer functions and multipliers into one LUT.
2024-07-17 16:08:18 +00:00
Xaver Hugl
e2c8f25d31 backends/drm: combine color operations more aggressively than ColorPipeline does
With programmable LUTs, consecutive transfer functions, inverse transfer functions and
multipliers can all be combined into one LUT. This allows offloading operations in more
situations and makes the operations more efficient too, as potentially fewer LUTs have
to be programmed
2024-07-17 16:08:18 +00:00
Xaver Hugl
3f2f3cb020 core/colorpipeline: add evaluate method to calculate colorpipeline results on the CPU
This is useful for autotests and some other special cases where we need to calculate
the result of a color pipeline on the CPU. Long term, this should replace
ColorDescription::mapTo
2024-07-17 16:08:18 +00:00
Xaver Hugl
4b91ac8cca core/output: remove unused setGammaRamp method 2024-07-17 16:08:18 +00:00
Vlad Zahorodnii
7a472fcab2 backends/x11: Fix crash that happens when toggling compositing
When the GLX or the EGL backend is destroyed, it is going to reset the
RenderLoop state, including the number of frames in flight. It does so
because of the historical reasons. At the time, there was no output frame
object to track the lifecycle of a frame.

After introducing the OutputFrame and hooking it into the RenderLoop,
the pending frame count will be reset automatically in RenderLoop when
the GLX or the EGL backend is destroyed. But we forgot to remove
the invalidate() function calls. So, when the GLX backend goes down, it
resets the pending frame count to zero and then it destroys the pending
OutputFrame object, which would result in decreasing the pending frame
count by 1 and triggering an assert in the RenderLoopPrivate::notifyFrameDropped()
function.

Since there is the OutputFrame helper now, the invalidate() function
can be dropped. Technically, the invalidate function did more than just
reset pendingFrameCount to 0, for example also stop the compositeTime.
But that should be fairly harmless new behavior.
2024-07-17 12:19:21 +00:00
Nicolas Fella
19bf66c42a plugins/stickykeys: Unlatch modifiers when locking
The state should be either latched or locked, not both
2024-07-17 13:13:40 +02:00
Nicolas Fella
85b5048e72 Test locking sticky keys for all modifiers 2024-07-17 10:58:49 +00:00
Nicolas Fella
65405c128e Release key in sticky key test
Otherwise it's pressed the whole time, breaking subsequent tests
2024-07-17 10:58:49 +00:00
l10n daemon script
fa443bb806 GIT_SILENT Sync po/docbooks with svn 2024-07-17 01:26:31 +00:00
Xaver Hugl
0672313c20 core/renderloop: add some hysteresis to triple buffering
Switching to triple buffering requires dropping a frame, so if we constantly
switch back and forth between double and triple buffering, that can cause
very visible performance issues

CCBUG: 488843
2024-07-16 14:21:47 +00:00
Nicolas Fella
6f750f0aa5 Fix typo in comments 2024-07-16 16:08:14 +02:00
Vlad Zahorodnii
5921be95d3 utils: Fix gaining realtime scheduling with musl
sched_setscheduler() is implemented as a stub in musl that does
nothing because Linux provides no way to set scheduling parameters
per process.

Use pthread_setschedparam() to change the scheduling parameters of
the threads instead.

BUG: 487996
2024-07-16 12:56:04 +00:00
Nicolas Fella
de9eb16527 Show notification when modifier keys are used
If the relevant accessibility setting is enabled

BUG: 395559
2024-07-16 12:27:57 +00:00
Nicolas Fella
0419c9a3b1 [plugins/stickykeys] Show notification when keys are locked
If the relevant setting is enabled

CCBUG: 395559
2024-07-16 12:27:57 +00:00
David Edmundson
4ae33be104 wayland: D&D compositior side action negotiation
Wayland specification is that the compositor chooses the actions based
on keyboard modifiers rather than the application initiating the drag
being told the modifiers.
2024-07-16 10:26:30 +00:00
Neal Gompa
915d103128 cmake: Allow not building kwin_x11
Some distributions do not wish to build the KWin X11 backend as
they do not use it, even though they wish to maintain X11 support
for Xwayland when using KWin as a Wayland compositor.

Allow this choice by splitting the build flag and setting it up to
forcibly disable building the backend when building X11 code is
switched off.
2024-07-16 06:47:43 +00:00
l10n daemon script
7c978e84c1 GIT_SILENT Sync po/docbooks with svn 2024-07-16 01:25:22 +00:00
Vlad Zahorodnii
7575de4b02 Port Window::updateInteractiveMoveResize() away from input()->keyboardModifiers()
Since 12c12b3af1, input()->keyboardModifiers()
doesn't work on X. Modifiers need to be pulled from input events.
2024-07-15 15:08:11 +00:00
David Redondo
56f99cb6f4 Fix debug console indices
These were off by one because the surface tab was removed.
Insetad of numbers look up the indices of the widgets so its
less prone to break in the future.
2024-07-15 13:26:05 +00:00
Vlad Zahorodnii
80a86034d0 Remove modifier_only_shortcuts.cpp
Amends c05a26f5c4.
2024-07-15 13:08:47 +00:00
Vlad Zahorodnii
4bf9a208c9 Revert "Handle null input devices in WheelEvent"
This reverts commit c342d57116.
2024-07-15 12:55:28 +00:00
Vlad Zahorodnii
a23ebe12ac Drop leftover infrastructure for modifier only shortcuts 2024-07-15 12:55:28 +00:00
Vlad Zahorodnii
12c12b3af1 Skip processing key and pointer event spies on X
These were needed for the modifier only shortcuts event spy, which has
been dropped recently.
2024-07-15 12:55:28 +00:00
Vlad Zahorodnii
2adf962467 plugins/nightlight: Relax custom times constraints
Apparently the night light kcm allows to set the custom times so the
evening is earlier than the morning to handle extreme cases close to
the North and the South pole.

NightLightManager::updateTransitionTimings() should require no changes.

BUG: 489366
2024-07-15 12:16:50 +00:00
Xaver Hugl
d3bb8ceaae wayland: update to xx color management v3
There's no change in features yet, they'll be added by future commits
2024-07-15 12:05:20 +00:00
Xaver Hugl
a1a0616dc0 workspace: don't access waylandServer on X11 2024-07-15 13:51:53 +02:00
Vlad Zahorodnii
07b31460ce wayland: Simplify XdgPopupWindow::sendRoleConfigure()
Use the precomputed relative placement rather than compute it again.
2024-07-15 07:41:43 +00:00
Vlad Zahorodnii
09e0345ccc wayland: Dismiss XdgPopupWindow when the parent window is closed
XdgPopupWindow can't exist on its own.

BUG: 472013
2024-07-15 07:41:43 +00:00
l10n daemon script
fef5791290 GIT_SILENT Sync po/docbooks with svn 2024-07-15 01:29:21 +00:00
Patrik Fábián
b84a6af8d3 backends/drm: Pass the correct arguments to encodingToNits in the ICC shader 2024-07-14 16:22:14 +00:00
Weng Xuetian
a16d98f4eb
Input method window should not break showing desktop
With recent change of using show desktop with plasma's edit mode,
wayland input method becomes unusable when trying to type in the search
box of widget explorer. This is because the input method window will
currently break showing desktop under wayland.

Under X11, an input method window is traditionally implemented as an
override redirect window. Under Wayland, the window should be treated
similarily, but now we have a special type for input method window.

BUG: 489057
FIXED-IN: 6.1
2024-07-13 23:35:29 -07:00
l10n daemon script
d6f3fb5a27 GIT_SILENT Sync po/docbooks with svn 2024-07-14 01:25:54 +00:00
Xaver Hugl
3c87b7476e backends/drm: always expose brightness control
This allows the user to change the brightness level of content even if there's no
actual underlying "backlight" device. This is the case with many internal OLED
screens for example.

BUG: 413451
2024-07-14 00:03:28 +00:00
Xaver Hugl
faba2b6286 wayland: add support for controlling brightness devices exposed by powerdevil
This way, KWin can set the brightness on internal panels or external monitors with
DDC/CI support, without being exposed to the mess that is actually directly setting
the brightness.

This also adds a capability flag for brightness control to the output management
protocol. Powerdevil will expose a brightness slider for each output and change the
brightness setting of the output accordingly. KWin in turn changes the brightness
levels of the actual brightness device, or of a multiplier in compositing accordingly.
2024-07-14 00:03:28 +00:00
l10n daemon script
7ad1303795 GIT_SILENT Sync po/docbooks with svn 2024-07-13 01:28:15 +00:00
Joshua Goins
09003d03bc ButtonRebindsFilter: Support disabled buttons
It's sometimes wanted that you disable certain buttons on the device,
such as an annoyingly place side button on a drawing tablet. This now
makes it possible to do so by putting "Disabled" in the config. The
rebind filter will then ensure the events are stopped and none are
emitted.
2024-07-12 22:57:22 +00:00
David Edmundson
5b17454aa5 eis: Change default logging category to warning
This makes it consistent with other debug categories

BUG: 489957
2024-07-12 13:39:12 +01:00
l10n daemon script
7891ee6c41 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-07-12 01:19:11 +00:00
Xaver Hugl
de8bd8f126 plugins/fadingpopups: don't block direct scanout
The effect only modifies the opacity of individual windows that
WorkspaceScene::scanoutCandidate will reject anyways, so there's no reason
for it to block direct scanout.
Once a more proper solution for blocking direct scanout on individual items
is in place, this can be removed again

BUG: 487780
2024-07-11 16:54:25 +02:00
Kristen McWilliam
6d7a9a6416 docs: update testing instructions
Updates the testing instructions with instructions
for running safely, without affecting the user's
running session.
2024-07-11 13:56:23 +00:00
Vlad Zahorodnii
9240d75e51 plugins/screencast: Don't download texture data if target size and texture size mismatch
If glGetTexImage() gets called, it can write beyond the bounds of the
target size. In long term, it would be nice to relax this check.

CCBUG: 489764
2024-07-11 09:49:26 +00:00