Commit graph

27227 commits

Author SHA1 Message Date
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
l10n daemon script
3f698ab446 GIT_SILENT Sync po/docbooks with svn 2024-07-24 01:28:22 +00:00
Xaver Hugl
b0a8294b05 autotests: test placement to always put the titlebar on the screen
CCBUG: 489500
2024-07-23 16:16:25 +02:00
Xaver Hugl
d548ade3a6 placement: keep the titlebar in the screen with centered placement
...even if the window is larger than the screen.

BUG: 489500
2024-07-23 16:02:51 +02:00
Xaver Hugl
0e25405151 placement: don't overwrite scheduled position change in cascadeIfCovering
As it used the frame geometry, the check for covering windows was sometimes wrong,
and additionally overwrite changes to the window position Placement had made before,
which could end up with the window origin wrongly not being put inside of the screen
in some cases.

CCBUG: 489500
2024-07-23 16:02:51 +02:00
Vlad Zahorodnii
02fbeeae78 Make Workspace::desktopResized() reassign outputs of uninitialized windows
If an output is deleted, the Workspace::desktopResized() is going to
re-assign windows to the new outputs. It is done so so the workspace
re-arrangement procedure is deterministic and has concrete order.

However, with the current Window lifecycle management, it's possible
to encounter the follwing case:

- xdg_toplevel gets created on output A
- xdg_toplevel initial state is committed
- output A is removed
- a wl_buffer is attached to the xdg_toplevel, which results in a
  geometry change and an output change
- Window::setMoveResizeOutput() is called, but the previous output
  is a dangling pointer

CCBUG: 489632
2024-07-23 13:46:06 +00:00
Devin Lin
b87096cb27 screenedge: Increase touch border from 3px to 8px
We are currently using the touch border to activate the task switcher, but it's almost impossible to activate on a phone screen. We used to use 8px (invisible panel) when the task switcher was implemented in plasmashell, I think that can work here.
2024-07-23 13:16:45 +00:00
David Edmundson
6943fab2c1 wayland: Avoid klipper loop with existing but empty clipboards
In default settings if the clipboard or selection is empty klipper will try to
replace it with cached data.

To avoid an occurring race condition if a client deletes and then recreates a
selection kwin will deny klipper if another mimedata is present at the time
it tried to replace an empty clipboard.

Klipper also considers the presence of a valid mime data without any offers
to be an empty clipboard, whereas kwin did not.

If a super weird client set the clipboard to a valid entry with no offers,
klipper would get into an infinite loop of trying to set it's own selection
for it to be continually denied with no other valid offer from klipper's perspective
ever received.

BUG: 469644
2024-07-23 12:50:06 +00:00
Xaver Hugl
32b117dbd8 core/renderbackend: remove unused parent object
As the render backend is always stored in a unique pointer, using a Qt parent
might even cause crashes
2024-07-23 12:29:24 +00:00
Nicolas Fella
32c696b45e Expose input device group on DBus
This is useful to combine tablet pen and pad devices into one logical device
2024-07-23 13:33:41 +02:00
David Redondo
e0202c7531 Include span
This is needed on some compilers like g++ 11.
2024-07-23 07:34:57 +00:00
Vlad Zahorodnii
2ec45f33d1 backends/drm: Fix a crash in DrmGpu::releaseBuffers()
Currently, the code assumes that the primary and the cursor layers are
always present. However, it's not guaranteed if the render backend cannot
be recreated. Specifically:

- the Compositor destroys the EglGbmBackend. The egl gbm backend, in its
  turn, resets the primary and the cursor layers to null
- the Compositor tries to create the EglGbmBackend but that fails so it
  is destroyed. EglGbmBackend::~EglGbmBackend() calls DrmGpu::releaseBuffers(),
  but it hits an unexpected null primary layer.

Normally, the primary and the cursor layers would be created when the
Compositor successfully creates the WorkspaceScene. Since the RenderBackend
fails to initialize, the WorkspaceScene is not created and the DrmGpu
doesn't recreate the layers.
2024-07-23 06:22:20 +00:00
Joshua Goins
59699402ad ButtonRebindsFilter: Set cursor position when rebinding tablet events
Since the tablet cursor and the mouse cursor is tracked separately,
rebinding a tablet button to a mouse click is sort of wonky. For
example, if you assign it to Right Click and attempt to open a context
menu it will appear to open in the wrong place.

