Commit graph

24820 commits

Author SHA1 Message Date
Vlad Zahorodnii
5ccb543e89 Use flooredPoint() in pointer constraint tests
.toPoint() doesn't work as expected when the pointer has fractional
coordinates and it's near constraint region boundaries.
2023-05-15 07:36:26 +00:00
Vlad Zahorodnii
6c71b87200 wayland: Fix null pointer constraint region handling
If the pointer constraint region is null, the input region must be used
instead. If the pointer constraint region is valid, it should be
intersected with the input region.

BUG: 457021
2023-05-15 07:36:26 +00:00
l10n daemon script
825abf1ca3 GIT_SILENT Sync po/docbooks with svn 2023-05-15 02:21:00 +00:00
l10n daemon script
aa5e8612d0 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"
2023-05-15 02:17:59 +00:00
l10n daemon script
5a287fe37c GIT_SILENT Sync po/docbooks with svn 2023-05-14 02:48:15 +00:00
l10n daemon script
02df2c54a2 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"
2023-05-14 02:42:46 +00:00
Vlad Zahorodnii
e217fda7f0 Fix KScreenIntegration::connectedOutputsHash()
We want to ignore non-desktop outputs, not normal outputs.
2023-05-13 13:28:51 +00:00
Aleix Pol
7580f74d95 aurorae: Fix build with KWIN_BUILD_KCMS=OFF
Moves the KCM into a separate file
2023-05-13 13:48:52 +02:00
Aleix Pol
52a96996f3 Do not look up kcm dependencies if KWIN_BUILD_KCMS=OFF
We are not going to use them anyway...
2023-05-13 13:48:52 +02:00
l10n daemon script
3bfaac45aa GIT_SILENT Sync po/docbooks with svn 2023-05-13 02:21:07 +00:00
David Edmundson
f054ac3d41 Fix build against qt dev 2023-05-12 10:16:39 +00:00
Vlad Zahorodnii
467a1b3b49 Move cursor delegates to scene/
They've been overlooked.
2023-05-12 07:01:35 +00:00
Vlad Zahorodnii
07da1796b8 Revert "wayland: Avoid pointer warp if constraint region is invalid"
This reverts commit 7c91c4bad9.

It created regressions in some video games. After a closer look at the
pointer constraint region handling, there are some issues, but it might
be safer to fix them in master.

In meanwhile, let's revert 7c91c4bad because it breaks more things than
it fixes.

CCBUG: 457021
BUG: 469555
2023-05-11 22:56:32 +03:00
l10n daemon script
16ee683a64 GIT_SILENT Sync po/docbooks with svn 2023-05-11 02:22:17 +00:00
l10n daemon script
fd67dd7b89 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"
2023-05-11 02:19:09 +00:00
Xaver Hugl
8229573e63 autotests/drm: add a test for doing modesets
And fix an issue preventing it from working
2023-05-10 16:29:54 +00:00
Vlad Zahorodnii
9af9e93ef6 backends/{wayland,x11}: Remove unused args 2023-05-10 17:41:03 +03:00
Vlad Zahorodnii
37aef0c015 Take cursor surface offset into account
From the spec

    On surface.attach requests to the pointer surface, hotspot_x
    and hotspot_y are decremented by the x and y parameters
    passed to the request. Attach must be confirmed by
    wl_surface.commit as usual.

In practice, I don't think it matters that much as most toolkits use
wl_pointer.set_cursor to change the hotspot.
2023-05-10 13:09:49 +00:00
Vlad Zahorodnii
1541e35362 Don't assume SurfaceCursorSource has wl_shm buffer
The SurfaceCursorSource assumes that the cursor surface has a wl_shm
buffer attached to it, which is a bad assumption, as the client can
attach a buffer of any type to the surface. Furthermore, the cursor
surface can have custom transforms applied to it, for example a
wp_viewport, which current code fails to handle.
2023-05-10 15:40:59 +03:00
Vlad Zahorodnii
dbce106031 wayland: Grab the contents of cursor scene 2023-05-10 15:40:59 +03:00
Vlad Zahorodnii
76e911d2cc Drop ImageCursorSource
The ImageCursorSource used to be primarily a porting aid. That is, if we
couldn't port some code to SurfaceCursorSource or ShapeCursorSource, the
ImageCursorSource was used in interim. Now, all parts of kwin have been
ported to ShapeCursorSource and SurfaceCursorSource, so the image cursor
source can be dropped.
2023-05-10 15:40:59 +03:00
Vlad Zahorodnii
3d5b5844d0 Drop Cursor::image()
Use CursorSource::image() instead.

