2015-05-05 15:58:09 +00:00
|
|
|
set(WAYLAND_BACKEND_SOURCES
|
|
|
|
logging.cpp
|
|
|
|
scene_qpainter_wayland_backend.cpp
|
|
|
|
wayland_backend.cpp
|
[platforms/wayland] Multi output support
Summary:
This patch rewrites large parts of the Wayland platform plugin, in order to
facilitate the testing of multi output behavior in nested KWin sessions.
For that a new class WaylandOutput is introduced, which is based on
AbstractOutput and by that shares functionality with our virtual and DRM
platform plugins.
The EGL/GBM and QPainter backends have been remodelled after the DRM one,
sharing similiarities there as well now.
Pointer grabbing has been rewritten to support multiple outputs, now using
pointer locking instead of confining and drawing in this case onto a sub-
surface, which get dynamically recreated in between the different output
surfaces while the cursor is being moved.
Window resizing is possible if host supports xdg-shell, but currently the
mode size does not yet fill the new window size.
The number of outputs can be set by command line argument `--output-count`,
scaling is also supported by setting the argument `--scale`.
Further steps could be:
* Enabling automatic fill of resized windows via Wayland mode change
* Multiple diverging initial sizes and scale factors for mulitple outputs
**Watch it in action:** https://youtu.be/FYItn1jvkbI
Test Plan: Tested it in live session.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18465
2019-02-22 09:57:07 +00:00
|
|
|
wayland_output.cpp
|
2015-05-05 15:58:09 +00:00
|
|
|
)
|
|
|
|
|
2019-09-17 09:15:35 +00:00
|
|
|
if (HAVE_WAYLAND_EGL)
|
2015-11-30 07:34:52 +00:00
|
|
|
set(WAYLAND_BACKEND_SOURCES egl_wayland_backend.cpp ${WAYLAND_BACKEND_SOURCES})
|
2020-10-06 23:36:18 +00:00
|
|
|
if (HAVE_GBM)
|
|
|
|
list(APPEND WAYLAND_BACKEND_SOURCES ../drm/gbm_dmabuf.cpp)
|
|
|
|
endif()
|
2015-11-30 07:34:52 +00:00
|
|
|
endif()
|
|
|
|
|
2015-05-05 15:58:09 +00:00
|
|
|
add_library(KWinWaylandWaylandBackend MODULE ${WAYLAND_BACKEND_SOURCES})
|
2018-12-06 17:38:36 +00:00
|
|
|
set_target_properties(KWinWaylandWaylandBackend PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.waylandbackends/")
|
2017-08-11 19:40:49 +00:00
|
|
|
target_link_libraries(KWinWaylandWaylandBackend kwin KF5::WaylandClient SceneQPainterBackend)
|
2015-11-30 07:34:52 +00:00
|
|
|
|
2019-09-17 09:15:35 +00:00
|
|
|
if (HAVE_WAYLAND_EGL)
|
2020-10-06 23:36:18 +00:00
|
|
|
target_link_libraries(KWinWaylandWaylandBackend SceneOpenGLBackend Wayland::Egl)
|
|
|
|
if (HAVE_GBM)
|
|
|
|
target_link_libraries(KWinWaylandWaylandBackend gbm::gbm)
|
|
|
|
endif()
|
2015-11-30 07:34:52 +00:00
|
|
|
endif()
|
2015-05-05 15:58:09 +00:00
|
|
|
|
|
|
|
install(
|
|
|
|
TARGETS
|
|
|
|
KWinWaylandWaylandBackend
|
|
|
|
DESTINATION
|
2021-01-29 10:34:52 +00:00
|
|
|
${KDE_INSTALL_PLUGINDIR}/org.kde.kwin.waylandbackends/
|
2015-05-05 15:58:09 +00:00
|
|
|
)
|