Commit graph

27354 commits

Author SHA1 Message Date
l10n daemon script
bbfffec6d6 GIT_SILENT Sync po/docbooks with svn 2024-08-06 01:32:32 +00:00
Xaver Hugl
ab8f05a57f activation: fix X11 windows being stuck in should_get_focus more properly
amends d01e20b6a9, and adds an autotest for the bug
2024-08-05 23:25:53 +02:00
Yifan Zhu
1240ac1dfe plugins/buttonrebinds: correctly handle level 1 keys
Level 1 keys (e.g., !=Shift+1) need to have shift added.

BUG: 484367
2024-08-05 16:37:32 +00:00
Xaver Hugl
20dc8f1684 plugins: add effect that shows when compositing is active
It just shows "Compositing" in the corner and doesn't block direct scanout.
When direct scanout is active, the "Compositing" text isn't visible anymore.

This is useful for debugging performance or power draw issues.
2024-08-05 15:40:17 +02:00
l10n daemon script
1d9d809dfd GIT_SILENT Sync po/docbooks with svn 2024-08-05 01:30:06 +00:00
l10n daemon script
9cf9cfe325 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-08-05 01:22:28 +00:00
Aleix Pol Gonzalez
d83f6e9a85 backends/wayland: Support touch input when there's multiple outputs
Makes the outputs we are emitting relative to the output position. This
way if there's an esoteric setup or just more than one output, it won't
just always be relative to the first output.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2024-08-04 17:15:21 +02:00
l10n daemon script
29f772cbbb GIT_SILENT Sync po/docbooks with svn 2024-08-04 01:33:01 +00:00
l10n daemon script
44956f6b9c 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-08-04 01:21:53 +00:00
l10n daemon script
2890dd6d2e GIT_SILENT Sync po/docbooks with svn 2024-08-03 01:33:38 +00:00
l10n daemon script
bf39cc5c19 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-08-03 01:21:57 +00:00
Xaver Hugl
ebffcd9dc4 backends/drm: don't block direct scanout if color profile source isn't set to ICC
If there's a valid ICC profile loaded is irrelevant with a different color profile source
2024-08-02 16:14:00 +02:00
Xaver Hugl
1f2e439b66 compositor_wayland: optimize out black background surfaces for direct scanout
If the application uses a surface with a single-pixel black buffer as a background,
for example behind a video or video game, that surface can be ignored, as the KMS
background is black as well.
With this commit, mpv with --vo=dmabuf-wayland can get direct scanout even if the
aspect ratio of the video and screen don't match, which can result in very significant
power savings
2024-08-02 15:56:52 +02:00
Xaver Hugl
70ceed51fc scene/workspacescene: extend direct scanout candidate search to include multiple subsurfaces
This way, for example subsurfaces for black bars behind videos can be scanned out
2024-08-02 15:56:47 +02:00
David Edmundson
8fd4476ff1 wayland: Move XWayland key forwarding into a filter
We optionally send some keys to xwayland through the filter when no x11
client has focus. This allows shortcut handling in X11 apps to work.

When kwin is grabbing keys we don't necessarily want X11 to sniff these
keys as things can get out of sync. A key place is the tabbox. The X11
client sill has focus, but xwayland is not active. This means we pass
tab keys to X which then go to application incorrectly.

Part of this patch changes the tabbox filter to not intercept the alt
key release event. This ensures xwayland's concept of pressed modifiers
stays in sync.

BUG: 484992
2024-08-02 09:31:40 +00:00
Jonathan Riddell
15538c303b Update Qt version requirement to 6.7.0
GIT_SILENT
2024-08-02 10:15:30 +01:00
David Edmundson
6675eccf6d inputmethod: Send pre-defined commit message to client on user interaction
In some IM backends pre-edit text should be submitted on user interaction, in some it should be discarded. 

In TextInputV1 and V2 this was a flag sent to the client along with
the commit string ahead of time.

TextInputV3 does not have a flag for this, so we handle it compositor side.

We flush the text to be committed :
 - when we change keyboard focus, before the current client gets wl_keyboard.leave
 
 - when a mouse is pressed in the relevant surface
 
 - when a key is pressed and the InputMethod doesn't have a grab
 
 - when the InputMethod forwards a key to the client
 (which includes the InputMethod passing on grabbed keys)
2024-08-02 09:07:46 +00:00
Vlad Zahorodnii
1e9b961761 tabbox: Reset keyboard focus when grabbing input
When the tabbox grabs input, the key events won't be sent to the client.
It's not good for a couple of reasons: first, it can fool the client into
repeating a previously pressed key; and the server side and the client
side can be out of sync after the task switcher is dismissed.

