914 Commits (d9f5d432bede5d87293104ba12ab437bf7c888e2)

Author SHA1 Message Date
Vlad Zahorodnii d9f5d432be Port to KF6 2 years ago
Jonathan Esk-Riddell 3de1498252 Update version number for 5.27.80
GIT_SILENT
2 years ago
Jonathan Esk-Riddell 0c1e73ce82 Update kf5 version requirement to 5.102.0
GIT_SILENT
2 years ago
Jonathan Esk-Riddell a873830a86 Update version number for 5.28.80
GIT_SILENT
2 years ago
Jonathan Esk-Riddell 0e0b9dea12 Update version number for 5.26.90
GIT_SILENT
2 years ago
Weng Xuetian 6e87fae7f7 Support XKB_CONTEXT_NO_SECURE_GETENV flag
Since kwin play with CAP_SYS_NICE, secure_getenv will fail for xkbcommon
to load user level xkbmap. This allows kwin to load config under
~/.config/xkb

BUG: 447206
2 years ago
Asahi Lina a508149882 dmabuf: Create buffers without the SCANOUT flag
gbm_bo_create_with_modifiers implies the GBM_BO_USE_SCANOUT flag, which
disables complex (tiled or compressed) formats that cannot be used for
scanout. This reduces performance. We don't need to scan out buffers
created for sceencasting/etc., so this is suboptimal.

By switching to gbm_bo_create_with_modifiers2, we can explicitly pass
the flags and avoid falling back to lower performance formats. Also add
a config check and fall back to the old version, to retain compatibility
with older mesa versions.
2 years ago
Vlad Zahorodnii ae4c3c1a65 backends/x11: Use PRESENT extension to get notified about frame completion
Currently, we use a timer to get notified when a frame is presented, but
there's a better way using PRESENT extension's PresentCompleteNotify events.

Note that we implicitly rely on the fact that EGL implementation uses
the PRESENT extension to present pixmaps, which is usually the case.
QPainter backend needs some adjustments.
2 years ago
David Edmundson c4b134da8d Implement wp-fractional-scale-v1
This allows clients to provide buffers at native resolutions when
fractional scaling is used.

Virtual backend is adjusted to support scales as floats
2 years ago
Vlad Zahorodnii 182026a4bd backends/wayland: Use linux-dmabuf directly
The main motivation behind this change is to get rid of the dependency
on EGLSurface so the order in which output layers are presented or
updated doesn't matter.

At the moment, if both the cursor and the primary layers are updated
within same frame, the read and draw surfaces in present() will be wrong
for the primary layer.

With fbos, the read and draw surfaces won't matter.
2 years ago
Xaver Hugl b261050be1 wayland: implement tearing_control_v1 2 years ago
Luigi Toscano c18a0b80bf Install translated documentation from po/ too
... when KDocTools is found.
2 years ago
Vlad Zahorodnii f881bdf51b backends/drm: Use drmModeGetConnectorTypeName()
It ensures that connector type naming is consistent across compositors
and saves us some work adding string mappings.

drmModeGetConnectorTypeName() uses the same naming scheme as the drm
backend so the client side should be unaffected by this change.

CCBUG: 385135
2 years ago
Vlad Zahorodnii 632c3508a7 build: Move libkwineffects specific ecm_setup_qtplugin_macro_names to src/libkwineffects 2 years ago
Vlad Zahorodnii a235cd6d26 build: Hardcode kwin name
We use KWIN_NAME, KWIN_INTERNAL_NAME_X11 and KWIN_INTERNAL_WAYLAND
properly only in a few places. In other, we use hardcoded names.

Let's not bother and hardcode kwin names everywhere rather than have one
foot in and one foot out, it's simpler.
2 years ago
Vlad Zahorodnii 432a5ab575 build: Remove include_directories(XKB) 2 years ago
Vlad Zahorodnii 569dc29ba4 build: Remove duplicate "REQUIRED"
Packages are already marked as REQUIRED using set_package_properties()
2 years ago
Vlad Zahorodnii 993c4e2d05 build: Mark KDecoration2 REQUIRED using set_package_properties()
This way there will be a more complete list of missing dependencies in
the feature summary.
2 years ago
Vlad Zahorodnii fe86eea311 build: Avoid mixing add_definitions() with find_package() 2 years ago
Vlad Zahorodnii a5db2e732b build: Group CMAKE_{C,CXX}_STANDARD 2 years ago
Vlad Zahorodnii 44ad8e9b9b build: Group include()s in CMakeLists.txt 2 years ago
Vlad Zahorodnii 7fffe99328 build: Add -Wno-unused-parameter compiler option
Due to being a compositor, kwin has to conform to some certain
interfaces. It means a lot of virtual functions and function tables to
integrate with C APIs. Naturally, we not always want to use every
argument in such functions.

Since we get -Wunused-parameter from -Wall, we have to plumb those
unused arguments in order to suppress compiler warnings at the moment.

However, I don't think that extra work is worth it. We cannot change or
alter prototypes in any way to fix the warning the desired way. Q_UNUSED
and similar macros are not good indicators of whether an argument is
used too, we tend to overlook putting or removing those macros. I've
also noticed that Q_UNUSED are not used to guide us with the removal no
longer needed parameters.

