Commit graph

21118 commits

Author SHA1 Message Date
Volker Krause
205fd169e5 Port from KNS3::Button to KNSWidgets::Button
The former isn't available in KF6 anymore.
2022-03-09 18:13:27 +01:00
Alex Richardson
1980dd0eb8 Use a python script to strip effect metadata
This makes it easier to cross-compile KWin since it is no longer necessary
to have all the KWin dependencies on the host machine. This could be
partially addressed by moving the strip-effects-metadata.cpp into a
separate folder than can be built as a top-level project, thereby reducing
the dependencies to just QtCore. However, it still means we have to build
a native binary. Since all this script is doing is removing some JSON keys,
we could also use a python script and avoid the need to compile a
build-time helper program.
2022-03-09 13:58:41 +00:00
Aleix Pol
e043f2262f inputmethod: Fix the test
We should account for keyboards that are not full screen (unlike
maliit). It shouldn't make a difference for maliit.
2022-03-09 13:24:26 +00:00
Aleix Pol
badf492941 drm: Properly specify the yInversion of the shadow buffer
Otherwise when we render it, we do so upside down and screen sharing
looks broken.
This only happens when the shadow buffer is in use, so it's not all that
common.
2022-03-09 00:47:04 +01:00
Jan Blackquill
eb933bfe0b effects/desktopgrid: don't forget to schedule repaints when timeline is running
BUG: 444678
FIXED-IN: 5.24.4
2022-03-08 17:21:30 +00:00
Jan Blackquill
5ffc307ca8 effects/desktopgrid: register down gesture
Now you can close the desktop grid with the inverse
of the gesture you used to open it.

BUG: 444694
FIXED-IN: 5.24.4
2022-03-08 14:49:39 +00:00
Aleix Pol
1b7173e927 inputmethod: Do not reset when hiding
This will make maliit think there is an ongoing matters and make it pop
up again.
2022-03-08 11:52:22 +00:00
Aleix Pol
c6737b1ae0 inputmethod: Listen to text-input enablement changes when starting disabled
We will need to know about it eventually if the user enables the input
method.
It's guarded with an if so it's no-op.
2022-03-08 11:52:22 +00:00
Laurent Montel
854aab798d Fix signature method in qt6 2022-03-08 07:26:17 +01:00
Laurent Montel
5bb8be96ee Add missing override keyword 2022-03-08 07:15:28 +01:00
Xaver Hugl
8b3a6c3eb0 backends/drm: don't change the configuration while KWin is terminating 2022-03-07 15:13:04 +00:00
Xaver Hugl
83d797785b backends/drm: wait for pending pageflips before doing a modeset
If we don't, KWin may get a pageflip event for an output that is already
considered as being turned off
2022-03-07 15:13:04 +00:00
Xaver Hugl
1247a7b698 output changes: handle to-be-enabled outputs first
This prevents situations where we have no enabled outputs
2022-03-07 15:13:04 +00:00
Xaver Hugl
2693482d10 platform: check all outputs, not only enabled ones for the enabled flag
Otherwise it will block changes that will disable all currently enabled
outputs but also enable some currently disabled output

CCBUG: 450721
2022-03-07 15:13:04 +00:00
Alexander Lohnau
abcf22b4d6 Clean up defunct version header for kwinscripts kcm 2022-03-06 19:11:01 +01:00
Michail Vourlakos
bcff044c73 [aurorae] - support blurregion from kdecoration2
This is an approach for aurorae engine to publish masks for its decorated windows in order to avoid out of window blurring at the decoration corners. Aurorae themes are now able to specify a **mask** element inside **decoration.svg** file like plasma themes already do. Mask is used afterwards to calculate theme's blur region.


| Before | After |
| ------ | ----- |
|![before](/uploads/26014e79c3d5d45ba12fa5cf62294b1c/before.png)|![after](/uploads/923d7021eaaf322be96b611c73558666/after.png)|

Adjusted Aurorae theme for testing: [ROUNDED-DARK.tar.gz](/uploads/082f60ad4311e3e296b7faeeb7c97dac/ROUNDED-DARK.tar.gz)

