Commit graph

26379 commits

Author SHA1 Message Date
Vlad Zahorodnii
2c7301b3ee Make Window::interactiveMoveOffset() relative
Window::interactiveMoveOffset() stores the move offset in pixels, but it
is somewhat annoying to deal with when the window size changes, for example
when the window is unmaximized.

This change makes Window::interactiveMoveOffset() store a ratio where
the move offset can be found. This simplifies the code a bit and fixes
the cursor jumping to the topleft window corner. Although there are other
glitches.

CCBUG: 449105
2024-03-11 20:16:10 +00:00
Xaver Hugl
656313455b backends/drm: work around amdgpu vrr cursor bug differently
Instead of not-delaying cursor updates with adaptive sync, this forces a
software cursor instead. That way, the functionality works the same on all
the vendors.

For testing potential driver fixes, the environment variable
KWIN_DRM_DONT_FORCE_AMD_SW_CURSOR=1 can be used to disable this workaround
2024-03-11 19:56:43 +00:00
Yifan Zhu
380795423d xkb: always update keysym
Previously m_keysym was only updated on key press. This caused issues
when multiple keys are pressed at the same time. E.g., if the user
presses A, presses B, releases A, releases B, the actual events sent by
kwin was A pressed;  B pressed; B released; B released.

Also call xkb_state_update_key after xkb_state_key_get_one_sym, as
recommended by the libxkbcommon documentation
2024-03-11 15:29:02 +00:00
Yifan Zhu
92d29ed7f0 kcms/screenedges: add keywords for edge/corner barriers 2024-03-11 15:11:06 +00:00
Yifan Zhu
681752ada1 xkb: fix testing if on keypad
XKB_KEY_KP_9 is 0xffb9 while XKB_KEY_KP_Equal is 0xffbd and XKB_KEY_F1
is 0xffbe. So XKB_KEY_KP_Equal, instead of XKB_KEY_KP_9, has the maximum
keysym for keypad keys.
2024-03-11 07:47:58 -07:00
Marco Martin
609833e880 Properly intersect the shape with clipRect
That for loop in the end didn't have any effect,
actually compute the final region and return that one
2024-03-11 11:56:21 +00:00
David Edmundson
9302e84b95 wayland: Revert send pointer leave on drag
This was changed to match the behaviour of other compositors.
However what kwin did before is more sensible.

Sending a leave event breaks cursor updates by design. See
https://gitlab.freedesktop.org/wayland/wayland/-/issues/444
2024-03-11 11:32:35 +00:00
David Edmundson
044c9f0154 wayland: Only send artificial mouse up events for xwayland drags
Seat has to handle two types of drags; ones where clients are updated
through data device, and xwayland version where the drag target has
mouse events sents as pointer events. A mechanism to treat them
differently was introduced, but this former xwayland hack was not
included. We also don't need to send frame events when in datadevice
mode.

This reset of pointer state breaks electron.
2024-03-11 11:06:35 +00:00
Vlad Zahorodnii
4d659998d4 autotests: Make cursor-shape-device-v1 factory function return a std::unique_ptr 2024-03-11 08:52:10 +00:00
Vlad Zahorodnii
46f3c8509c autotests: Make auto-hide-screen-edge-v1 factory function return a std::unique_ptr 2024-03-11 08:52:10 +00:00
Vlad Zahorodnii
a887b737ef autotests: Make idle-inhibitor-v1 factory function return a std::unique_ptr 2024-03-11 08:52:10 +00:00
Vlad Zahorodnii
2922b8d0a7 autotests: Make xdg-toplevel-decoration-v1 factory function return a std::unique_ptr 2024-03-11 08:52:10 +00:00
Vlad Zahorodnii
b4e2241ded autotests: Make factional-scale-v1 factory function return a std::unique_ptr 2024-03-11 08:52:10 +00:00
Vlad Zahorodnii
8a11dde6f2 autotests: Make input panel surface factory function return a std::unique_ptr 2024-03-11 08:52:10 +00:00
Vlad Zahorodnii
98f0af0bc1 autotests: Make wl-subsurface factory function return a std::unique_ptr 2024-03-11 08:52:10 +00:00
Vlad Zahorodnii
f723b11a9a autotests: Make layer shell surface factory function return a std::unique_ptr 2024-03-11 08:52:10 +00:00
l10n daemon script
ad747daf4f GIT_SILENT Sync po/docbooks with svn 2024-03-11 01:20:58 +00:00
Vlad Zahorodnii
670c71f11e Don't block interactive moves by sync requests
The compositor doesn't need to synchronize with the client when moving
windows, except cases like unmaximizing the window. It's needed only
when resizing to avoid overwhelming the client with configure notify events.
2024-03-10 19:07:02 +00:00
Vlad Zahorodnii
93326f3e50 Revert "plugins/zoom: Port to CursorItem"
This reverts commit e40f632c9b.

It broke non default mouse tracking modes. There are just too many
options, so revert the change instead.
2024-03-10 17:44:25 +00:00
Vlad Zahorodnii
af7388c8a3 autotests: Port xdg-shell factory functions to unique_ptr 2024-03-10 17:25:52 +00:00
Vlad Zahorodnii
3f6a4eb1ea plugins/shakecursor: Mark it as internal
The accessibility kcm can be used to enable/disable the shake cursor
plugin and change its other parameters, so hide it in the desktop
effects kcm by default.
2024-03-10 17:12:55 +00:00
Vlad Zahorodnii
47829e6ac3 Remove isWaitingForInteractiveMoveResizeSync() check when interactively moving a window
There's already a check at the start of the function. Although interactive
moves don't need to be synchronized with the client, in general.
2024-03-10 10:43:03 +00:00
l10n daemon script
6435adc9d8 GIT_SILENT Sync po/docbooks with svn 2024-03-10 01:38:05 +00:00
Kristen McWilliam
0bfe7e150a scripting/workspace_wrapper: improve readability
Adds whitespace between documented members of the header file.