So before we send the mouse button event, set the mouse position to
the tablet cursor position. A test is added to ensure this functionality
works as intended and doesn't regress.
2024-07-23 01:36:33 +00:00
Joshua Goins
fd670453e5 ButtonRebindsFilter: Modify testBindingTabletTool to use proximity
This is to not destroy the tablet state for the next test (which is
added in the next commit.) We could also explicitly do a tablet tool
up/down dance here, but all we need is the tablet tool to be in
proximity for the tablet button event to fire.
2024-07-23 01:36:33 +00:00
l10n daemon script
423a3e8b44 GIT_SILENT Sync po/docbooks with svn 2024-07-23 01:31:41 +00:00
l10n daemon script
0af007b462 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-23 01:20:56 +00:00
Joshua Goins
abc6dae6df ButtonsRebindFilter: Add tests for the tablet binding types
This adds autotests for binding to tablet pad and tool buttons, which
was previously untested. Of note is that we don't explicitly test mouse
buttons, which is already tested in the other functions.
2024-07-22 20:39:19 -04:00
Joshua Goins
b89f85f46d Add testing infrastructure for virtual tablet pad and tools
This is for the ButtonRebindFilter tests, but this could be useful
in other places too.
2024-07-23 00:38:36 +00:00
Joshua Goins
0ea1bcfe89 ButtonRebindsFilter: Add test for disabled bindings
This was missed when it was first implemented, but now there's tests for
checking if bindings can be disabled in the buttons rebind plugin.
2024-07-23 00:38:36 +00:00
Joshua Goins
47a538e61c ButtonRebindsFilter: Add test for mouse button binding
This was missed when it was first implemented, but now there's tests for
checking the mouse binding functionality in the buttons rebind plugin.
2024-07-23 00:38:36 +00:00
Ismael Asensio
ac5c175ade kcms/rules: Some QML clean-ups
- Remove unnecessary bindings to enabled: Properties that are not
  enabled are not shown in the list anyway, and it fixes QML warnings:

  RuleItemDelegate.qml:16:5: Unable to assign [undefined] to bool
  RuleItemDelegate.qml:93:17: Unable to assign [undefined] to bool

- Remove unnecessary colorSet
- Port away from javascript `var`
- Remove outdated comment
2024-07-22 12:46:29 +02:00
Ismael Asensio
0bd722e84b kcms/rules: Add a placeholder for properties filter
The list to add properties can be empty because no entry matches
the filter text or if all the properties have been already added.

Show a placeholder instead of leaving the view just empty
2024-07-22 12:46:29 +02:00
Ismael Asensio
9098fd4910 kcms/rules: Make the "Add Property" button non-toggleable
Changing the text and meaning of the button unexpectedly for a
regular operation is not consistent with any other place, and
disregarded by the HIG.

The sheet can be closed by tapping outside of it, or throught
the close button in its titlebar, as usual elsewhere.
2024-07-22 12:46:29 +02:00
Ismael Asensio
893bffd572 kcms/rules: Reuse items on the property selection ListView
This makes scrolling the list view much more responsive as there
is no need to create new delegates

BUG: 449275
FIXED-IN: 6.2
2024-07-22 12:46:29 +02:00
Ismael Asensio
90dbeef1d6 kcms/rules: Increase the default dialog size
This KCM is usually called via the application menu, which uses
kcmshell, so it doesn't benefit from the SystemSettings minimum size.

Slightly increse its height, so there is more space for properties
in the list views, either to configure them or to add them, so it
feels less cramped.
2024-07-22 12:46:29 +02:00
l10n daemon script
b9ace07d74 GIT_SILENT Sync po/docbooks with svn 2024-07-22 01:31:18 +00:00
l10n daemon script
1bf7018634 GIT_SILENT Sync po/docbooks with svn 2024-07-21 01:30:24 +00:00
l10n daemon script
0c6e458423 GIT_SILENT Sync po/docbooks with svn 2024-07-20 01:28:34 +00:00