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
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
Window::maximize() maximizes the window regardless of size constraints.
If the window can't be maximized, just fallback to the default (centered)
placement policy.
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
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
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.
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
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.
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.
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.
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.
- 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
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
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.
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.
On a lot of hardware, using bigger plane sizes than necessary means wasting power.
This is specifically problematic with the cursor plane, where we so far only had a
single fixed size hint through drm caps, even though the hardware often could use
a smaller cursor size.
This adds support for the per-plane SIZE_HINTS property, which allows us to pick a
smaller cursor size when the cursor image fits into it, and should save some power
that way.
Usually, only a small subset of cursors would be used, for example the
default shape, the pointer shape, the text shape, etc.
Another reason why this change makes the KXcursorTheme load cursors on
demand is to prepare the cursor loading machinery to SVG cursors.
Both kwin and plasma have different placement strategies during interactive
move resize. That can result in the window flipping between two positions.
In order to prevent that, this change makes kwin placement take precedence
over the window position specified using the plasmashell protocol. This can
be considered as a workaround.
BUG: 481829
There's generally a lot of problems with higher than 8bpc in docking stations,
especially when multiple monitors are involved. Until these problems are hopefully
eventually fixed on the driver side, limit the bpc to 8 with docks by default
Otherwise, prePaintPass, postPaintPass and possible future overhead like overlay
plane matching aren't accounted for, which can cause frames to be dropped.
CCBUG: 488782
While they are harmless, they can result in the client repainting more
than needed and resulting in the opposite edge "bouncing" when resizing
the window.
Initialize X11Window::m_client geometry with a proper value so, later, the
X11Window::configure() function can properly determine whether the client
window is resized.
NETWinInfo queries the window state and setState() will do nothing if the
proposed new state matches the cached server side state.
On the other hand, given how the test is structured, there can be pending
fullscreen changes on the kwin side that are yet to be sent to the X server
when the NETWinInfo object is created.
This change fixes that race condition by adding an explicit Xcb::sync().