Therefore, I think it's worth adding -Wno-unused-parameter compiler
option to stop the compiler producing warnings about unused parameters.
It changes nothing except that we don't need to put Q_UNUSED anymore,
which can be really cumbersome sometimes. Note that it doesn't affect
unused variables, you'll still get a -Wunused-variable compiler warning
if a variable is unused.
2 years ago
Vlad Zahorodnii de3aa69c1e Fix some tests not building with Qt 6
Client-side wrappers for input-method-unstable-v1 fail to build because
wl_keyboard_interface is referenced in the header file generated by
wayland-scanner.

Unfortunately, qt6_generate_wayland_protocol_client_sources() forces
--include-core-only argument, this is addressed in Qt 6.4.1, but in
meanwhile let's ship a copy of Qt6WaylandClientMacros.cmake file until
the required Qt version is out.
2 years ago
Vlad Zahorodnii 0c28de5b42 wayland: Add support for ext-idle-notify-v1
Wayland protocols MR: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/29
2 years ago
Vlad Zahorodnii c147340878 wayland: Add support for high resolution scrolling
In libinput 1.19, three new pointer axis events were added in order to
provide support for high-resolution scrolling.

LIBINPUT_EVENT_POINTER_AXIS is de-facto deprecated and new users of
libinput should use instead SCROLL_WHEEL, SCROLL_FINGER, and
SCROLL_CONTINUOUS.

Discrete deltas were replaced with v120 delta values. 120 corresponds to
a single discrete delta. Smaller values correspond to "partial" wheel
ticks.

https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/72
2 years ago
Vlad Zahorodnii bcd43ff44d backends/x11: Implement own keyboard interception
At the moment, the keyboard interception code in the effects system
relies on Qt code processing key events. However, since QDesktopWidget
is removed in Qt 6, this is a blocker for Qt 6 port.

This change ports the X11 backend to private xkb keymap as indicates in
the todo comment. It allows us to drop the last QDesktopWidget usage.
2 years ago
Nicolas Fella 4a10dfeeff Install po folder 2 years ago
Vlad Zahorodnii 169c784c51 wayland: Bump plasmashell protocol version
See https://invent.kde.org/libraries/plasma-wayland-protocols/-/merge_requests/48
2 years ago
Jonathan Esk-Riddell 48f684ca73 Update version number for 5.26.80
GIT_SILENT
2 years ago
Jonathan Esk-Riddell 8516faa6ad Update version number for 5.25.90
GIT_SILENT
2 years ago
Jonathan Esk-Riddell d053efde4c Update kf5 version requirement to 5.98.0
GIT_SILENT
2 years ago
Volker Krause 192a57e2e1 Port thumbnail item to use Qt Shader Tools for Qt 6 2 years ago
Xaver Hugl c4b9626117 backends/drm: replace manual IN_FORMATS parsing with libdrm functions
!2819 reminded me that it's time to replace this mess with libdrm functions

Upstream MR: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/146
2 years ago
Heiko Becker 3eaf811352 CMake: Require at least plasma-wayland-protocols >= 1.8
It needs [1] from plasma-wayland-protocols.git or fails with
"outputmanagement_v2_interface.cpp:214:50: error:
'error_already_applied' was not declared in this scope" otherwise.

[1] f882bd942283262c27811a937e0d674d365ed72a
2 years ago
Kai Uwe Broulik 3646620430 utils: Introduce RamFile class for memfd
This class can be used to create an anonymous file, for instance
to pass data between compositor and clients, through means of a
file descriptor, as is done in various Wayland protocols, notably
the keymap exchange.

It also implements sealing the file, so that it can be shared
between multiple clients without them being able to modify it.

If supported, memfd_create is used, otherwise a `QTemporaryFile`
is used.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2 years ago
Kai Uwe Broulik 84bde36cc0 Make EGL a REQUIRED dependency
Target kwin links against EGL::EGL unconditionally.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2 years ago
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
2 years ago
Volker Krause f8516c1b42 Port remaining QQC1 uses 2 years ago
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
2 years ago
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.
2 years ago
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.
2 years ago
Jonathan Esk-Riddell dfc6c87057 Update qt5 version requirement to 5.15.2
GIT_SILENT
2 years ago
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.
2 years ago
Méven Car 9cc73a5bc6 Bump KF5_MIN_VERSION after b069aad160e514ec2f933f654ddcbbc6aca59ed5
GIT_SILENT
NO_CHANGELOG
2 years ago
Jonathan Esk-Riddell e08cd40e8e Update version number for 5.25.80
GIT_SILENT
2 years ago
Jonathan Esk-Riddell 8f009c2db1 Update version number for 5.24.90
GIT_SILENT
2 years ago
Nicolas Fella a902e78ff4 Mark libxcvt as required
It's used unconditionally later on

Make sure it fails at the appropriate time when not found
2 years ago
Nicolas Fella 774dbf8d2f Use ECMFindQmlModule instead of ECMQmlModules 2 years ago
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
2 years ago
Alexander Lohnau 719e97194d Port KWin Scripts KCM to QML
Task: https://phabricator.kde.org/T7289
2 years ago