In order to handle that properly, this change makes the tabbox reset the
keyboard focus when it's shown or hidden. When the task switcher is
dismissed, an enter event will be sent with the current state of the pressed
keys.

Ideally, the same needs to be done with the pointer focus but it's
challenging to achieve with the current input pipeline design. An input
grab abstraction is needed to handle pointer focus when the task switcher
is active.
2024-08-02 06:10:15 +00:00
l10n daemon script
a6fbff465d GIT_SILENT Sync po/docbooks with svn 2024-08-02 01:34:46 +00:00
l10n daemon script
9eec89b375 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-08-02 01:23:06 +00:00
Xaver Hugl
e351d9dca1 backends/libinput: don't apply pointer acceleration to touchpad gestures
It's unexpected that increasing pointer "speed" would also change the distance
required to activate gestures
2024-08-01 09:52:12 +00:00
David Edmundson
99caa54901 core: Introduce explicit weight to InputEventFilter
This is problematic as it means anything requiring a fixed position
in the chain cannot be added or removed at runtime. This is bad for both
performance and code cleanliness as all code ends up input.cpp rather than
where it semantically belongs.

Remaining users that prepend event filters have the problem of the order
being effectively undefined.

This patch adds a weight attribute to the filter allowing filters to be
installed and removed at runtime whilst maintaining a specific deterministic
order.

Currently the order is defined by an enum based on the filter names.
This gives an easy to read explicit order for anyone reading kwin code, but
it is left cast to an int so we have future flexibility.
2024-08-01 08:46:06 +00:00
l10n daemon script
f22ef1f090 GIT_SILENT Sync po/docbooks with svn 2024-08-01 01:36:56 +00:00
l10n daemon script
1fb8b25fe6 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-08-01 01:23:23 +00:00
Vlad Zahorodnii
398cf8df1b Add CursorSource::frame
This fixes not sending frame callbacks for tablet cursors. And in general
this simplifies the code by removing a level of indirection responsible for
communicating the frame timestamps, the Compositor can tell the CursorSource
the frame time directly.
2024-07-31 12:15:48 +00:00
l10n daemon script
ecf7211d2d GIT_SILENT Sync po/docbooks with svn 2024-07-31 01:32:12 +00:00
David Edmundson
0081ede8f1 x11: Ignore all grab notifications for focus handling
On X11 we get focus in and out events for normal input and when grabs
change. Kwin's concept of the active window should only follow the
normal focus changing.

Testing done:
Run Xfreerdp and move the pointer outside the window, the cursor
decoration should not change. It should still be the active window.
2024-07-30 14:54:16 +00:00
Nicolas Fella
2d23b30cee plugins/keynotifications: Optionally ring system bell when using lock keys
BUG: 464457
2024-07-30 14:16:02 +00:00
Vlad Zahorodnii
bc2c5bf43e Fix checking whether GraphicsBufferView is null
If the graphics buffer view is null, GraphicsBufferView::image() will
point to a valid memory location but the QImage at that address is going
to be null.
2024-07-30 14:02:16 +00:00
Nicolas Fella
b1ac04179d plugins/stickykeys: Ring system bell when modifiers are used
BUG: 464456
2024-07-30 15:19:35 +02:00
Nicolas Fella
80b5910594 Add visual bell effect
This effect is used to implement the visual bell accessibility feature.

It allows to implement it on Wayland and significantly improve it on X11,
where it's currently rather broken.

It offers two modes:
- Inverting the colors (code is based off the invert effect)
- Flashing a solid color
2024-07-30 15:19:35 +02:00
Michael Weghorn
14a10b3b4b Add Window.captionNormal property
Make the window caption without suffix available in
the scripting API by adding a `captionNormal` property.

Update the doc for the `caption` property to mention that
`captionNormal` can be used to get the caption without
added suffix, instead of suggesting to call a getter with
a bool param that was dropped in

    commit f0652970f4
    Date:   Sun Aug 20 09:35:15 2017 +0200

        Drop boolean parameter from AbstractClient::caption
2024-07-30 12:04:56 +00:00
Nate Graham
f015b73a48 Loosen minimum screen size detection code for output scale calculation
We return early for screens with physical height reported as ≤ 0mm.

However some extremely dumb screens report a value for their height
greater than zero but absurdly small, causing the scale calculator to
go ballistic. Theoretically this could happen for widths, too.

