Commit graph

22283 commits

Author SHA1 Message Date
Volker Krause
bc7324d258 Remove unused CMake files 2022-03-19 11:24:13 +01:00
Volker Krause
c8b67b9120 Fix Qt6 build regressions introduced by 0cd453690b
Hard to avoid as long as we don't have CI coverage yet, but that will take
a bit more time, we need KWin (and all its dependencies) to fully build
first.
2022-03-19 10:00:12 +00:00
Volker Krause
b99c5f9a63 Adapt to QQuickWindow::createTextureFromNativeObject being gone in Qt6 2022-03-19 09:20:34 +00:00
Xaver Hugl
f31b4b36d7 backends/drm: only allow ARGB8888 as the cursor format
The raspberry pi exposes opaque formats for the cursor plane, and interprets
them as being opaque as well... Considering that we effectively don't support
anything else with the QPainter anyways, just hardcode ARGB8888 until we paint
the cursor with OpenGl.
2022-03-18 21:29:35 +00:00
Nate Graham
ec75943425 Revert "revert desktopgrid realtime gestures port"
This reverts commit ca7fc44814.

Reverting work with no explanation is unacceptable, especially when
you've already been asked to stop multiple times.

CWG has already been contacted regarding this conduct, which is
starting to seem like vandalism of KDE's codebase. I am CCing sysadmins
and officially recommending an emergency recovation of commit access
for uhhadd@gmail.com to prevent further abusive behavior.

CCMAIL: uhhadd@gmail.com
CCMAIL: sysadmin@kde.org
2022-03-18 13:51:15 -06:00
Jan Blackquill
ca7fc44814 revert desktopgrid realtime gestures port 2022-03-18 14:17:52 -04:00
Nate Graham
2de09fa249 Revert "revert desktopgrid realtime gestures port"
This reverts commit 154528cdef.

This commit was reverted with no explanation, context, or discussion. In
the future, please discuss things like this before doing them. KWin is a
community project, not a personal playground.

CCMAIL: uhhadd@gmail.com
2022-03-18 09:40:10 -06:00
Volker Krause
a1d61bb6e8 Link against Qt::CorePrivate as we use internal event loop headers here
Needed to compile against Qt6.
2022-03-18 14:34:41 +00:00
Volker Krause
0952512e0a Move Tranche::operator== before its first use
Qt6 QList::operator!= fails to compile otherwise.
2022-03-18 14:34:41 +00:00
Volker Krause
e5a85f503a QScopedPointer in Qt6 doesn't implicitly cast to bool anymore 2022-03-18 14:34:41 +00:00
Volker Krause
e0c1d2583a Add Wayland includes needed to build against Qt6 2022-03-18 14:34:41 +00:00
Volker Krause
ccad0066e7 Disambiguate KWaylandServer::Display
This unfortunately clashes with a typedef in a Qt6 header.
2022-03-18 14:34:41 +00:00
Volker Krause
6cd0014364 Adapt build system to also support Qt6 2022-03-18 14:34:41 +00:00
Volker Krause
09624c5a9b Make the qtwaylandscanner fork build against Qt6 2022-03-18 14:34:41 +00:00
Nicolas Fella
3876c89cc1 Avoid recreating palette in DecorationPalette::palette
KColorScheme::createApplicationPalette is quite expensive and DecorationPalette::palette is called quite a lot

Cache the result and only update when needed
2022-03-18 08:04:28 +00:00
Vlad Zahorodnii
645f5adfc2 Remove guards around unistd.h
We take unistd.h for granted in many places, so remove guards around the
corresponding includes to make code consistent.
2022-03-18 07:35:59 +00:00
l10n daemon script
af5e8a937d 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-18 01:50:19 +00:00
Mathias Tillman
140c2fb20e effects/blur: Fix window flickering when the clip intersected with the current blur region.
This fixes a bug introduced in https://invent.kde.org/plasma/kwin/-/merge_requests/2045 where it would no longer check if it should redraw the whole region unless the data clip intersected. This would lead to flickering in certain cases