Cursor caching in the ScreenCastStream has been changed so
QImage::cacheKey() is not being used. This is rather a preparation for
making kwin grab the contents of the cursor scene.
2023-05-10 11:56:20 +00:00
Vlad Zahorodnii
af7c1db43b backends/drm: Drop DrmAbstractOutput::regionToRects() 2023-05-10 11:07:23 +00:00
Vlad Zahorodnii
b7a9d00752 backends: Prefer Output::modeSize() over Output::pixelSize()
Output transforms are handled differently, so let's use modeSize() to
pick the buffer size consistently.
2023-05-10 11:07:23 +00:00
Xaver Hugl
a48c98f5ab xcbutils: fix nativeFloor
The floor was not done in the X-native coordinate space but with double
scaling

BUG: 459373
2023-05-10 10:52:51 +00:00
Nicolas Fella
dd604c8e42 [plugins/stickykeys] Unlatch keys when deactivating sticky keys
Otherwise when deactivating sticky keys while a modifier is latched
it will stay latched forever with no way to unlatch
2023-05-10 10:37:26 +00:00
Nicolas Fella
1187f3c624 [plugins/stickykeys] Fix config group check
We are comparing the wrong group name, breaking reacting to config changes
2023-05-10 10:14:29 +00:00
Vlad Zahorodnii
04a592ff66 plugins/screencast: Remove "frame dropped" log messages
They can be safely ignored, so remove them to avoid spamming the logs.
2023-05-10 09:11:42 +00:00
Vlad Zahorodnii
00e536f22a Drop EglDisplay::supportsSwapBuffersWithDamage()
It's unused.
2023-05-10 11:34:19 +03:00
l10n daemon script
920165c187 GIT_SILENT Sync po/docbooks with svn 2023-05-10 02:26:41 +00:00
l10n daemon script
47cb5c144e 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"
2023-05-10 02:21:31 +00:00
Vlad Zahorodnii
75f79618e9 backends/x11: Remove GLFramebuffer::pushFramebuffer()
It's unbalanced and the scene is responsible for pushing the fbo now.
2023-05-09 16:42:15 +00:00
Vlad Zahorodnii
380aaab2cc Fix deleting GraphicsBuffer twice
When GraphicsBuffer::dropped() is emitted, the buffer can be
unreferenced. If that's the case, the GraphicsBuffer will be deleted
twice: first in GraphicsBuffer::unref(), the second time in drop().

In order to address the issue, this change gets rid of the
GraphicsBuffer::dropped() signal, so it's always guaranteed that the
buffer stays alive until the reference count is checked.

The GraphicsBuffer::dropped() signal is used to remove the mapping
between wl_resource and ShmClientBuffer when the corresponding
wl_shm_buffer object is destroyed. On the other hand, we could perform
such cleanup when calling drop() too. This code can be further improved
by reimplementing wl-shm, which we need to do at some point in the
future.
2023-05-09 16:29:00 +00:00
Vlad Zahorodnii
4b2568bdcf backends/virtual: Port to ShmGraphicsBufferAllocator 2023-05-09 16:18:56 +00:00
Vlad Zahorodnii
b0bdffe08f backends/x11: Avoid rendering to buffers held by Xorg
Otherwise it's possible to see visual artifacts.
2023-05-09 16:07:20 +00:00
Vlad Zahorodnii
13d1b8b16f backends/x11: Port to ShmGraphicsBufferAllocator 2023-05-09 16:07:20 +00:00
Xaver Hugl
f60bcfb646 handle laptop lid closing in KWin
Instead of KScreen turning the display off, do that in KWin directly
2023-05-09 15:18:33 +00:00
Xaver Hugl
6e9d5c2cc3 autotests: directly call setVirtualOutputs 2023-05-09 15:18:33 +00:00
Vlad Zahorodnii
e34ded34f0 backends/wayland: Avoid rendering to buffers held by the compositor
Currently, the wayland backend does not monitor when its buffers are
released by the host compositor, which can potentially result in
glitches.