Let's loosen the detection to flag a physical screen size as invalid if
either its width or height is less than 3mm. There is no screen that
can possibly make sense to exist at this physical size given the angular
resolution of the human eyeball. And if for some reason it does, 100%
scale is fine for it.

BUG: 490777
FIXED-IN: 6.2.0
2024-07-30 03:16:01 +00:00
l10n daemon script
93e794435f GIT_SILENT Sync po/docbooks with svn 2024-07-30 01:35:23 +00:00
l10n daemon script
d41e0ca127 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-30 01:24:58 +00:00
Joshua Goins
34c2a36000 ButtonRebindsFilter: Support keyboard modifiers with mouse buttons
This is needed to better support emitting mouse button events when
pressing tablet buttons. It's common in many art programs that an action
is tied to a mouse button + a modifier, such as panning the canvas. So
being able to send keyboard modifiers in tandem with mouse buttons is
very useful when rebinding.

Tests are added for this new feature.

CCBUG: 469232
2024-07-29 15:46:44 +00:00
Xaver Hugl
d01e20b6a9 activation: don't add the active window to should_get_focus list
The matching X11 focusIn event will never arrive, and so the window is stuck
in the list and messes with activation until it's no longer the active window
and then active later again

BUG: 484155
2024-07-29 11:15:21 +00:00
l10n daemon script
1bc989a260 GIT_SILENT Sync po/docbooks with svn 2024-07-29 01:32:52 +00:00
l10n daemon script
f6ad3c6e0f GIT_SILENT Sync po/docbooks with svn 2024-07-28 01:33:56 +00:00
l10n daemon script
6f00b56d10 GIT_SILENT Sync po/docbooks with svn 2024-07-27 01:33:47 +00:00
Xaver Hugl
457b3a47ff core/renderloop: don't move the target presentation timestamp back when rescheduling
Re-doing the frame scheduling for an already scheduled composite cycle was meant to
adjust to small timing changes in the presentation timestamp, but if the expected
compositing time was close to vblank, it could happen that this would instead move
the target presentation timestamp and effectively drop a frame.

To fix that, this commit makes the presentation timestamp be adjusted only to be more
accurate, but still target the same vblank interval.

BUG: 488843
2024-07-26 12:59:47 +00:00
Xaver Hugl
d0f0481860 core/renderloop: fix triple buffering hysteresis
The way it was implemented it only changed the target pageflip, but not the time at which
KWin would start compositing, which could make it skip scheduling a frame for each second
vblank and drop the refresh rate to half of what it should be that way

CCBUG: 488843
2024-07-26 12:59:47 +00:00
Xaver Hugl
d12a93f9fb scene/itemrenderer_opengl: reset OpenGL state for YUV conversion back to RGB
Otherwise, effects or other OpenGL code that doesn't explicitly set those will get
wrong results
2024-07-26 10:59:31 +00:00
l10n daemon script
8cf48dc6ec GIT_SILENT Sync po/docbooks with svn 2024-07-26 01:27:54 +00:00
Nicolas Fella
e3ad1fa04f plugins/stickykeys: Disable when two keys are pressed
BUG: 464453
2024-07-25 14:22:17 +02:00
l10n daemon script
7d3f58d0ca GIT_SILENT Sync po/docbooks with svn 2024-07-25 01:29:06 +00:00
David Edmundson
374d859493 xwayland: Only update keyboard modifers for XWayland's keys
KeyboardInterface is a multiplexer, it has a global state to kwin
that forwards events the single focussed window.

XWayland also forwards events to clients, but uses the keyboard interface.
It has some overloads that take a specific client, this was used for key events
but not modifiers.

The end result was not only that XWayland could miss a modifier update, but
also that wayland clients would get modifier updates out of order.
Key events must come first.

BUG: 490270
2024-07-24 15:57:21 +00:00
David Edmundson
b0a5918db9 effects/logout Avoid caching animation duration
This is problematic as then we do not catch changes to animation speed
settings, it also doesn't make the code more readable when it's
only used in one place.

BUG: 490703
2024-07-24 15:09:45 +00:00
Harald Sitter
ab579ad549 killer: write application-not-responding metadata and ABRT the process
this allows the crash handling infrastructure to detect ANR cases and
handle them separately from regular crashes
2024-07-24 13:04:49 +00:00
Vlad Zahorodnii
a83cd5bf2f Simplify Placement::placeMaximizing()
Window::maximize() maximizes the window regardless of size constraints.
If the window can't be maximized, just fallback to the default (centered)
placement policy.
2024-07-24 06:23:28 +00:00