ButtonPressEvent::state includes keys and buttons prior to the button
press has been generated.
On the other hand, it appears that QMouseEvent::buttons() should include
currently pressed buttons, i.e. the button that has been just pressed
should be in that bitfield.
This is important for QQuickDeliveryAgent, which checks
QMouseEvent::button() and QMouseEvent::buttons() to decide whether to
send the button event only to tap handlers or both tap handlers and
mouse areas.
BUG: 476653
With kernel 6.6+, HOTSPOT_X and HOTSPOT_Y are exposed on the cursor plane
in virtual machines, so the fallback to the legacy API is no longer needed.
At some point in the future, the list of virtual machine drivers can be
dropped entirely.
The shake detector is mistriggered by sporadic pointer movement when the
cursor is pushed back by a screen edge.
As a way to prevent it, this change adds a bounding rectangle
constraint. The cursor will move chaotically within a small bounding
rectangle if it's pushed back. So it should be enough to just check
the length of the diagonal.
The code for placeSmart uses ints to store coordinates and dimensions,
but the various methods of QRectF return qreal types, which can be
non-integers under fractional scaling, causing multiple issues.
This commit explicitly converts the needed quantities to ints,
avoiding the issues.
Previously, the code relied on the assumption that
y = area.y() + area.height(); implies !(y < area.y() + area.height()).
This doesn't always hold when mixing qreals and ints, causing infinite loops
under fractional scaling when attempting to open large windows, as
reported in BUG 477820.
This commit also extends the fix in 5502ce9 to fractional scaling scenarios.
The ceiling of client widths and height is used, instead of the implicit
floor, which caused BUG 477886.
BUG: 477820
BUG: 477886
The initial value was being initialized to true despite the setting
being off by default, and the default checker was highlighting when it
was false, not when it was true.
BUG: 477329
FIXED-IN: 6.0
Makes it possible to easily target things in a window near your panel edge,
without bringing up your panel.
The `m_client` condition this MR removes appears to have been added solely to make autohiding panels appear instantly. See c4140d6f4e.
BUG: 267277
Indent target_link_libraries of kwin to improve code readability. As is,
PUBLIC and PRIVATE blend with target names and therefore they are harder
to spot.
Backends dependending on the wayland server is not great, it makes them
less reusable and creates a strict instantion order that doesn't fully
make sense.
The shift key doesn't make sense to be one of the keys that will trigger
KWin to allow XWayland apps to process all keys when it's pressed,
because there aren't generally global shortcuts that consist of Shift
plus an alphanumeric character key. That's because this key combination
is used to type capital letters.
So we can safely exclude the shift key to improve security against key logging and not break any global
shortcut-using XWayland apps for people using this feature.
The shift key on it's own is still forwarded as that's a non-character key.
We need to be careful about the target rect when painting a hidpi image
onto a lodpi image.
This is the case when the startup feedback generates bouncing frames.
The icon pixmap may be hidpi, while the result image has device pixel
ratio 1.