This change refactors the wayland backend so the swapchain buffers are
released upon receiving wl_buffer.release event.

wl_buffer.release event handling lives in the WaylandBackend. This
allows us to share some code, it might also be useful for implementing
direct scanout as any GraphicsBuffer providing dmabuf or shm attributes
can be wrapped in a wl_buffer.
2023-05-09 14:58:55 +00:00
Vlad Zahorodnii
88c35ab5fe Drop PointerInterface::cursor() getter 2023-05-09 13:19:42 +00:00
Xaver Hugl
4f9f73e28d utils/edid: use libdisplay-info 2023-05-09 10:52:04 +00:00
Vlad Zahorodnii
1d1ccc3770 autotests: Rework _KDE_NET_WM_SCREEN_EDGE_SHOW test 2023-05-09 08:16:53 +00:00
Xaver Hugl
fdf89fd11a activities: check nullptr after the cast 2023-05-09 09:18:49 +02:00
l10n daemon script
755e8a5c64 GIT_SILENT Sync po/docbooks with svn 2023-05-09 02:39:12 +00:00
l10n daemon script
d5a52be6d7 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"
2023-05-09 02:28:24 +00:00
Nate Graham
059fade8e2 tabbox: Implement some more VDG feedback for Thumbnail Grid
Use a ToolButton rather than a Button for the close icon to reduce
unnecessary visual weight, and move it outwards so that its frame
touches the inner edge of the selection rectangle. Looks a bit nicer and
less attention-getting.
2023-05-08 16:46:59 +02:00
Nate Graham
07279bf541 tabbox: make Thumbnail Grid active item's text bold
This makes it follow a common KDE convention of using bold text to
indicate which item in a set is active or current. Doing it here too
helps direct visual attention to the selected item, improving speed of
interaction.
2023-05-08 16:00:08 +02:00
Nate Graham
3ca1fc800d Make "Thumbnail Grid" the default Task Switcher and make it live here
Per https://invent.kde.org/plasma/plasma-desktop/-/issues/53, we're
making an overhauled version of the Thumbnail Grid Task Switcher the
default one in Plasma 6.

Currently the default Task Switcher is specified as the "Breeze" Task
Switcher which isn't ideal since it doesn't live in this repo, and it's
possible to use KWin without Plasma, where it does live.

So as a part of making Thumbnail Grid the new default Task Switcher,
let's also move it here so that KWin's default Task Switcher is always
available.

This commit grabs the Thumbnail Grid Task Switcher verbatim from where
it currently lives in the kdeplasma-addons-repo as of commit
54d16f44a56530854444b844536933a3107ef8a6.

BUG: 433034
FIXED-IN: 6.0
2023-05-08 12:12:15 +00:00
Vlad Zahorodnii
805c899589 wayland: Validate serial of wl_pointer.set_cursor 2023-05-08 10:12:04 +00:00
Vlad Zahorodnii
8f928e6ac9 wayland: Port tablet cursor to {Shape,Surface}CursorSource
Currently the tablet cursor doesn't use SurfaceCursorSource because it
doesn't handle changing the surface size after the set_cursor request.

This change adds missing surface commit handling in the
SurfaceCursorSource so the tablet cursor can use it. As a side effect,
the pointer interface doesn't need to track surface commits anymore.
2023-05-08 10:12:04 +00:00