BUG: 421135
2022-03-17 22:19:55 +00:00
Vlad Zahorodnii
927714466c Remove KWIN_XCLIPBOARD_SYNC_BIN symbol in config-kwin.h
xclipboard syncer is long time gone.
2022-03-17 12:05:45 +02:00
Alex Richardson
137fea8aa9 Use #cmakedefine01 for the remaining config macros
Using 0/1 instead of undefined/defined to 1 allows the compiler to flag
a missing include of the config header.
2022-03-17 11:40:01 +02:00
Alex Richardson
0a0a1fd330 Use __has_include() instead of check_include_file()
Allows removing some CMake checks config-kwin.h contents. This is
supported by all compilers and required for C++17. While touching those
lines I also cleaned up an unnecessary HAVE_UNISTD_H check (glibc always
has it and and incorrect use of HAVE_SYS_PROCCTL_H.
2022-03-17 11:39:58 +02:00
Vlad Zahorodnii
994c5c24ae Drop fbdev backend
fbdev has been deprecated and unmaintained for a while. With Linux 5.14
including SimpleDRM driver, we can drop it. (at the time of writing this
commit message, the latest Linux version is 5.16).
2022-03-17 09:13:21 +00:00
Julius Zint
39160e7dbd Remove no_xdg_runtime_dir_test
[6/6] Make autotests create fake input devices

This test was the only one where input() could return a nullptr. With
this test removed, autotests can now expect input() to always return a
sane valid value and are therefor simpler to write.

That test belongs in kwayland-server anyway and kwayland-server's test
suite already tests that starting without XDG_RUNTIME_DIR is a no-no
thing
2022-03-17 08:35:40 +00:00
Julius Zint
270a963350 Migrate all autotest input simulation functions
[5/6] Make autotests create fake input devices

Migrate all input simulation functions from kwinApp()->platform()->...
to the their counter part in the Test namespace.
2022-03-17 08:35:40 +00:00
Julius Zint
93305f6041 Add all required input simulation methods
[4/6] Make autotests create fake input devices

This translates all required input simulating methods from
kwinApp()->platform()->... to seperate functions in the Test namespace.
2022-03-17 08:35:40 +00:00
Julius Zint
33487c06d6 Add all three VirtualInputDevices for autotests
[3/6] Make autotests create fake input devices

This commit adds back all three VirtualInputDevices for simulating
keyboard, touch and pointer input events from autotests.
2022-03-17 08:35:40 +00:00
Julius Zint
97f49edb1c Add the ability to add InputDevices to InputRedirection
[2/6] Make autotests create fake input devices
2022-03-17 08:35:40 +00:00
Julius Zint
3134198a30 Move VirtualInputDevice to autotests
[1/6] Make autotests create fake input devices

The goal of this patch set is simulating user input in unit tests via
InputDevices and no longer use the Platform to fake input. This matches
more closely with how input is processed when running a full plasma
wayland session, i.e. with the DRM and libinput backends.
2022-03-17 08:35:40 +00:00
Volker Krause
4b810833b5 Use new nativeInterface() API to get EGL/GLX contexts with Qt6 2022-03-17 07:54:26 +00:00
Volker Krause
1679452f41 Adapt to QChar ctors being explicit in Qt6 2022-03-17 07:29:51 +00:00
Nate Graham
840e6d400b src/kcmkwin: fix botched indentation code for final checkbox
This line had several problems:
1. Using un-namespaced `units` properties
2. Using `width` in a Layout
3. Using largeSpacing instead of gridUnit for indentation

All are fixed with ths commit.
2022-03-16 20:30:49 -06:00
l10n daemon script
17d562c825 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-17 01:47:48 +00:00
Volker Krause
15611cacb9 Port from QStringRef to QStringView
The QStringView::to[Number]() methods in Qt5 cause one extra allocation
compared to the QStringRef counter-part. As long as we aren't on a hot
path this is probably not worth the extra #ifdef though.
2022-03-16 23:44:23 +00:00
Michail Vourlakos
ba2496ca12 [aurorae] do not make any blur calculations when blur is not supported
when an aurorae theme does not contain "mask" element we can safely assume that blur is not supported. In such case all blur calculations must not run at all. This will make all solid aurorae themes much lighter by default.
2022-03-16 23:42:46 +00:00
Jan Blackquill
154528cdef revert desktopgrid realtime gestures port 2022-03-16 17:14:59 -04:00
Xaver Hugl
1d1b218d97 screencast: better solution for missing context on cursor move
There's no need to use tryEnqueue if we only update the cursor
2022-03-16 17:41:50 +00:00
Xaver Hugl
989361405e Revert "screencast: make context current in tryEnqueue"
This reverts commit 1fd1c03742,
because it can make KWin freeze
2022-03-16 17:41:50 +00:00
Xaver Hugl
6012e409a6 backends/drm: fix multi-gpu
The import code was added but not actually used
2022-03-16 16:32:08 +00:00
Xaver Hugl
36088cc82c backends/drm: fix crash in aboutToStartPainting
m_gbmSurface may still be nullptr
2022-03-16 16:32:08 +00:00
Xaver Hugl
0cd453690b backends/drm: split out layers for lease outputs and remove DrmDisplayDevice 2022-03-16 16:32:08 +00:00
Xaver Hugl
aac7f50d8b backends/drm: remove some unnecessary redirection 2022-03-16 16:32:08 +00:00
Xaver Hugl
0ba5916fe6 backends/drm: remove retry-logic for atomic commits
While it can make KWin work even when the driver changes properties
behind its back, it can also mask bugs in KWin.
2022-03-16 15:18:47 +00:00
Vlad Zahorodnii
b0982f7bbc wayland: Drop ptrace logic
kwin disables ptrace for a good reason - to prevent other processes from
attaching to kwin and snooping sensitive data or taking control of kwin.
But, that will also make things such as memory statistics unavailable to
read, etc.

On the other hand, the supported platforms where kwin runs all have
security measures in places to forbid shady processes ptrace'ing kwin.
For example, on Linux it's YAMA.

On Linux, by default, a process can ptrace only its descendants. For
example, this can be used by debuggers; otherwise you would need to be
the superuser to attach to any process.

This change drops our ptrace logic in favor of system provided security
measures. It allows the System Monitor to gather kwin's memory usage
statistics and also simplifies code, the current debugger detection
logic is not really robust.

If the system provided security measures are proven to be insufficient,
we can add the ptrace disabling logic back, but it would be great to
avoid that because system monitor won't be able to gather resource usage
statistics, which can be useful for detecting memory leaks in plasma
wayland session, etc.
2022-03-16 14:16:14 +00:00
Vlad Zahorodnii
79a4733dc5 autotests: Fix TestDbusInterface with KWIN_BUILD_ACTIVITIES=OFF 2022-03-16 12:36:18 +00:00
Kai Uwe Broulik
9f9e32e57d Remove unused Qt QuickWidgets dependency
Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-03-16 11:31:09 +00:00
Kai Uwe Broulik
39038afe8e gitlab-ci: Build decorations in minimal CI run
A lot of integration tests rely on the fact that there is a
window decoration.

The `KWIN_BUILD_DECORATIONS` pretty much only disables
build of Aurorae window decoration plug-in but otherwise
has no impact on KWin's core code base in terms of ifdefs
or dependencies required.

Re-enable building decorations to unbreak those tests.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-03-16 11:01:43 +01:00
Volker Krause
57e0119d23 Adapt to Qt6's removal of Qt::X11Extras 2022-03-16 06:45:42 +00:00
l10n daemon script
45abf173f9 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-16 01:44:25 +00:00
Aleix Pol
f0ce2a0f53 screencasting: Support regions from the v3 of the protocol 2022-03-15 19:49:54 +00:00
Volker Krause
2139e2abab Port away from deprecated QWheelEvent constructors
The additional arguments are based on what the deprecated ctors did
internally.
2022-03-15 18:46:10 +00:00