diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -396,7 +396,6 @@
abstract_client.cpp
abstract_opengl_context_attribute_builder.cpp
abstract_output.cpp
- abstract_wayland_output.cpp
activation.cpp
appmenu.cpp
atoms.cpp
@@ -561,6 +560,46 @@
shortcutdialog.ui
)
+set(kwin_XWAYLAND_SRCS
+ ${CMAKE_CURRENT_SOURCE_DIR}/xwl/clipboard.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/xwl/databridge.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/xwl/dnd.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/xwl/drag.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/xwl/drag_wl.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/xwl/drag_x.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/xwl/selection.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/xwl/selection_source.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/xwl/transfer.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/xwl/xwayland.cpp
+)
+include(ECMQtDeclareLoggingCategory)
+ecm_qt_declare_logging_category(kwin_XWAYLAND_SRCS
+ HEADER
+ xwayland_logging.h
+ IDENTIFIER
+ KWIN_XWL
+ CATEGORY_NAME
+ kwin_xwl
+ DEFAULT_SEVERITY
+ Critical
+)
+
+set(kwin_WAYLAND_SRCS
+ abstract_wayland_output.cpp
+ tabletmodemanager.cpp
+)
+include(ECMQtDeclareLoggingCategory)
+ecm_qt_declare_logging_category(kwin_WAYLAND_SRCS
+ HEADER
+ wayland_logging.h
+ IDENTIFIER
+ KWIN_WL
+ CATEGORY_NAME
+ kwin_wl
+ DEFAULT_SEVERITY
+ Critical
+)
+
########### target link libraries ###############
set(kwin_OWN_LIBS
@@ -639,56 +678,38 @@
Libinput::Libinput
)
+set(kwinWlLibs
+ # TODO: move Wayland only libs from kwinLibs here
+)
+
add_library(kwin SHARED ${kwin_KDEINIT_SRCS})
+add_library(kwinwl SHARED ${kwin_XWAYLAND_SRCS} ${kwin_WAYLAND_SRCS})
set_target_properties(kwin PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR}
)
+set_target_properties(kwinwl PROPERTIES
+ VERSION ${PROJECT_VERSION}
+ SOVERSION ${PROJECT_VERSION_MAJOR}
+)
target_link_libraries(kwin ${kwinLibs})
generate_export_header(kwin EXPORT_FILE_NAME kwin_export.h)
target_link_libraries(kwin kwinglutils ${epoxy_LIBRARY})
+target_link_libraries(kwinwl kwin ${kwinWlLibs})
kf5_add_kdeinit_executable(kwin_x11 main_x11.cpp)
target_link_libraries(kdeinit_kwin_x11 kwin KF5::Crash Qt5::X11Extras)
install(TARGETS kwin ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
+install(TARGETS kwinwl ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
install(TARGETS kdeinit_kwin_x11 ${INSTALL_TARGETS_DEFAULT_ARGS})
install(TARGETS kwin_x11 ${INSTALL_TARGETS_DEFAULT_ARGS})
-set(kwin_XWAYLAND_SRCS
- ${CMAKE_CURRENT_SOURCE_DIR}/xwl/clipboard.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/xwl/databridge.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/xwl/dnd.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/xwl/drag.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/xwl/drag_wl.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/xwl/drag_x.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/xwl/selection.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/xwl/selection_source.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/xwl/transfer.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/xwl/xwayland.cpp
-)
-include(ECMQtDeclareLoggingCategory)
-ecm_qt_declare_logging_category(kwin_XWAYLAND_SRCS
- HEADER
- xwayland_logging.h
- IDENTIFIER
- KWIN_XWL
- CATEGORY_NAME
- kwin_xwl
- DEFAULT_SEVERITY
- Critical
-)
-
-set(kwin_WAYLAND_SRCS
- main_wayland.cpp
- tabletmodemanager.cpp
-)
-
-add_executable(kwin_wayland ${kwin_WAYLAND_SRCS} ${kwin_XWAYLAND_SRCS})
-target_link_libraries(kwin_wayland kwin KF5::Crash)
+add_executable(kwin_wayland main_wayland.cpp)
+target_link_libraries(kwin_wayland kwinwl KF5::Crash)
if (HAVE_LIBCAP)
target_link_libraries(kwin_wayland ${Libcap_LIBRARIES})
endif()
diff --git a/abstract_wayland_output.cpp b/abstract_wayland_output.cpp
--- a/abstract_wayland_output.cpp
+++ b/abstract_wayland_output.cpp
@@ -18,6 +18,8 @@
along with this program. If not, see .
*********************************************************************/
#include "abstract_wayland_output.h"
+
+#include
#include "wayland_server.h"
// KWayland
@@ -115,28 +117,28 @@
void AbstractWaylandOutput::applyChanges(const KWayland::Server::OutputChangeSet *changeSet)
{
- qCDebug(KWIN_CORE) << "Apply changes to the Wayland output.";
+ qCDebug(KWIN_WL) << "Apply changes to the Wayland output.";
bool emitModeChanged = false;
// Enablement changes are handled by platform.
if (changeSet->modeChanged()) {
- qCDebug(KWIN_CORE) << "Setting new mode:" << changeSet->mode();
+ qCDebug(KWIN_WL) << "Setting new mode:" << changeSet->mode();
m_waylandOutputDevice->setCurrentMode(changeSet->mode());
updateMode(changeSet->mode());
emitModeChanged = true;
}
if (changeSet->transformChanged()) {
- qCDebug(KWIN_CORE) << "Server setting transform: " << (int)(changeSet->transform());
+ qCDebug(KWIN_WL) << "Server setting transform: " << (int)(changeSet->transform());
transform(changeSet->transform());
emitModeChanged = true;
}
if (changeSet->positionChanged()) {
- qCDebug(KWIN_CORE) << "Server setting position: " << changeSet->position();
+ qCDebug(KWIN_WL) << "Server setting position: " << changeSet->position();
setGlobalPos(changeSet->position());
// may just work already!
}
if (changeSet->scaleChanged()) {
- qCDebug(KWIN_CORE) << "Setting scale:" << changeSet->scale();
+ qCDebug(KWIN_WL) << "Setting scale:" << changeSet->scale();
setScale(changeSet->scaleF());
emitModeChanged = true;
}
@@ -252,7 +254,7 @@
int i = 0;
for (auto mode : modes) {
- qCDebug(KWIN_CORE).nospace() << "Adding mode " << ++i << ": " << mode.size << " [" << mode.refreshRate << "]";
+ qCDebug(KWIN_WL).nospace() << "Adding mode " << ++i << ": " << mode.size << " [" << mode.refreshRate << "]";
m_waylandOutputDevice->addMode(mode);
}
diff --git a/autotests/integration/CMakeLists.txt b/autotests/integration/CMakeLists.txt
--- a/autotests/integration/CMakeLists.txt
+++ b/autotests/integration/CMakeLists.txt
@@ -9,12 +9,12 @@
set(multiValueArgs SRCS LIBS)
cmake_parse_arguments(ARGS "${optionArgs}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
add_executable(${ARGS_NAME} ${ARGS_SRCS})
- target_link_libraries(${ARGS_NAME} KWinIntegrationTestFramework kwin Qt5::Test ${ARGS_LIBS})
+ target_link_libraries(${ARGS_NAME} KWinIntegrationTestFramework kwinwl Qt5::Test ${ARGS_LIBS})
add_test(NAME kwin-${ARGS_NAME} COMMAND dbus-run-session ${CMAKE_BINARY_DIR}/bin/${ARGS_NAME})
if (${ARGS_WAYLAND_ONLY})
add_executable(${ARGS_NAME}_waylandonly ${ARGS_SRCS})
set_target_properties(${ARGS_NAME}_waylandonly PROPERTIES COMPILE_DEFINITIONS "NO_XWAYLAND")
- target_link_libraries(${ARGS_NAME}_waylandonly KWinIntegrationTestFramework kwin Qt5::Test ${ARGS_LIBS})
+ target_link_libraries(${ARGS_NAME}_waylandonly KWinIntegrationTestFramework kwinwl Qt5::Test ${ARGS_LIBS})
add_test(NAME kwin-${ARGS_NAME}-waylandonly COMMAND dbus-run-session ${CMAKE_BINARY_DIR}/bin/${ARGS_NAME}_waylandonly)
endif()
endfunction()
diff --git a/plugins/platforms/drm/CMakeLists.txt b/plugins/platforms/drm/CMakeLists.txt
--- a/plugins/platforms/drm/CMakeLists.txt
+++ b/plugins/platforms/drm/CMakeLists.txt
@@ -32,7 +32,7 @@
add_library(KWinWaylandDrmBackend MODULE ${DRM_SOURCES})
set_target_properties(KWinWaylandDrmBackend PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.waylandbackends/")
-target_link_libraries(KWinWaylandDrmBackend kwin Libdrm::Libdrm SceneQPainterBackend SceneOpenGLBackend)
+target_link_libraries(KWinWaylandDrmBackend kwinwl Libdrm::Libdrm SceneQPainterBackend SceneOpenGLBackend)
if (HAVE_GBM)
target_link_libraries(KWinWaylandDrmBackend gbm::gbm)
diff --git a/plugins/platforms/fbdev/CMakeLists.txt b/plugins/platforms/fbdev/CMakeLists.txt
--- a/plugins/platforms/fbdev/CMakeLists.txt
+++ b/plugins/platforms/fbdev/CMakeLists.txt
@@ -6,7 +6,7 @@
add_library(KWinWaylandFbdevBackend MODULE ${FBDEV_SOURCES})
set_target_properties(KWinWaylandFbdevBackend PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.waylandbackends/")
-target_link_libraries(KWinWaylandFbdevBackend kwin SceneQPainterBackend)
+target_link_libraries(KWinWaylandFbdevBackend kwinwl SceneQPainterBackend)
install(
TARGETS
diff --git a/plugins/platforms/hwcomposer/CMakeLists.txt b/plugins/platforms/hwcomposer/CMakeLists.txt
--- a/plugins/platforms/hwcomposer/CMakeLists.txt
+++ b/plugins/platforms/hwcomposer/CMakeLists.txt
@@ -9,7 +9,7 @@
add_library(KWinWaylandHwcomposerBackend MODULE ${HWCOMPOSER_SOURCES})
set_target_properties(KWinWaylandHwcomposerBackend PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.waylandbackends/")
target_link_libraries(KWinWaylandHwcomposerBackend
- kwin
+ kwinwl
SceneOpenGLBackend
diff --git a/plugins/platforms/virtual/CMakeLists.txt b/plugins/platforms/virtual/CMakeLists.txt
--- a/plugins/platforms/virtual/CMakeLists.txt
+++ b/plugins/platforms/virtual/CMakeLists.txt
@@ -12,7 +12,7 @@
add_library(KWinWaylandVirtualBackend MODULE ${VIRTUAL_SOURCES})
set_target_properties(KWinWaylandVirtualBackend PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.waylandbackends/")
-target_link_libraries(KWinWaylandVirtualBackend kwin SceneQPainterBackend SceneOpenGLBackend)
+target_link_libraries(KWinWaylandVirtualBackend kwinwl SceneQPainterBackend SceneOpenGLBackend)
install(
TARGETS
diff --git a/plugins/platforms/wayland/CMakeLists.txt b/plugins/platforms/wayland/CMakeLists.txt
--- a/plugins/platforms/wayland/CMakeLists.txt
+++ b/plugins/platforms/wayland/CMakeLists.txt
@@ -12,7 +12,7 @@
include_directories(${CMAKE_SOURCE_DIR}/platformsupport/scenes/opengl)
add_library(KWinWaylandWaylandBackend MODULE ${WAYLAND_BACKEND_SOURCES})
set_target_properties(KWinWaylandWaylandBackend PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.waylandbackends/")
-target_link_libraries(KWinWaylandWaylandBackend kwin KF5::WaylandClient SceneQPainterBackend)
+target_link_libraries(KWinWaylandWaylandBackend kwinwl KF5::WaylandClient SceneQPainterBackend)
if (HAVE_WAYLAND_EGL)
target_link_libraries(KWinWaylandWaylandBackend SceneOpenGLBackend Wayland::Egl)
diff --git a/plugins/platforms/x11/windowed/CMakeLists.txt b/plugins/platforms/x11/windowed/CMakeLists.txt
--- a/plugins/platforms/x11/windowed/CMakeLists.txt
+++ b/plugins/platforms/x11/windowed/CMakeLists.txt
@@ -9,7 +9,7 @@
include_directories(${CMAKE_SOURCE_DIR}/platformsupport/scenes/opengl)
add_library(KWinWaylandX11Backend MODULE ${X11BACKEND_SOURCES})
set_target_properties(KWinWaylandX11Backend PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.waylandbackends/")
-target_link_libraries(KWinWaylandX11Backend eglx11common kwin kwinxrenderutils X11::XCB SceneQPainterBackend SceneOpenGLBackend)
+target_link_libraries(KWinWaylandX11Backend eglx11common kwinwl kwinxrenderutils X11::XCB SceneQPainterBackend SceneOpenGLBackend)
if (X11_Xinput_FOUND)
target_link_libraries(KWinWaylandX11Backend ${X11_Xinput_LIB})
endif()
diff --git a/tabletmodemanager.h b/tabletmodemanager.h
--- a/tabletmodemanager.h
+++ b/tabletmodemanager.h
@@ -24,10 +24,11 @@
#include
#include
+#include
namespace KWin {
-class TabletModeManager : public QObject
+class KWIN_EXPORT TabletModeManager : public QObject
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "org.kde.KWin.TabletModeManager")
diff --git a/xwl/xwayland.h b/xwl/xwayland.h
--- a/xwl/xwayland.h
+++ b/xwl/xwayland.h
@@ -22,6 +22,8 @@
#include "xwayland_interface.h"
+#include
+
#include
class QProcess;
@@ -36,7 +38,7 @@
{
class DataBridge;
-class Xwayland : public XwaylandInterface
+class KWIN_EXPORT Xwayland : public XwaylandInterface
{
Q_OBJECT