Commit graph

24792 commits

Author SHA1 Message Date
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
l10n daemon script
d300c7a024 GIT_SILENT Sync po/docbooks with svn 2023-05-08 02:28:51 +00:00
l10n daemon script
1cf8d46b12 GIT_SILENT Sync po/docbooks with svn 2023-05-07 02:36:13 +00:00
Ismael Asensio
e0ba7b4086 TabBox: Fix automatically hiding initialization
It was initialized to different values in the header and
in the constructor. Let's remove one of them to avoid
the confusion

AMENDS: 9d8d7e28a1
BUG: 469412
FIXED-IN: 6
2023-05-06 16:29:01 +02:00
Vlad Zahorodnii
39d269008f Avoid rounding coordinates of motion events more 2023-05-06 06:43:08 +00:00
l10n daemon script
fdae03ee62 GIT_SILENT Sync po/docbooks with svn 2023-05-06 02:41:18 +00:00
Vlad Zahorodnii
16e46e19e0 wayland: Avoid losing precision in tablet events
globalPos() is rounded version of globalPosF().
2023-05-05 20:54:37 +03:00
Ismael Asensio
9d8d7e28a1 TabBox: Allow switchers to handle the tabbox hiding
Previously, the switcher item got hidden immediately after
selecting a window, so it wasn't possible to show an exit
transition.

Emit instead an `aboutToHide` signal and let the switchers
that opt-in to handle when to hide the tabbox by just setting
its `visible` property to `false`. In the default case we handle
that signal by immediately hiding the tabbox as usual.

For symmetry, add also a new `aboutToShow` signal which
simplifies setting an enter transition.
2023-05-05 18:40:35 +02:00
Nate Graham
98198dc77a tabbox: fall back to "compact", not "informative"
Informative is being deleted in Plasma 6 because it's worse than
Compact; see
https://invent.kde.org/plasma/plasma-desktop/-/issues/63#note_592077
2023-05-05 15:57:09 +02:00
Vlad Zahorodnii
d2b0ed0c5a wayland: Implement wl_surface.preferred_buffer_scale and wl_surface.preferred_buffer_transform
The new events provide a way to tell the client what buffer scale and
buffer transform to use as they may lack the context to make a proper
decision.
2023-05-05 12:52:32 +00:00
Vlad Zahorodnii
cad72753f0 wayland: Rename SurfaceInterface::preferredScale to preferredBufferScale
This is to match the wording in the core spec.
2023-05-05 12:52:32 +00:00
Nicolas Fella
53d19fbb9a Implement sticky keys on Wayland
Sticky keys allow to trigger key combinations one key at a time.

This is an accessibility feature used by people that cannot press
multiple keys simultaneously.

On X11 this is handled by the X server, configured via kaccess.

On Wayland we get to handle this ourselves.

wl_keyboard events already carry the modifier's latched/locked state, so
all we need to do is to
make sure the right state is set

Xkb gains a new method to set the state. The business logic is
implemented in a new plugin
that filters for keys and sets the Xkb state accordingly.

BUG: 444335
2023-05-05 12:05:17 +00:00
Vlad Zahorodnii
e6b5cf283e core: Batch pointer input device events
This change introduces InputDevice::pointerFrame(). The main motivation
behind it is to allow batching multiple pointer events within a single
event frame.

BUG: 454428
2023-05-05 10:27:08 +00:00
Vlad Zahorodnii
60205c1348 backends/wayland: Fix wl_seat version
It should be 5.
2023-05-05 10:27:08 +00:00
Ismael Asensio
a9a58b1ed5 Port usage of kcmshell5 to kcmshell6
Just two instances:
- in useractions for the menu action "Configure Window Manager"
- in the docbook about the key shortcuts
2023-05-05 09:22:55 +00:00
Vlad Zahorodnii
7c91c4bad9 wayland: Avoid pointer warp if constraint region is invalid
It may happen that the constraint region doesn't include the specified
cursor hint anymore. If that's the case, avoid warping the pointer.

BUG: 457021
2023-05-05 09:01:06 +00:00
Nicolas Fella
271d758f8c Add wayland to third-party deps 2023-05-05 10:16:23 +02:00
l10n daemon script
e63a3f93b5 GIT_SILENT Sync po/docbooks with svn 2023-05-05 02:55:17 +00:00
l10n daemon script
6499d2bc15 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-05 02:37:27 +00:00
l10n daemon script
041bb6369e GIT_SILENT Sync po/docbooks with svn 2023-05-04 02:44:25 +00:00
Vlad Zahorodnii
70d76791d8 cmake: Correct gbm version check
It appears like gbm_VERSION can be a list, which if() does not like. So
pass the variable to the if() rather than its value. While on this, also
change GREATER_EQUAL to VERSION_GREATER_EQUAL so cmake compares
individual version components.
2023-05-03 12:40:42 +00:00
Vlad Zahorodnii
1e848ac302 Remove PipeWire_FOUND in config-kwin.h
It's unused.
2023-05-03 14:51:57 +03:00
Vlad Zahorodnii
1f2a060a5e autotests: Remove WAYLAND_ONLY leftovers 2023-05-03 11:40:01 +00:00
Vlad Zahorodnii
0a82f33db5 Drop XCB_ICCCM_FOUND checks
Qt requires xcb-icccm 0.3.9. On the other hand, 0.3.9 contains all the
types and functions used by kwin, so remove the corresponding
XCB_ICCM_FOUND checks to simplify the code.
2023-05-03 11:40:01 +00:00
Vlad Zahorodnii
076493cc05 autotests: Improve running time of testPointerInput 2023-05-03 11:21:53 +00:00
Vlad Zahorodnii
785fa5c172 plugins/overview: Allow switching between desktops inside effect
At the moment, clicking desktop thumbnails in the desktop bar results in
switching to that virtual desktop, which is not ideal because the
overview effect allows sending windows to another virtual desktop by drag
and dropping them to its thumbnail but you can't jump to that
desktop unless you leave the overview effect.

BUG: 448668
2023-05-03 10:00:36 +03:00
Vlad Zahorodnii
892edf94d5 Remove unused "output_interface.h" include
output_interface.h used to be included because of its output transform
enums. It's not needed after switching to Output::Transform.
2023-05-03 06:36:53 +00:00
l10n daemon script
7fa87079e3 GIT_SILENT Sync po/docbooks with svn 2023-05-03 02:41:23 +00:00
Kai Uwe Broulik
48fe3f633e kwineffects: Initialize m_reason
It is not initialized in the default constructor.
2023-05-02 19:53:25 +02:00