Commit graph

22460 commits

Author SHA1 Message Date
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
Xaver Hugl
78794b4239 backends/drm: disable cursor layer when setCursor fails
Otherwise the next commit will still try to enable the cursor layer, and
possibly fail because of it
2022-05-11 21:53:00 +00:00
Nicolas Fella
a902e78ff4 Mark libxcvt as required
It's used unconditionally later on

Make sure it fails at the appropriate time when not found
2022-05-11 23:24:09 +02:00
Xaver Hugl
0b27ce4d34 Make touchscreen gestures realtime 2022-05-11 15:08:43 +00:00
Aleix Pol
946087ef37 Inhibit edges when the active window is full screen by default
At the moment we trigger the edges even when the active window is full
screen which is unfortunate when running certain games, for example when
you're attacking the village at the north-east in Age of Empires and you
have the Overview effect on.

This changes the default to inhibit them (like we used to just do for
sides but not corners for some reason) and adds a checkbox to restore
them even in that case.

BUG: 441464
2022-05-11 16:54:38 +02:00
David Redondo
ed45af55bd Install tabbox kcm only once 2022-05-11 14:22:10 +00:00
Vlad Zahorodnii
ea1fadfe8d Remove Window::addRepaint() and Window::addLayerRepaint()
Conceptually, scheduling repainting in Window doesn't belong there. This
change rewires EffectWindow internals so it schedules repaints using the
associated WindowItem.

Window::addWorkspaceRepaint() has not been removed yet because
Window::elevate() uses it.
2022-05-11 15:13:45 +03:00
Vlad Zahorodnii
8cc5e04238 scenes/opengl: Rename RenderContext::transforms to RenderContext::transformStack
It's a better name and it's consistent with opacityStack.
2022-05-11 09:42:35 +00:00
Vlad Zahorodnii
63a866d98c Make WindowItem handle opacity
This change makes the WindowItem track the opacity and schedule a
repaint. It further decouples the legacy scene from code window
abstractions.

It's an API breaking change. WindowPaintData no longer can make windows
more opaque. It only provides additional opacity factor.
2022-05-11 09:42:35 +00:00
Alexander Lohnau
99f01ee9c5 Fix malformed X-KDE-OnlyShowOnQtPlatforms value in keyboard KCM metadata 2022-05-11 11:30:36 +02:00
Alexander Lohnau
cdab439bd0 Add missing installation of virtualkeyboard KCM 2022-05-11 11:29:59 +02:00
l10n daemon script
472bdf117c 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-11 01:45:27 +00:00
Xaver Hugl
d83121dbe4 backends/drm: also use modifiers by default for virtual outputs 2022-05-10 19:42:36 +02:00
Xaver Hugl
f02a6fd128 backends/drm: add fallback for missing gbm modifier support
It can happen that a gbm implementation does not support modifiers, while
the drm driver does. To prevent that from breaking KWin, fall back to creating
a gbm surface without modifiers when creating one with modifiers fails.

BUG: 453320
2022-05-10 19:42:32 +02:00
Alex Richardson
a264938ff3 Simplify cross-compilation of qtwaylandscanner_kde
I am trying to cross-compile and since qtwaylandscanner_kde is used
during the build, I need to build a native version of the
qtwaylandscanner_kde tool first. This change allows building
qtwaylandscanner_kde as a standalone CMake project which the cross-build
can then be pointed at to find the host tool. If an explicit path to
qwaylandscanner_kde is not passed, we will try to use ExternalProject_Add
to build it. This approach was taken from ksyntaxhighlighting:
https://invent.kde.org/frameworks/syntax-highlighting/-/blob/master/src/indexer/CMakeLists.txt