Currently the members are all bunched together, making it difficult to
read as one flows directly into the next. This change adds a newline
between each member, making it easier to read.
2024-03-10 01:17:17 +00:00
l10n daemon script
422b6c4f0d 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-03-10 01:13:49 +00:00
Xaver Hugl
0360ce38e2 core/colorspace: fix ColorDescription comparisons
They used the sdr gamut wideness (which should've been removed) instead of
the sdr colorimetry

BUG: 482809
2024-03-09 15:57:36 +01:00
Vlad Zahorodnii
277701e99f scene: Inherit scene from the parent item
It makes Item API more ergonomic.
2024-03-09 11:18:21 +00:00
l10n daemon script
c1311abfc1 GIT_SILENT Sync po/docbooks with svn 2024-03-09 01:26:57 +00:00
l10n daemon script
05dc255048 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-03-09 01:15:34 +00:00
Yifan Zhu
2e5d3253d4 screenedge: allow creation between screens on wayland
Allow the creation of screen edges bordering two screens. This allows
panels in auto-hide/dodge-windows mode to work when the panel is
positioned between two edges.

Don't change the X11 behavior since edge barrier is not supported on
X11, without which it is virtually impossible to exactly position the
cursor on the pixel to activate the edge.

BUG: 351175
2024-03-08 12:03:28 -08:00
Yifan Zhu
ad13765348 pointer_input: implement edge barrier between screens
Allow users to configure a virtual edge barrier between screens.
The pointer will only cross over to the other screen after the distance
travelled surpasses edgeBarrier.

Reduce the speed during interactive moveresize, at edges that trigger,
and at the corner.

Only supports wayland. Doesn't have X11 support since it is far too
complicated there.

BUG: 416570
BUG: 451744
2024-03-08 12:03:28 -08:00
Yifan Zhu
ea4fa87bc6 utils/xcbutils: Don't call toXNative with unsigned integer
Instead use signed integers, to prevent the implicit cast from unsigned
integers to qreal.

BUG: 482687
2024-03-08 19:25:39 +00:00
Xaver Hugl
b19426879f opengl/openglcontext: fix capitalization of isOpenGLES 2024-03-08 17:26:54 +00:00
Xaver Hugl
2f3b05e733 opengl: move "isOpenGLES" from eglutils to eglcontext and rename it
It's named in a confusing way and only used in eglcontext
2024-03-08 17:26:54 +00:00
Xaver Hugl
179af074eb opengl/glframebuffer: move s_fbos to OpenGlContext 2024-03-08 17:26:54 +00:00
Xaver Hugl
493797ff31 opengl: move extension function resolving and debug output into OpenGlContext 2024-03-08 17:26:54 +00:00
Xaver Hugl
7618be3697 opengl/glplatform: remove dependency on OpenGlContext 2024-03-08 17:26:54 +00:00
Xaver Hugl
605401dcfc opengl: move glsl version to OpenGlContext 2024-03-08 17:26:54 +00:00
Xaver Hugl
c5cd8d1318 port most uses of GLPlatform::isGLES to use OpenGlContext directly 2024-03-08 17:26:54 +00:00
Xaver Hugl
5aa2606f04 opengl/glplatform: remove GLPlatform::supports method
There's only one "feature" left, so the method for it can be used instead
2024-03-08 17:26:54 +00:00
Xaver Hugl
c41da588f6 opengl: move timer query detection to OpenGLContext 2024-03-08 17:26:54 +00:00
Xaver Hugl
568da29fbf opengl: move pack invert detection to OpenGlContext 2024-03-08 17:26:54 +00:00
Xaver Hugl
a8b9e8d262 opengl: remove most of glutils 2024-03-08 17:26:54 +00:00
Xaver Hugl
bb0d1fc45e opengl: move static vertex buffer variables to OpenGlContext 2024-03-08 17:26:54 +00:00
Xaver Hugl
f98477e05b opengl/glframebuffer: move static variables to OpenGlContext 2024-03-08 17:26:54 +00:00
Xaver Hugl
1b4a9abbe3 opengl/gltexture: remove all the static things
The static fbo is removed, and the rest is moved to OpenGlContext
2024-03-08 17:26:54 +00:00
Xaver Hugl
feeacf37db opengl: require support for fbos
It's effectively required already, as they're used everywhere
2024-03-08 17:26:54 +00:00
Xaver Hugl
e763cd9eec opengl: remove the global shadermanager instance 2024-03-08 17:26:54 +00:00
Xaver Hugl
1b21b08130 opengl: move shader manager getter to OpenGlContext 2024-03-08 17:26:54 +00:00
Nate Graham
7ff51ba47c Raise target mobile device DPI
A target mobile DPI of 135 is rather low and results in excessively
large scale factors, so everything is too big.. Let's raise it a
little bit to improve the default level of information density on
these devices that are designed to be held close to the face.

This has the effect of changing the calculated default scale factor for
the following devices:

| Device     | Device DPI | Old scale factor | New scale factor |
| ---------- | ---------- | ---------------- | ---------------- |
| Steam Deck | 204        | 1.5              | 1.25             |
| PinePhone  | 268        | 2.0              | 1.75             |
| OnePlus    | 388        | 3.0              | 2.5              |

Devices are taken from the autotest data found at
https://invent.kde.org/plasma/kscreen/-/blob/master/tests/kded/configs/AutogeneratedMobileScreenScales.json
2024-03-08 17:14:16 +00:00