BUG:395725
2022-03-06 09:58:11 +00:00
Kai Uwe Broulik
32daab286d Use workspaceLayer as context object
Otherwise the connection isn't severed when the layer is destroyed,
leading to crashes when screen resolution changes.

We don't actually need `this` to access `workspace()`, and we have
a guarded `output` as sender in the other case.
2022-03-04 22:26:38 +01:00
Aleix Pol
b11499d95e Remove AbstractWaylandOutput::isBeingRecorded
It's not being used anywhere
2022-03-04 04:05:24 +01:00
Aleix Pol
4c814590fe Fix textureForOutput for the EglWaylandBackend
Ensure we get our texture from the right output
2022-03-04 02:56:35 +01:00
l10n daemon script
eb760505ac 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-03-04 01:43:35 +00:00
Kai Uwe Broulik
85aca384b9 gitlab-ci: Add minimal build configuration
Ensures KWin is also built with features disabled to catch when code is
added that requires a build-time guard

Signed-off-by: Eike Hein <eike.hein@mbition.io>
2022-03-03 16:07:56 +01:00
Kai Uwe Broulik
a55ea639a1 autotests: Guard tabbox_test by KWIN_BUILD_TABBOX
Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-03-03 14:34:10 +00:00
Kai Uwe Broulik
0793c24249 Add KWIN_BUILD_NOTIFICATIONS option
Notifications are really only useful in a setting with a full
shell environment where there is a notification center to display them.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-03-03 15:06:36 +01:00
Vlad Zahorodnii
0f448a83d9 autotests: Test moving pointer between windows 2022-03-03 13:45:47 +00:00
Vlad Zahorodnii
12ec886ccc Port to SeatInterface::notifyPointer{Enter,Leave} 2022-03-03 13:45:47 +00:00
Manuel Stoeckl
a2b7c09a11 Allow direct uploads of 16-bpc QImage formats
This commit expands the QImage-to-GL formatTable to include entries
for RGBX64, RGBA64_Premultiplied, and Grayscale16 image formats.
Uploading 16-bit-per-channel formats is supported by OpenGL and, with
the GL_EXT_texture_norm16 extension, GLES.
2022-03-03 10:23:31 +00:00
Marco Martin
e00d836708 Force cancel of any drag in progress when Escape is pressed
when escape is pressed when dragging between different clients,
cancelling any drag is compositor's responsibility

BUG:405267
2022-03-03 09:54:18 +00:00
Alex Richardson
d789ecc6d1 Use #cmakedefine01 for all KWIN_BUILD_* macros
This ensures that we get a warning if the config header is not included
instead of compiling the code as if it was disabled. Interestingly, some
checks already used #if KWIN_BUILD_*, so those were generating -Wundef
warnings when the feature is disabled. Commit 886173cab assumed that all
those features were already 01, so this unbreaks the build if any of the
features is disabled.

Fixes: 886173cab ("Reduce ifdefs in Workspace::supportInformation()")
2022-02-28 18:59:04 +00:00
Xaver Hugl
dea33cb311 backends/drm: consider zero modes as failure
If there's no modes, we can't use the output
2022-02-28 17:26:29 +00:00
Xaver Hugl
6bd6ad9d59 backends/drm: let DrmGpu handle mode changes
Doing a test is not sufficient for mode changes

BUG: 450804
2022-02-28 17:26:29 +00:00
Xaver Hugl
907cf72bb0 backends/drm: only update modes if actually necessary
This prevents some unneeded modesets
2022-02-28 17:26:29 +00:00
Xaver Hugl
72d9711e5d backends/drm: fix recording with direct scanout
BUG: 450943
2022-02-28 17:27:44 +01:00
Kai Uwe Broulik
1256ab4b84 scripting: Build generic scripting KCM only with KWIN_BUILD_KCMS
Without scripting KCM there is no access to script configuration either

Signed-off-by: Eike Hein <eike.hein@mbition.io>
2022-02-24 21:29:53 +00:00
Kai Uwe Broulik
4a14ac51ed effects: Build effect config only with KWIN_BUILD_KCMS
Without effects KCM there is no access to effect configuration either

