938 Commits (9f18d5fdfca1f4658f388cc25cac4a4867eb3003)

Author SHA1 Message Date
Aleix Pol Gonzalez 49a76ea772 Install KWaylandServer headers
There are use cases for the headers to be used, e.g. when implementing
wayland-specific workflows from an Effect.
In order to be able to use these, we also need to expose libkwin to be
imported as it carries the interfaces' symbols.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
1 year ago
Vlad Zahorodnii e1980c0009 cmake: Search for KF6Service
KF6Plasma no longer pulls it.
1 year ago
Marco Martin 569e0f8f64 Port to KSvg
port Svg and FrameSvg items to KSvg
1 year ago
Laurent Montel 9ebc3e298f We use qt6 now 1 year ago
Aleix Pol 52a96996f3 Do not look up kcm dependencies if KWIN_BUILD_KCMS=OFF
We are not going to use them anyway...
1 year ago
Xaver Hugl 4f9f73e28d utils/edid: use libdisplay-info 1 year ago
Vlad Zahorodnii d2b0ed0c5a wayland: Implement wl_surface.preferred_buffer_scale and wl_surface.preferred_buffer_transform
The new events provide a way to tell the client what buffer scale and
buffer transform to use as they may lack the context to make a proper
decision.
1 year ago
Vlad Zahorodnii 70d76791d8 cmake: Correct gbm version check
It appears like gbm_VERSION can be a list, which if() does not like. So
pass the variable to the if() rather than its value. While on this, also
change GREATER_EQUAL to VERSION_GREATER_EQUAL so cmake compares
individual version components.
1 year ago
Vlad Zahorodnii 0a82f33db5 Drop XCB_ICCCM_FOUND checks
Qt requires xcb-icccm 0.3.9. On the other hand, 0.3.9 contains all the
types and functions used by kwin, so remove the corresponding
XCB_ICCM_FOUND checks to simplify the code.
1 year ago
Andreas Cord-Landwehr 258e9d8426 Extend GLX switch to check if QtGui was being built with GLX plugin
Even though epoxy with GLX may be present, Qt's native interface only
exposes GLX API when it was being built with GLX support.
1 year ago
Vlad Zahorodnii a89573224c Drop Qt6WaylandClientMacros.cmake fork 1 year ago
Nicolas Fella 8a0a91fea1 Port to standalone kglobalacceld 1 year ago
Aleix Pol d0b87a900f screencasting: Add an autotest
Adds an autotest that makes sure a screencasting stream works as
expected.
Adds an optional dependency to KPipeWire only effective to run the test.
1 year ago
Vlad Zahorodnii f20cf30693 Fix populating CMAKE_AUTOMOC_MACRO_NAMES with kwineffects macros
Apparently CMAKE_AUTOMOC_MACRO_NAMES modifications are not visible in
sibling directories. To work around that, populate
CMAKE_AUTOMOC_MACRO_NAMES with libkwineffects plugin macros in the
top level CMakeLists.txt file.
2 years ago
Vlad Zahorodnii 1211d8e3d6 Prefix more kwineffects includes with libkwineffects/ 2 years ago
Vlad Zahorodnii e88a4e34a3 Remove some include_directories()
It seems we've settled on dir/dir/header.h includes, so let's use them
consistently.
2 years ago
Vlad Zahorodnii 2c0acdca11 Drop unused kitemviews dependency
Seems unused. KWin compiles fine without it.
2 years ago
Vlad Zahorodnii 9aebfcb2ff Include src/ directory in the proper place
There's other code that includes headers starting from src/ directory,
so putting the corresponding include_directory() in src/effects/ is
inappropriate.
2 years ago
Friedrich W. H. Kossebau b2a50cffd8 Adapt to Qt6 name of QAccessibilityClient 2 years ago
Vlad Zahorodnii 19fec2a657 backends/x11: Use DRI3 directly
At the moment, the buffers for wsi are allocated implicitly by the EGL
implementation, which is fine for "normal" use cases. But we start
hitting the ceiling the moment we need to something more advanced. For
example the EGL backend creates a dummy fbo object wrapping the default
framebuffer, meaning that we cannot pass it to qtquick (because it can
use its own opengl context).

Another reason for using explicit buffers is that it lets us to clean up
some output related abstractions.
2 years ago
Vlad Zahorodnii 49977d38f2 build: Remove redundant find_package() for Wayland::Client
find_package(Wayland) already takes of the client lib, it's needed by
the wayland backend, so BUILD_TESTING specific find_package() can be
merged with it.
2 years ago
Vlad Zahorodnii 5184a630bb build: Search for wayland client libs only when building tests 2 years ago
Vlad Zahorodnii b93e01a724 Drop old kconf update scripts 2 years ago
Vlad Zahorodnii 10df3b0eb0 Remove Qt 5 specific code 2 years ago
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