This patch makes it significantly easier to cross-compile KWin, as we now
only need a native QtCore library instead of all the dependencies.
2022-05-10 16:34:49 +00:00
Vlad Zahorodnii
a7d61f7bfa Fully replace SceneWindow with WindowItem
This completes the initial transition to scene items.
2022-05-10 15:45:48 +00:00
Xaver Hugl
15a9744979 effects/windowview: correct gesture direction
BUG: 453427
2022-05-10 14:30:00 +00:00
Aleix Pol
bbe886a083 ScreenEdge: fix double look-up 2022-05-10 13:14:26 +00:00
Aleix Pol
9c41ec461e kcm/edges: Draw the ratio of the monitor we are on
At the moment it's showing whatever is QGuiApplication::primaryScreen(),
which on Wayland is random.
2022-05-10 13:14:26 +00:00
Aleix Pol
b7f3db5aca edges: Also check edge blocking on fullscreen windows on Wayland
At the moment we were reconsidering the fullscreen block only on X11.
Instead, use the abstracted information.
2022-05-10 13:14:26 +00:00
Vlad Zahorodnii
94d91e6404 Remove redundant Window::isClient() call
Unmanaged windows are on all desktops, activities, not hidden and not
minimized.
2022-05-10 12:23:01 +00:00
Ahmad Samir
74482b2e2d Fix typo
Spotted by Luca Beltrame

GIT_SILENT
2022-05-10 14:16:47 +02:00
Xaver Hugl
94b0ca8146 tabbox: don't dismiss popups
The glitches that dismissing popups was supposed to prevent are apparently
no longer present.

BUG: 446318
2022-05-10 13:07:03 +02:00
Vlad Zahorodnii
313baa4b51 Remove QAction include in AnimationEffect
It builds fine without QAction include.

BUG: 453609
2022-05-10 10:14:11 +00:00
Xaver Hugl
7eefc48536 effects/overview,windowview: restore ability to close windows 2022-05-10 09:49:36 +00:00
Vlad Zahorodnii
2983727871 effects: Make DeformEffect disable clipping if specified region is infinite
The Scene no longer clips window quads if the specified paint region is
infinite. The infinite region is defined as (INT_MIN/2, INT_MIN/2,
INT_MAX, INT_MAX). If you try to scale the infinite region, you will
easily hit integer overflow.

This change makes the DeformEffect disable geometry clipping if the given
paint region is infinite region in order to avoid hitting integer
overflow.
2022-05-10 07:56:43 +00:00
Xaver Hugl
f07d6bd400 backends/drm: port the cursor to use output layers
CCBUG: 447797
2022-05-10 07:06:53 +00:00
Xaver Hugl
12515b4656 backends/drm: fix qpainter 2022-05-10 06:09:34 +00:00
Méven Car
1dd12a064a Fix a couple unused warnings
GIT_SILENT
NO_CHANGELOG
2022-05-10 07:33:30 +02:00
l10n daemon script
e1cec89ddb 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-10 01:45:54 +00:00
Kai Uwe Broulik
9cb5b38970 effects: Port EffectFrame to OffscreenQuickView
This allows to toss a large amount of custom rendering code.

Furthermore, it removes the build-time dependency on Plasma Framework
for FrameSvg and Theme from KWin core as it's pulled in through QML
imports now.

It also cleans up the API and removes functions that are effectively
unused or no-op after this change.

For instance, effects often destroy their effect frames
in pre/postPaintScreen, which would now destroy an `OffscreenQuickView`,
which changes GL context. This is alleviated by delaying detruction
of the internal view.

Support for the features of text cross-fade and selection frame,
which are not used by any of the built-in effects, is dropped.

Signed-off-by: Eike Hein <eike.hein@mbition.io>
2022-05-09 17:53:58 +00:00
David Redondo
f6bb95f18e Bump plasmashell version to 7 2022-05-09 15:59:19 +00:00
Xaver Hugl
e4695325a6 backends/drm: store gbm buffer for screen recording 2022-05-09 14:06:55 +00:00
Nicolas Fella
774dbf8d2f Use ECMFindQmlModule instead of ECMQmlModules 2022-05-09 15:22:49 +02:00
Vlad Zahorodnii
1d699a703d autotests: presentwindows -> windowview 2022-05-09 10:56:35 +00:00
Vlad Zahorodnii
0860efecc3 Move SceneWindow::decorationShape() to DecorationItem 2022-05-09 09:41:39 +00:00