Signed-off-by: Eike Hein <eike.hein@mbition.io>
2022-02-24 21:29:53 +00:00
Aleix Pol
4c9c5f9fd5 inputmethod: fix placing the virtual keyboard at the bottom
We should use the output area as the margin size as where to position
rather than the panelSize.

This ensures that the keyboard ends up in the right place right above
the panels.
2022-02-24 18:11:45 +01:00
Laurent Montel
cf6cc51651 Allow to use new kauth includes 2022-02-24 07:14:23 +01:00
Vlad Zahorodnii
aaa07f0605 Revert "Remove mysterious s_cursorUpdateBlocking boolean flag in pointer_input.cpp"
This reverts commit 3d0bdc56a4.

seat->setFocusedPointerSurface() before notifyPointerMotion() is needed
to prevent sending a motion event that's outside the previously focused
surface.

BUG: 449273
2022-02-23 22:03:27 +02:00
Kai Uwe Broulik
d54723cbf2 Add KWIN_BUILD_SCREENLOCKER option
Allows to build KWin without lockscreen support and thus drops the
kscreenlocker dependency.

Signed-off-by: Eike Hein <eike.hein@mbition.io>
2022-02-23 14:39:25 +01:00
Kai Uwe Broulik
5db527a053 effects/mousemark: Port away from KPluralHandlingSpinBox
It's the only user of KTextWidgets in the entire repository.

Signed-off-by: Eike Hein <eike.hein@mbition.io>
2022-02-23 13:48:43 +01:00
Kai Uwe Broulik
8f21921843 effects: Don't call load() from KCM constructor
It is automatically called (and documented as such) by KCModule
after the constructor is run.

This avoids calling a virtual method from the constructor.

Signed-off-by: Eike Hein <eike.hein@mbition.io>
2022-02-23 11:47:32 +00:00
Kai Uwe Broulik
aef8ba8d1a Port KComboBox to QComboBox
None of the features it adds ontop of `QComboBox` are used.

Allows to drop the dependency on KCompletion.

Signed-off-by: Eike Hein <eike.hein@mbition.io>
2022-02-23 11:28:47 +00:00
Kai Uwe Broulik
ad4bbba08a kwinrules: Use KWindowSystem::isPlatformX11()
No need to use QX11Info if we already have KWindowSystem

Signed-off-by: Eike Hein <eike.hein@mbition.io>
2022-02-23 11:36:37 +01:00
Kai Uwe Broulik
7e16130eea effects/overview: Don't link against KF5::Completion
None of its classes are used in this effect.

Signed-off-by: Eike Hein <eike.hein@mbition.io>
2022-02-22 15:27:31 +00:00
Kai Uwe Broulik
3aa23093e2 effects: Explicitly link against CoreAddons
Don't rely on another framework to pull it in.
It's where `KPluginFactory` lives.

Signed-off-by: Eike Hein <eike.hein@mbition.io>
2022-02-22 15:27:31 +00:00
Kai Uwe Broulik
2591afc7e7 effects: Remove unused KAboutData includes
Signed-off-by: Eike Hein <eike.hein@mbition.io>
2022-02-22 15:27:31 +00:00
Xaver Hugl
b530a5b66d backends/drm: fix layer destruction
Layers need to release their resources whenever the render backend gets
replaced.
2022-02-22 14:52:52 +01:00
Xaver Hugl
a04bdf2355 backends/drm: port DrmPipeline and DrmGpu to use layers
Instead of having the render backends manage layers, have DrmGpu and DrmPipeline
do it. This makes it possible to unify code paths for leased and normal
outputs, remove some redirection and have more freedom with assigning layers
to screens.
2022-02-22 14:52:52 +01:00
Xaver Hugl
cdac2690d1 backends/drm: port layers to DrmDisplayDevice 2022-02-22 14:52:52 +01:00
Xaver Hugl
dd198461ea backends/drm: introduce DrmDisplayDevice
DrmDisplayDevice is a new parent class for both normal and lease outputs,
which makes it possible to simplify a few things
2022-02-22 14:52:52 +01:00
Xaver Hugl
ddb6dadfc2 backends/drm: port qpainter to layers 2022-02-22 14:52:52 +01:00