Commit graph

878 commits

Author SHA1 Message Date
Nicolas Fella
9a34ebbffc [x11] Refactor output updates
The current code has multiple index-based for loops iterating over items we get from XCB

Dealing with raw indices is error-prone and not pretty

By using std::span we can replace these loops with range-based for loops

Also remove some intermediate containers that aren't neccesary
2022-08-06 02:26:39 +00:00
Volker Krause
f8516c1b42 Port remaining QQC1 uses 2022-08-02 18:06:54 +02:00
Alexander Lohnau
1a38ea6aba Port to KCM desktop file generation method from kcmutils
This de-duplicates the translations needed for the KCMs.

Task: https://phabricator.kde.org/T15609
2022-07-24 15:52:12 +00:00
Vlad Zahorodnii
aa739c59cf wayland: Make mapping from xinerama indices to Output correct
We assume that outputs in kwinApp()->platform()->enabledOutputs() are
stored in the xinerama order. However, this is not the case on Wayland
and it's not going to be changed because it increases the complexity.

This change makes Workspace::xineramaIndexToOutput() use Xinerama
extension API to map a xinerama index to the associated Output object.

With this, Xwayland applications will be able to put on outputs as
expected.

Note that xinerama indices are not cached because
Workspace::xineramaIndexToOutput() is not used in any hot code path. If
that changes, xinerama indices can be cached. The cache must be
invalidated whenever we get screens changed notify event from RANDR.
2022-07-18 13:52:58 +00:00
Aleix Pol
d5ddf55e9b gbm: Don't pass any flags when creating buffers with modifiers
It seems it doesn't bring much and it may backfire. Especially don't
pass GBM_BO_USE_LINEAR as it will limit a lot the buffers that can be
created and GBM_BO_USE_RENDERING use seems to be more harmful than
helpful on most cases.
2022-07-04 22:52:40 +00:00
Jonathan Esk-Riddell
dfc6c87057 Update qt5 version requirement to 5.15.2
GIT_SILENT
2022-06-27 10:02:35 +01:00
Aleix Pol
aa59344be7 Platform: Improve our infrastructure to support dmabufs in backends
Allows creating buffers with modifiers.
Lets the windowed wayland backend support it, which makes testing
everything else much simpler.
2022-06-16 13:18:32 +00:00
Méven Car
9cc73a5bc6 Bump KF5_MIN_VERSION after b069aad160e514ec2f933f654ddcbbc6aca59ed5
GIT_SILENT
NO_CHANGELOG
2022-05-21 12:14:14 +02:00
Jonathan Esk-Riddell
e08cd40e8e Update version number for 5.25.80
GIT_SILENT
2022-05-19 12:25:51 +01:00
Jonathan Esk-Riddell
8f009c2db1 Update version number for 5.24.90
GIT_SILENT
2022-05-19 10:41:30 +01: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
Nicolas Fella
774dbf8d2f Use ECMFindQmlModule instead of ECMQmlModules 2022-05-09 15:22:49 +02:00
Xaver Hugl
14e7afcb4e color management: refactor and move to its own directory
The pipeline stages are also now properly managed, which should prevent
use-after-free errors.

BUG: 453026
2022-04-26 16:20:47 +00:00
Alexander Lohnau
719e97194d Port KWin Scripts KCM to QML
Task: https://phabricator.kde.org/T7289
2022-04-24 09:58:34 +00:00
Xaver Hugl
08ad2c8ed3 add libxcvt as a new hard dependency 2022-04-23 19:45:48 +00:00
Vlad Zahorodnii
b64f95b703 Integrate kwaylandserver
This makes KWin switch to in-tree copy of KWaylandServer codebase.

KWaylandServer namespace has been left as is. It will be addressed later
by renaming classes in order to fit in the KWin namespace.
2022-04-22 12:27:33 +03:00
Xaver Hugl
f6eee463ba Make lcms2 a hard dependency
When we do more color management stuff we'll need it in more places,
making it a hard requirement reduces the amount of needed ifdefs and
should make adding color management features a little simpler.
2022-04-20 12:21:38 +02:00
Andreas Sturmlechner
2aaa9ed5c2 Add missing KF5Auth dependency
Used in src/helpers/killer

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
2022-03-30 09:40:44 +00:00
Vlad Zahorodnii
8fe567c4fa Add pre-commit hook for clang-format 2022-03-25 13:25:20 +02:00
Volker Krause
2a171e5fa8 Adapt build system to also support building against Qt6 2022-03-25 08:26:49 +00: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
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
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
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
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
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
00f2dc1d88 Remove KIconThemes dependency
It has been unused since 7706e17d but was left in CMakeLists.txt

