Commit graph

22495 commits

Author SHA1 Message Date
Xaver Hugl
0bbd4445f2 backends/drm: fix offset cursor
For some reason with legacy the cursor gets an offset when changing the
image. In order to work around this, directly issue a cursor move with the
corrected position when changing the buffer
2022-05-19 09:43:27 +00:00
Jonathan Esk-Riddell
8f009c2db1 Update version number for 5.24.90
GIT_SILENT
2022-05-19 10:41:30 +01:00
Xaver Hugl
23c68fd9da effects/desktopgrid,overivew: set touchpad gestures to match 5.24
As we don't provide any ability for the user to configure the gestures yet,
the gesture for the desktop grid should stay as it was in the last release.
This commit swaps the gestures for desktopgrid and overview to achieve that.
2022-05-19 07:37:29 +00:00
Vlad Zahorodnii
1ee00bc6f9 wayland: Fix drag-and-drop issues in Firefox
At the moment, the data offer initializes supported and preferred action
to "none". But if the target doesn't accept anything the source
provides, the compositor may still need to send action events with "none"

This change makes data offer and data source provide dnd actions wrapped
in std::optional in order to indicate if they have been set explicitly.
2022-05-19 07:00:43 +00:00
David Redondo
20a94d7157 xwayland: Keep source/Xvisit alive for longer
SeatInterface emits dragEnded when the drag is dropped. The target may want
to interact with the data source after the drop happened, for example only
fetching data after the drop and not during the drag.
(Note that the Wayland protocol has the same
Xvisits are now not deleted prematurely but only when they are really finished.
(Note that the Wayland protocol has the same distinction between dropped and
finished so it maps nicely).
For storing  previous visits the same code pattern as in the rest of the XWayland
DND code is used.
The SelectionSource is reset when the next Drag/Drop operation involving a X window
is started (see startDrag and doHandleXfixesNotify) or when the Wayland source is
about to be deleted.

BUG:450460
FIXED-in:5.25.0
2022-05-19 06:45:00 +00:00
Guenther Grau
f6f4a296f2 Fix argument order for clientMaximizedStateChanged
Arguments for clientMaximizedStateChanged were incorrect in window.cpp.
They are correct in xdgshellclient.cpp and window.h

BUG: 380836
2022-05-19 09:33:05 +03:00
Xaver Hugl
a262f2b28a Revert "wayland/outputdevice: use OutputMode directly"
This reverts commits 67181d5db7 and
d03e352dbf.

BUG: 454014
2022-05-19 00:59:54 +02:00
Vlad Zahorodnii
bcbbbc561b Rename Workspace::removeAbstractClient() to Workspace::removeWindow() 2022-05-18 17:14:09 +00:00
Vlad Zahorodnii
06a9c686f1 Move popup cleanup from Workspace::removeX11Window() to Workspace::removeAbstractClient()
This popup cleanup code can be useful also on wayland.
2022-05-18 17:14:09 +00:00
Xaver Hugl
62e1130846 gestures: limit progress range for pinch gestures
If progress goes out of the [0, 1] range, effects misbehave
2022-05-18 16:55:27 +02:00
Xaver Hugl
2238e608d6 gestures: rename weirdly named methods 2022-05-18 16:54:24 +02:00
Xaver Hugl
103d6b9e92 globalshortcuts: fix warning 2022-05-18 16:53:13 +02:00
Aleix Pol
1176f31e0d Support KWindowSystem interface with activation support
Allow internal uses of KWindowSystem to support activating other
clients.

BUG: 453748
BUG: 453785
2022-05-18 13:48:52 +00:00
David Redondo
d3a37aa9ae Update device outputName when setting output
BUG:451279
FIXED-IN:5.25.0
2022-05-18 12:50:24 +00:00
Xaver Hugl
b0b551653f backends/drm: update cursor after compositing reset
Otherwise the cursor won't be shown, as its buffer and layer got destroyed

BUG: 453823
2022-05-18 11:00:14 +00:00
Xaver Hugl
d03e352dbf wayland/outputinterface: fix crash
The current mode may be nullptr
2022-05-18 10:03:13 +00:00
Vlad Zahorodnii
be717d5c67 autotests: Fix testTouchPoint
Gesture recognition code doesn't handle correctly cancelling a touch
sequence. testTouchPoint in one of its tests simulates pressing the
screen with three fingers and cancelling the touch sequence.
2022-05-18 09:46:56 +00:00
Vlad Zahorodnii
f1c9cb5d64 Emit Workspace::windowAdded() at more intuitive time when starting to manage an X11 window
Emitting the Workspace::windowAdded() signal before actually adding the
window to the Workspace is counter-intuitive and it can a source of
potential bugs as relevant window lists in Workspace don't contain the
window yet.
2022-05-18 07:44:50 +00:00
Xaver Hugl
67181d5db7 wayland/outputdevice: use OutputMode directly 2022-05-18 07:04:32 +00:00
Nate Graham
4fb78a415c kcmkwin/kwinscreenedges: only show KCM on Wayland
The features that this KCM lets you trigger barely work on X11 and
really only work properly on Wayland.

Unfortunately we don't have the ability to have separate settings
between X11 and Wayland, and for this reason we removed a default left
touch edge in 3df7985570 a year and a half
ago because it was too buggy on X11.

This commit takes the next step and hides the KCM entirely on X11, so
you can only use it on Wayland where it actually works properly.

One potential downside is be that any users who are actually using it
on X11 will lose the ability to use a GUI to configure these features
unless they go to the Wayland session to do it. However the number of
such users is likely small given how the feature does not really work on
X11.

However the upside is that Wayland users who can see the KCM can
actually use the features that it lets you configure because they work
properly there.
2022-05-17 21:27:11 +00:00
Xaver Hugl
441266c427 wayland/outputinterface: use the same enums as core KWin 2022-05-17 19:05:15 +00:00
Vlad Zahorodnii
4c05db3c30 Simplify Workspace::addWaylandWindow()
I believe this is a relic from the past when we used not to destroy
the ShellClient when the associated surface is unmapped.
2022-05-17 16:38:47 +00:00
Vlad Zahorodnii
09ba8729fc Partially revert 89b35c3238
As it turns out, it's needed to ensure that the Workspace emits the
stackingOrder changed signal when a new window is added. It's also
implicitly needed to make sure that Window::stackingOrder() is updated.
2022-05-17 14:52:24 +00:00
Aleix Pol
f4c704a904 screenedges kcm: Fix initial screen detection
Use QWidget::screen instead of having own code to fetch the screen. It
works better this way before the window is initialised.
2022-05-17 14:58:20 +02:00
l10n daemon script
ad74b8cd59 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"
2022-05-17 01:45:45 +00:00
Vlad Zahorodnii
a47f18d8a2 wayland: Fix supported action initialization in data offer interface
Currently we guess the supported and preferred dnd actions in data offer
for version >= 3. This can create problems because kwin may not send the
right action events when the supported dnd actions actually change.
2022-05-16 12:38:07 +00:00
Vlad Zahorodnii
00fb259c41 backends/drm: Fix cursor size check
Currently, the cursor size check ignores the cursor bitmap's size, so
the hardware cursor is used even though the bitmap size exceeds cursor
limits.
2022-05-16 12:09:27 +00:00
Vlad Zahorodnii
a601a08ba7 wayland: Make setting realtime scheduler more fine grained
With this only the main and the libinput threads will use realtime
scheduling, so it will be harder to leak realtime scheduling to somebody
else.

The only caveat is that kwin would need to keep CAP_SYS_NICE around,
however on the other hand, it's needed to ensure that kwin_wayland is
able to get high priority EGL contexts with some drivers, e.g. intel.
2022-05-16 11:15:20 +00:00
Kai Uwe Broulik
1878ba0e10 backends/drm: Guard gbm_bo_get_fd_for_plane in dmaBufAttributesForBo
It is guarded elsewhere but not here.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-05-16 10:48:58 +00:00
Kai Uwe Broulik
701bfc71be Link Qt X11Extras in kwin core library
QX11Info is used in `platform.cpp`, which is used by both
kwin_x11 and kwin_wayland. The latter only gets it implicitly
through KGlobalAccelPrivate.

Ideally, platform.cpp was split to not require QX11Info in
kwin_wayland in the first place.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-05-16 09:34:34 +00:00
Kai Uwe Broulik
edf9698e23 backends/drm: Drop QObject and moc include from layer
There's no QObject anymore which causes a MOC warning

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-05-16 10:49:50 +02:00
Vlad Zahorodnii
ed90be0783 wayland: Bump RLIMIT_NOFILE limit
As a wayland compositor kwin can hold many open file descriptors and
therefore it's easier for it to hit the soft file descriptor limit. This
change makes kwin_wayland bump the soft file descriptor limit to the
hard limit. With systemd, it's usually 500K.

In order to prevent causing mess in child processes, pthread_atfork() is
used to register a handler which will be invoked in the child process
after fork() in order to restore RLIMIT_NOFILE to its original value.
2022-05-16 07:00:47 +00:00
l10n daemon script
2178f26e7b 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"
2022-05-16 01:48:22 +00:00
Vlad Zahorodnii
6451cb2cfe backends/drm: Also release cursor layer buffers 2022-05-15 08:31:39 +00:00
l10n daemon script
d0d642ba68 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"
2022-05-15 01:56:42 +00:00
Alex Richardson
cf8f189be2 Allow usage of lcms2 when compiling with Clang
Otherwise the build fails for me with the following error:
error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
Upstream does not appear willing to fix this issue, so we have to add a
define to avoid usage of this useless keyword.
See https://github.com/mm2/Little-CMS/issues/190 and
https://github.com/mm2/Little-CMS/issues/243.
2022-05-14 21:17:39 +00:00
Nate Graham
9ff137f5cb effects/overview: enable it by default
Overview is quite polished now, enough that we have a default touchpad
gesture that opens it by default. It's time to move it out of public
beta and enable it by default, and this commit does that.

BUG: 446753
FIXED-IN: 5.25
2022-05-13 19:42:29 +00:00
Vlad Zahorodnii
d7ec51998b backends/drm: Import gbm bos using dmabuf
It appears that importing gbm_bo's using eglCreateImageKHR() doesn't
work on nvidia.

Another issue is that Platform::createDmaBufTexture() uses
gbm_bo_create(). The nvidia driver doesn't like that, it's preferred to
use gbm_bo_create_with_modifiers().

In order to address those issues, this change refactors how gbm_bo
objects are imported and how gbm_bo's are allocated for dmabuf textures,
so the same code can be reused in EglGbmBackend::textureForOutput()
and Platform::createDmaBufTexture().
2022-05-13 15:55:05 +00:00
Marco Martin
db2af5500f effects/overview: hide panels
This makes it consistent with WindowView (and the panel window doesn't respond
to input anyways even if shown, which is misleading).

BUG: 444274
FIXED-IN: 5.24.6
2022-05-13 15:37:13 +00:00
Xaver Hugl
5d37a59198 effects/overview: fix scale of windows when dragging them upwards 2022-05-13 14:19:34 +00:00
Arjen Hiemstra
79dfb1ff61 input: Move MoveResize input filter after global shortcut input filter
This allows using global shortcuts while a move/resize is ongoing. Most
importantly, this allows moving a window to a different desktop by
picking it up and then using a global shortcut to move to a different
desktop.

BUG: 444696
2022-05-13 10:37:29 +00:00
l10n daemon script
2575bf8cd8 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"
2022-05-13 01:45:45 +00:00
Vlad Zahorodnii
e26dca110e Drop Application::isClosingX11Connection()
It's unused.
2022-05-12 14:59:55 +00:00
Vlad Zahorodnii
89b35c3238 Remove redundant window propagation
If a wayland window is added, we don't need to propagate that to X11.
2022-05-12 14:59:55 +00:00
Vlad Zahorodnii
0489d4a2f6 Merge Workspace::stackingOrder() and Workspace::xStackingOrder()
The Workspace has two stacks - one with managed windows and deleted
windows, the other includes windows from the first stack + override
redirect windows.

This change merges both stacks. It has several benefits - we will be
able to move window elevation stuff to Workspace and streamline the
scene stuff, for example it will be possible to have a root item.
Another advantage is that unmanaged windows will have
Window::stackingOrder() property set, which can be useful in the future
in qml effects or (qtquick scene if we push harder in that front).
Another advantage is that kwin will make less X11 calls when restacking
managed windows.
2022-05-12 14:59:55 +00:00
Vlad Zahorodnii
fa0143fb97 backends/drm: Ensure that there's opengl context when painting cursor 2022-05-12 12:34:48 +00:00
Marco Martin
796e1cf5bf configurable way to force tabletmode on or off
The user may want to never have it, or may be needed to enable
or disable it for debugging purposes
2022-05-12 09:47:16 +00:00
Vlad Zahorodnii
654313d460 scene: Remove repaint on current activity/desktop change
WindowItem has proper visibility set now, so these two interim hacks can
be removed now.

Workspace::stackingOrderChanged still needs to be kept around as the
Scene has no root item which could track the order of its child (window)
items.
2022-05-12 07:59:42 +00:00
l10n daemon script
12ca0a6128 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"
2022-05-12 01:42:21 +00:00
Xaver Hugl
ed06d752f0 backends/drm: blacklist hardware cursors with the NVidia driver
It doesn't work and seems to cause hangs. If desired, this can be overwritten
by explicitly setting KWIN_FORCE_SW_CURSOR to 0.

BUG: 453632
2022-05-11 21:53:00 +00:00