Commit graph

22789 commits

Author SHA1 Message Date
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
Vlad Zahorodnii
bc1f808f0f Move paint method from SceneWindow to Scene
That's the next step in allowing to reuse surface painting code between
the workspace and the cursor layer.
2022-05-09 08:31:13 +00:00
Vlad Zahorodnii
683a222233 Drop lanczos filter
The lanczos filter depends on the effect system. It makes very difficult
changing painting code from SceneWindow to Item.

Given that the last big users of the laczos filter - present windows and
desktop grid effects were re-written in QML. The only remaining user of
the lanczos filter is the thumbnail aside effect. Given that it's a
really obscure usecase, switching to the linear filter won't be very
noticeable.

As a backup plan, one can reimplement the thumbnailaside effect using
QML. The lanczos filter is already implemented in plasma-framework.
2022-05-09 08:31:13 +00:00
Xaver Hugl
a110aabbcc backends/drm: consider escaped separators KWIN_DRM_DEVICES
':' conflicts with the file names in /dev/dri/by-path, so allow it to be
escaped with '\'

CCBUG: 453386
2022-05-09 08:16:47 +00:00
l10n daemon script
5ddcd0827b 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-09 01:43:54 +00:00
Aleix Pol
f3ec05c85a wayland: Fix activation when activating surfaces disappear
We track when the user last interacted with a window so that we can
decide on the relevance of newly activated windows.

Fixes network/neochat#524
2022-05-09 00:59:27 +02:00
Erik Kurzinger
e6d2bc153f platforms/drm: set read buffer in GbmSurface::makeContextCurrent
The first time the GBM backend's EGL context is made current after
creation, both the read and draw surfaces are set to EGL_NO_SURFACE.
This will set the GL read and draw buffers to GL_NONE in accordance with
the EGL spec.

When a real surface is later made current, however, the spec is arguably
unclear on whether the read and draw buffers should remain set to
GL_NONE or whether they should be restored to the default GL_BACK.  The
Mesa driver does the latter, the NVIDIA driver does the former.

To work around this difference, Kwin has an explicit call to
glDrawBuffer in GbmSurface::makeContextCurrent. It does not have a
corresponding call to glReadBuffer, though, which can cause some desktop
effects such as background contrast to render incorrectly with the
NVIDIA driver. This change adds that missing call.
2022-05-08 12:58:10 -07:00
Alex Richardson
35c36be140 Fix incorrect usage of __has_include
I introduced this typo in 0a0a1fd330
2022-05-08 12:11:02 +00:00
Alexander Lohnau
61eba32cdd Rename kcm metadata json files to metadata.json 2022-05-08 09:03:03 +00:00
Alexander Lohnau
c1d0aa18cf Port KCMs to new install location
Task: https://phabricator.kde.org/T14517
2022-05-08 09:03:03 +00:00
Vlad Zahorodnii
51e9340abb Remove a Workspace::findAbstractClient() overload
Workspace::findAbstractClient(QUuid) overload is used only by the
windows krunner plugin.

This change fixes a potential null dereferencing and removes the
findAbstractClient() overload in favor of a more generic findToplevel()
overload.
2022-05-07 18:51:05 +00:00
Xaver Hugl
9ef882f3fb backends/drm: use addfb2modifier again when supported
Otherwise the kernel might fail our request because the modifier doesn't
match the buffer
2022-05-07 13:28:47 +00:00
Xaver Hugl
788ae5891a backends/drm: zero metadata for unused planes
The kernel may fail requests if data for unused planes is non-zero.
2022-05-07 10:09:30 +00:00
l10n daemon script
14cf7524b6 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-07 01:44:29 +00:00
Volker Krause
f32df68f3d Use the properly named screencast Wayland protocol file
This is needed to build with Qt6.
2022-05-06 19:12:06 +00:00
Volker Krause
6eb8d1bbf7 Fix Qt6 build of the xdgactivationtest 2022-05-06 18:45:17 +00:00
Xaver Hugl
04509aaeb7 backends/drm: when creating a fd fails, reset all fds to -1 2022-05-06 18:31:03 +00:00
Vlad Zahorodnii
bc57e89b75 backends/drm: Fix file descriptor check 2022-05-06 17:24:47 +00:00
Vlad Zahorodnii
ad45deaf80 backends/drm: Add missing file descriptor initializer
We need to initialize file descriptors to -1 explicitly.

BUG: 453470
2022-05-06 17:24:47 +00:00
Marco Martin
9a5d34cf6c default value as false
this should also fix compilation on Qt6
2022-05-06 16:52:01 +00:00
Marco Martin
eca9b5047a effects/windowview+overview: get back option to hide minimized windows
Option to hide minimized windows as old present windows effect had.

BUG: 441627
BUG: 453426
FIXED-IN: 5.25
2022-05-06 15:48:41 +00:00
Xaver Hugl
d5dad1b471 backends/drm: properly release all buffers on render backend destruction
Releasing the buffers is necessary for example in the case of a GPU reset,
to make sure that the gbm surface is still properly destroyed and all buffers
with invalid content freed.
2022-05-06 12:39:15 +00:00