Signed-off-by: Eike Hein <eike.hein@mbition.io>
2022-02-15 08:43:15 +00:00
Nicolas Fella
a2ebad760f Implement services in our QPA
This is required for QDesktopServices to work.

Use QGenericUnixServices like the xcb and wayland QPA

BUG: 446144
2022-02-13 00:41:10 +01:00
Albert Astals Cid
858da39fa4 Increase minimum requirements
A newer kwindowsystem is needed for NET::WM2GTKApplicationId

kwin and kwayland-server version must match
2022-01-28 22:53:12 +00:00
Laurent Montel
f23ef4c858 Use not deprecated SYSTEMD_USER_UNIT_INSTALL_DIR 2022-01-18 07:03:45 +01:00
Jonathan Riddell
11763bb32c Update version number for 5.24.80
GIT_SILENT
2022-01-13 11:56:02 +00:00
Jonathan Riddell
307fcdf0e1 Update version number for 5.23.90
GIT_SILENT
2022-01-13 10:33:58 +00:00
Vlad Zahorodnii
e81a360194 Bump libepoxy to 1.3
1.3 has been released in 2015 which is sufficiently old enough.
2022-01-02 22:30:06 +02:00
Alexander Lohnau
bd17ca0110 kwinscripts kcm: Port to new KPluginWidget class
Task: https://phabricator.kde.org/T12265
2021-12-03 06:15:34 +00:00
David Edmundson
f4b870977b Re-enable systemd managed kwin
This was blocked on environment variables issues which are now resolved
2021-12-02 13:25:50 +00:00
David Edmundson
b3f5f9764f [kwin_wrapper] Sync kwin env after spawning 2021-12-02 13:25:50 +00:00
Alexander Lohnau
70a2fb877a Register KWin effect macros for moc
Otherwise we get lots of moc warnings about there not being any relevant macro used
2021-11-24 10:48:51 +00:00
Alexander Lohnau
66352bfc87 Utilize KCoreAddons infrastructure for static plugins 2021-11-24 10:48:51 +00:00
Xaver Hugl
c68f7f13f3 backends/drm,wayland: require gbm
The ifdefs for have_gbm obfuscate the code unnecessarily - the drm backend
is not a great experience with qpainter, so in practice noone should ship
it without gbm anyways.
2021-11-12 08:25:15 +00:00
Xaver Hugl
bad5752110 platforms/drm: kill the EglStreams backend
The proprietary NVidia driver now supports gbm, which vastly improves the
user experience. For older devices that will not get gbm support dropping
EglStreams will likely not have a big impact as it has several session breaking
issues anyways.

By removing the backend a lot of logic can be simplified, most notably multi-gpu.
2021-11-10 11:43:36 +00:00
Xaver Hugl
6ff4de2e05 port everything away from Q_FOREACH 2021-11-08 14:19:05 +00:00
David Redondo
60c3b3ddfa Add support for hold gestures 2021-10-26 08:16:52 +00:00
Vlad Zahorodnii
d6f02abad0 cmake: Make KF5Wayland required again
wayland platform plugin uses KF::Wayland.
2021-10-12 06:32:55 +00:00
Nicolas Fella
310684f1a7 Fix build by lowering KDE_COMPILERSETTINGS_LEVEL
It doesn't build against the stricter 5.85 level
2021-10-11 21:59:39 +02:00
Jonathan Riddell
57c06d0e00 Update kf5 version requirement to 5.86
GIT_SILENT
2021-10-11 20:48:20 +01:00
Vlad Zahorodnii
5be593d4e4 wayland: Drop internal connection
It's practically unused now.
2021-10-07 13:28:08 +00:00
Alex Richardson
8ab41804f0 Increase minimum KDecoration2 version
I just got a build failure because I hadn't updated KDecoration to
include 195bcf36df.
Bump the minimum version to trigger a CMake error instead of a
compilation failure. Since we expect to be using the same version of
KDecoration as KWin, this change uses ${PROJECT_VERSION} as the minimum
version.
2021-10-07 07:40:16 +00:00
Jonathan Riddell
35ff7eb0ed Update version number for 5.23.80
GIT_SILENT
2021-09-16 10:33:42 +01:00