From b64f95b703e101d60369a15a0588fe104be646a8 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 22 Apr 2022 12:27:33 +0300 Subject: [PATCH] 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. --- .kde-ci.yml | 1 - CMakeLists.txt | 38 +- autotests/CMakeLists.txt | 6 +- .../dont_crash_cursor_physical_size_empty.cpp | 4 +- .../integration/globalshortcuts_test.cpp | 4 +- .../integration/idle_inhibition_test.cpp | 5 +- .../integration/input_stacking_order.cpp | 3 +- autotests/integration/inputmethod_test.cpp | 8 +- autotests/integration/internal_window.cpp | 3 +- autotests/integration/lockscreen.cpp | 4 +- autotests/integration/plasmawindow_test.cpp | 2 +- .../integration/pointer_constraints_test.cpp | 4 +- autotests/integration/pointer_input.cpp | 5 +- autotests/integration/scene_qpainter_test.cpp | 4 +- autotests/integration/test_helpers.cpp | 2 +- autotests/integration/transient_placement.cpp | 4 +- autotests/integration/xdgshellclient_test.cpp | 5 +- autotests/integration/xwayland_input_test.cpp | 3 +- .../integration/xwayland_selections_test.cpp | 3 +- src/CMakeLists.txt | 5 +- src/abstract_client.cpp | 9 +- src/backends/drm/dmabuf_feedback.cpp | 5 +- src/backends/drm/drm_buffer_gbm.cpp | 5 +- src/backends/drm/drm_gpu.cpp | 3 +- src/backends/drm/drm_lease_output.cpp | 2 +- src/backends/drm/drm_lease_output.h | 2 +- src/backends/drm/egl_gbm_backend.cpp | 7 +- src/backends/drm/egl_gbm_layer.cpp | 5 +- src/backends/drm/egl_gbm_layer_surface.cpp | 9 +- src/backends/drm/virtual_egl_gbm_layer.cpp | 5 +- src/backends/fakeinput/fakeinputbackend.cpp | 3 +- src/backends/fakeinput/fakeinputdevice.cpp | 3 +- src/composite.cpp | 3 +- src/debug_console.cpp | 21 +- src/decorations/decorationbridge.cpp | 4 +- src/dpmsinputeventfilter.cpp | 3 +- src/effects/backgroundcontrast/CMakeLists.txt | 3 +- src/effects/backgroundcontrast/contrast.cpp | 7 +- src/effects/backgroundcontrast/contrast.h | 5 +- src/effects/blur/CMakeLists.txt | 3 +- src/effects/blur/blur.cpp | 7 +- src/effects/blur/blur.h | 5 +- src/effects/slidingpopups/CMakeLists.txt | 3 +- src/effects/slidingpopups/slidingpopups.cpp | 7 +- src/effects/slidingpopups/slidingpopups.h | 5 +- src/events.cpp | 5 +- src/idle_inhibition.cpp | 5 +- src/input.cpp | 12 +- src/inputmethod.cpp | 12 +- src/inputmethod.h | 3 +- src/inputpanelv1client.cpp | 10 +- src/inputpanelv1client.h | 2 +- src/inputpanelv1integration.cpp | 5 +- src/keyboard_input.cpp | 8 +- src/keyboard_repeat.cpp | 5 +- src/layershellv1client.cpp | 7 +- src/layershellv1integration.cpp | 5 +- src/linux_dmabuf.h | 2 +- src/main.cpp | 2 +- src/main_wayland.cpp | 6 +- src/platform.cpp | 6 +- .../scenes/opengl/abstract_egl_backend.cpp | 2 +- .../opengl/basiceglsurfacetexture_wayland.cpp | 7 +- .../qpaintersurfacetexture_wayland.cpp | 5 +- src/plugins/idletime/poller.cpp | 4 +- src/plugins/screencast/screencastmanager.cpp | 5 +- src/plugins/screencast/screencastmanager.h | 2 +- src/plugins/screencast/screencaststream.h | 3 +- src/pointer_input.cpp | 15 +- src/popup_input_filter.cpp | 2 +- src/scene.cpp | 3 +- src/shadow.cpp | 8 +- src/surfaceitem_wayland.cpp | 7 +- src/tablet_input.cpp | 6 +- src/touch_input.cpp | 4 +- src/unmanaged.cpp | 3 +- src/utils/subsurfacemonitor.cpp | 4 +- src/virtualdesktops.cpp | 2 +- src/wayland/CMakeLists.txt | 410 ++++++------------ src/wayland/abstract_data_source.h | 6 +- src/wayland/abstract_drop_handler.h | 4 +- src/wayland/appmenu_interface.h | 7 +- src/wayland/autotests/CMakeLists.txt | 2 - src/wayland/autotests/client/CMakeLists.txt | 66 +-- .../autotests/client/test_datadevice.cpp | 17 +- .../autotests/client/test_datasource.cpp | 9 +- .../autotests/client/test_drag_drop.cpp | 13 +- src/wayland/autotests/client/test_error.cpp | 10 +- .../autotests/client/test_fake_input.cpp | 4 +- src/wayland/autotests/client/test_idle.cpp | 6 +- .../client/test_plasma_activities.cpp | 7 +- .../client/test_plasma_virtual_desktop.cpp | 9 +- .../autotests/client/test_plasmashell.cpp | 7 +- .../client/test_pointer_constraints.cpp | 10 +- .../autotests/client/test_selection.cpp | 8 +- .../client/test_server_side_decoration.cpp | 7 +- .../test_server_side_decoration_palette.cpp | 7 +- src/wayland/autotests/client/test_shadow.cpp | 8 +- .../autotests/client/test_shm_pool.cpp | 7 +- .../autotests/client/test_text_input_v2.cpp | 10 +- .../autotests/client/test_wayland_appmenu.cpp | 7 +- .../autotests/client/test_wayland_blur.cpp | 7 +- .../client/test_wayland_contrast.cpp | 7 +- .../autotests/client/test_wayland_filter.cpp | 9 +- .../autotests/client/test_wayland_output.cpp | 8 +- .../client/test_wayland_outputdevice.cpp | 6 +- .../client/test_wayland_outputmanagement.cpp | 11 +- .../autotests/client/test_wayland_seat.cpp | 26 +- .../autotests/client/test_wayland_slide.cpp | 7 +- .../client/test_wayland_subsurface.cpp | 10 +- .../autotests/client/test_wayland_surface.cpp | 14 +- .../client/test_wayland_windowmanagement.cpp | 11 +- .../autotests/client/test_xdg_decoration.cpp | 9 +- .../autotests/client/test_xdg_foreign.cpp | 9 +- .../autotests/client/test_xdg_output.cpp | 11 +- .../autotests/client/test_xdg_shell.cpp | 12 +- src/wayland/autotests/server/CMakeLists.txt | 30 +- .../server/test_datacontrol_interface.cpp | 12 +- src/wayland/autotests/server/test_display.cpp | 8 +- .../server/test_inputmethod_interface.cpp | 8 +- ...keyboard_shortcuts_inhibitor_interface.cpp | 8 +- .../server/test_layershellv1_interface.cpp | 10 +- .../server/test_no_xdg_runtime_dir.cpp | 2 +- .../autotests/server/test_screencast.cpp | 8 +- src/wayland/autotests/server/test_seat.cpp | 8 +- .../server/test_tablet_interface.cpp | 8 +- .../server/test_textinputv3_interface.cpp | 10 +- .../server/test_viewporter_interface.cpp | 8 +- src/wayland/blur_interface.h | 8 +- src/wayland/clientbuffer.h | 6 +- src/wayland/clientbufferintegration.h | 2 +- src/wayland/clientconnection.h | 6 +- src/wayland/compositor_interface.h | 6 +- src/wayland/contrast_interface.h | 8 +- src/wayland/datacontroldevice_v1_interface.h | 6 +- .../datacontroldevicemanager_v1_interface.h | 6 +- src/wayland/datacontroloffer_v1_interface.h | 6 +- src/wayland/datacontrolsource_v1_interface.h | 7 +- src/wayland/datadevice_interface.h | 8 +- src/wayland/datadevicemanager_interface.h | 5 +- src/wayland/dataoffer_interface.h | 6 +- src/wayland/datasource_interface.h | 7 +- src/wayland/display.cpp | 14 +- src/wayland/display.h | 6 +- src/wayland/dpms_interface.h | 6 +- src/wayland/drmclientbuffer.h | 4 +- src/wayland/drmleasedevice_v1_interface.cpp | 12 +- src/wayland/drmleasedevice_v1_interface.h | 8 +- src/wayland/fakeinput_interface.h | 8 +- src/wayland/filtered_display.h | 4 +- src/wayland/idle_interface.h | 6 +- src/wayland/idleinhibit_v1_interface.h | 6 +- src/wayland/inputmethod_v1_interface.cpp | 8 +- src/wayland/inputmethod_v1_interface.h | 12 +- src/wayland/keyboard_interface.cpp | 8 +- src/wayland/keyboard_interface.h | 6 +- .../keyboard_shortcuts_inhibit_v1_interface.h | 6 +- src/wayland/keystate_interface.h | 5 +- src/wayland/layershell_v1_interface.cpp | 4 +- src/wayland/layershell_v1_interface.h | 4 +- src/wayland/linuxdmabufv1clientbuffer.cpp | 12 +- src/wayland/linuxdmabufv1clientbuffer.h | 6 +- src/wayland/output_interface.h | 4 +- src/wayland/outputchangeset_v2.h | 3 +- .../outputconfiguration_v2_interface.cpp | 10 +- .../outputconfiguration_v2_interface.h | 6 +- src/wayland/outputdevice_v2_interface.cpp | 4 +- src/wayland/outputdevice_v2_interface.h | 6 +- src/wayland/outputmanagement_v2_interface.h | 6 +- src/wayland/plasmashell_interface.h | 8 +- src/wayland/plasmavirtualdesktop_interface.h | 8 +- .../plasmawindowmanagement_interface.cpp | 4 +- .../plasmawindowmanagement_interface.h | 12 +- src/wayland/pointer_interface.cpp | 4 +- src/wayland/pointer_interface.h | 6 +- src/wayland/pointerconstraints_v1_interface.h | 8 +- src/wayland/pointergestures_v1_interface.h | 4 +- src/wayland/primaryoutput_v1_interface.h | 6 +- .../primaryselectiondevice_v1_interface.h | 6 +- ...imaryselectiondevicemanager_v1_interface.h | 6 +- .../primaryselectionoffer_v1_interface.h | 6 +- .../primaryselectionsource_v1_interface.h | 7 +- src/wayland/relativepointer_v1_interface.h | 4 +- src/wayland/screencast_v1_interface.h | 7 +- src/wayland/seat_interface.cpp | 6 +- src/wayland/seat_interface.h | 4 +- src/wayland/seat_interface_p.h | 2 +- src/wayland/server_decoration_interface.cpp | 4 +- src/wayland/server_decoration_interface.h | 8 +- .../server_decoration_palette_interface.cpp | 4 +- .../server_decoration_palette_interface.h | 9 +- src/wayland/shadow_interface.h | 8 +- src/wayland/shmclientbuffer.h | 2 +- src/wayland/slide_interface.h | 8 +- src/wayland/subcompositor_interface.h | 8 +- src/wayland/surface_interface.h | 4 +- src/wayland/tablet_v2_interface.h | 20 +- src/wayland/tests/CMakeLists.txt | 4 +- src/wayland/tests/renderingservertest.cpp | 18 +- src/wayland/tests/waylandservertest.cpp | 10 +- src/wayland/textinput.h | 4 +- src/wayland/textinput_v2_interface.h | 6 +- src/wayland/textinput_v3_interface.h | 5 +- src/wayland/touch_interface.h | 4 +- src/wayland/utils.h | 4 +- src/wayland/viewporter_interface.h | 4 +- src/wayland/xdgactivation_v1_interface.cpp | 1 - src/wayland/xdgactivation_v1_interface.h | 4 +- src/wayland/xdgdecoration_v1_interface.h | 6 +- src/wayland/xdgforeign_v2_interface.h | 6 +- src/wayland/xdgoutput_v1_interface.h | 8 +- src/wayland/xdgshell_interface.h | 12 +- src/wayland_server.cpp | 78 ++-- src/waylandclient.cpp | 9 +- src/waylandoutput.h | 7 +- src/waylandoutputdevicev2.h | 5 +- src/xdgactivationv1.cpp | 8 +- src/xdgshellclient.cpp | 16 +- src/xdgshellclient.h | 3 +- src/xdgshellintegration.cpp | 5 +- src/xkb.cpp | 5 +- src/xwaylandclient.cpp | 3 +- src/xwl/clipboard.cpp | 3 +- src/xwl/databridge.cpp | 9 +- src/xwl/datasource.h | 2 +- src/xwl/dnd.cpp | 7 +- src/xwl/dnd.h | 3 +- src/xwl/drag_wl.cpp | 9 +- src/xwl/drag_wl.h | 2 +- src/xwl/drag_x.cpp | 9 +- src/xwl/drag_x.h | 2 +- src/xwl/primary.cpp | 3 +- src/xwl/selection_source.cpp | 7 +- src/xwl/transfer.cpp | 7 +- src/xwl/xwldrophandler.cpp | 3 +- src/xwl/xwldrophandler.h | 2 +- 236 files changed, 968 insertions(+), 1131 deletions(-) diff --git a/.kde-ci.yml b/.kde-ci.yml index f66f915910..3b3ceb08bd 100644 --- a/.kde-ci.yml +++ b/.kde-ci.yml @@ -33,4 +33,3 @@ Dependencies: 'plasma/breeze': '@same' 'plasma/kdecoration': '@same' 'plasma/kscreenlocker': '@same' - 'plasma/kwayland-server': '@same' diff --git a/CMakeLists.txt b/CMakeLists.txt index c19ff6eeaa..4fae7ad117 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,12 +141,6 @@ set_package_properties(KF5Kirigami2 PROPERTIES find_package(KDecoration2 ${PROJECT_VERSION} CONFIG REQUIRED) -find_package(KWaylandServer ${PROJECT_VERSION} CONFIG REQUIRED) -set_package_properties(KWaylandServer PROPERTIES - TYPE REQUIRED - PURPOSE "For Wayland integration" -) - find_package(Breeze 5.9.0 CONFIG) set_package_properties(Breeze PROPERTIES TYPE OPTIONAL @@ -196,6 +190,32 @@ if (Wayland_Egl_FOUND) set(HAVE_WAYLAND_EGL TRUE) endif() +find_package(Wayland 1.20 REQUIRED COMPONENTS + Server +) + +find_package(WaylandProtocols 1.25) +set_package_properties(WaylandProtocols PROPERTIES + TYPE REQUIRED + PURPOSE "Collection of Wayland protocols that add functionality not available in the Wayland core protocol" + URL "https://gitlab.freedesktop.org/wayland/wayland-protocols/" +) + +find_package(PlasmaWaylandProtocols CONFIG) +set_package_properties(PlasmaWaylandProtocols PROPERTIES + TYPE REQUIRED + PURPOSE "Collection of Plasma-specific Wayland protocols" + URL "https://invent.kde.org/libraries/plasma-wayland-protocols/" +) + +if (QT_MAJOR_VERSION EQUAL "5") + find_package(QtWaylandScanner) + set_package_properties(QtWaylandScanner PROPERTIES + TYPE REQUIRED + PURPOSE "Required for building KWin with Wayland support" + ) +endif() + find_package(XKB 0.7.0) set_package_properties(XKB PROPERTIES TYPE REQUIRED @@ -387,6 +407,7 @@ endif() include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}/src/libkwineffects + ${CMAKE_CURRENT_BINARY_DIR}/src/wayland ${CMAKE_CURRENT_BINARY_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR}/src/libkwineffects ${CMAKE_CURRENT_SOURCE_DIR}/src/effects @@ -416,12 +437,7 @@ add_subdirectory(kconf_update) add_subdirectory(src) if (BUILD_TESTING) - find_package(WaylandProtocols 1.19 REQUIRED) - if (QT_MAJOR_VERSION EQUAL "5") - find_package(QtWaylandScanner ${QT_MIN_VERSION} REQUIRED) - endif() find_package(Wayland REQUIRED COMPONENTS Client) - find_package(PlasmaWaylandProtocols CONFIG REQUIRED) add_subdirectory(autotests) add_subdirectory(tests) diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt index 06ff89fbc4..31d1e227b4 100644 --- a/autotests/CMakeLists.txt +++ b/autotests/CMakeLists.txt @@ -34,13 +34,14 @@ set(testVirtualDesktops_SRCS add_executable(testVirtualDesktops ${testVirtualDesktops_SRCS}) target_link_libraries(testVirtualDesktops + kwin + Qt::Test Qt::Widgets KF5::ConfigCore KF5::GlobalAccel KF5::I18n - Plasma::KWaylandServer KF5::WindowSystem ) add_test(NAME kwin-testVirtualDesktops COMMAND testVirtualDesktops) @@ -221,12 +222,13 @@ set(testXkb_SRCS ) add_executable(testXkb ${testXkb_SRCS}) target_link_libraries(testXkb + kwin + Qt::Gui Qt::Test Qt::Widgets KF5::ConfigCore - Plasma::KWaylandServer KF5::WindowSystem kwineffects diff --git a/autotests/integration/dont_crash_cursor_physical_size_empty.cpp b/autotests/integration/dont_crash_cursor_physical_size_empty.cpp index 7f9d3f9103..c55093f114 100644 --- a/autotests/integration/dont_crash_cursor_physical_size_empty.cpp +++ b/autotests/integration/dont_crash_cursor_physical_size_empty.cpp @@ -13,6 +13,8 @@ #include "effectloader.h" #include "effects.h" #include "platform.h" +#include "wayland/display.h" +#include "wayland/output_interface.h" #include "wayland_server.h" #include "workspace.h" #include "x11client.h" @@ -22,8 +24,6 @@ #include #include #include -#include -#include using namespace KWin; using namespace KWayland::Client; diff --git a/autotests/integration/globalshortcuts_test.cpp b/autotests/integration/globalshortcuts_test.cpp index 680f88d542..0e9216743a 100644 --- a/autotests/integration/globalshortcuts_test.cpp +++ b/autotests/integration/globalshortcuts_test.cpp @@ -14,13 +14,13 @@ #include "keyboard_input.h" #include "platform.h" #include "useractions.h" +#include "wayland/keyboard_interface.h" +#include "wayland/seat_interface.h" #include "wayland_server.h" #include "workspace.h" #include "x11client.h" #include -#include -#include #include #include diff --git a/autotests/integration/idle_inhibition_test.cpp b/autotests/integration/idle_inhibition_test.cpp index b8f840bcee..7557008c94 100644 --- a/autotests/integration/idle_inhibition_test.cpp +++ b/autotests/integration/idle_inhibition_test.cpp @@ -11,14 +11,13 @@ #include "abstract_client.h" #include "platform.h" #include "virtualdesktops.h" +#include "wayland/display.h" +#include "wayland/idle_interface.h" #include "wayland_server.h" #include "workspace.h" #include -#include -#include - using namespace KWin; using namespace KWayland::Client; using KWaylandServer::IdleInterface; diff --git a/autotests/integration/input_stacking_order.cpp b/autotests/integration/input_stacking_order.cpp index 9790dc5006..251565bc6b 100644 --- a/autotests/integration/input_stacking_order.cpp +++ b/autotests/integration/input_stacking_order.cpp @@ -13,6 +13,7 @@ #include "deleted.h" #include "output.h" #include "platform.h" +#include "wayland/seat_interface.h" #include "wayland_server.h" #include "workspace.h" #include @@ -26,8 +27,6 @@ #include #include -#include - namespace KWin { diff --git a/autotests/integration/inputmethod_test.cpp b/autotests/integration/inputmethod_test.cpp index ae4dbf6ae7..197d2a2e47 100644 --- a/autotests/integration/inputmethod_test.cpp +++ b/autotests/integration/inputmethod_test.cpp @@ -18,13 +18,13 @@ #include "qwayland-input-method-unstable-v1.h" #include "qwayland-text-input-unstable-v3.h" #include "virtualkeyboard_dbus.h" +#include "wayland/clientconnection.h" +#include "wayland/display.h" +#include "wayland/seat_interface.h" +#include "wayland/surface_interface.h" #include "wayland_server.h" #include "workspace.h" -#include -#include -#include -#include #include #include #include diff --git a/autotests/integration/internal_window.cpp b/autotests/integration/internal_window.cpp index 1753bcfe1b..9142039325 100644 --- a/autotests/integration/internal_window.cpp +++ b/autotests/integration/internal_window.cpp @@ -14,6 +14,7 @@ #include "internal_client.h" #include "output.h" #include "platform.h" +#include "wayland/surface_interface.h" #include "wayland_server.h" #include "workspace.h" @@ -25,8 +26,6 @@ #include #include -#include - #include using namespace KWayland::Client; diff --git a/autotests/integration/lockscreen.cpp b/autotests/integration/lockscreen.cpp index 98874bf387..284617c9de 100644 --- a/autotests/integration/lockscreen.cpp +++ b/autotests/integration/lockscreen.cpp @@ -15,6 +15,8 @@ #include "platform.h" #include "renderbackend.h" #include "screenedge.h" +#include "wayland/keyboard_interface.h" +#include "wayland/seat_interface.h" #include "wayland_server.h" #include "workspace.h" #include @@ -28,8 +30,6 @@ #include #include #include -#include -#include // screenlocker #include diff --git a/autotests/integration/plasmawindow_test.cpp b/autotests/integration/plasmawindow_test.cpp index 2e1d0cbdc9..3d505c6479 100644 --- a/autotests/integration/plasmawindow_test.cpp +++ b/autotests/integration/plasmawindow_test.cpp @@ -11,6 +11,7 @@ #include "cursor.h" #include "output.h" #include "platform.h" +#include "wayland/seat_interface.h" #include "wayland_server.h" #include "workspace.h" #include "x11client.h" @@ -19,7 +20,6 @@ #include #include #include -#include // screenlocker #if KWIN_BUILD_SCREENLOCKER #include diff --git a/autotests/integration/pointer_constraints_test.cpp b/autotests/integration/pointer_constraints_test.cpp index 22f85558f3..cf0cf09d4b 100644 --- a/autotests/integration/pointer_constraints_test.cpp +++ b/autotests/integration/pointer_constraints_test.cpp @@ -14,6 +14,8 @@ #include "output.h" #include "platform.h" #include "pointer_input.h" +#include "wayland/seat_interface.h" +#include "wayland/surface_interface.h" #include "wayland_server.h" #include "workspace.h" @@ -25,8 +27,6 @@ #include #include #include -#include -#include #include diff --git a/autotests/integration/pointer_input.cpp b/autotests/integration/pointer_input.cpp index 857795bf26..39f006da83 100644 --- a/autotests/integration/pointer_input.cpp +++ b/autotests/integration/pointer_input.cpp @@ -19,6 +19,8 @@ #include "screenedge.h" #include "screens.h" #include "virtualdesktops.h" +#include "wayland/clientconnection.h" +#include "wayland/seat_interface.h" #include "wayland_server.h" #include "workspace.h" #include "xcursortheme.h" @@ -34,9 +36,6 @@ #include #include -#include -#include - #include namespace KWin diff --git a/autotests/integration/scene_qpainter_test.cpp b/autotests/integration/scene_qpainter_test.cpp index 40a8dcf93e..683275d2ad 100644 --- a/autotests/integration/scene_qpainter_test.cpp +++ b/autotests/integration/scene_qpainter_test.cpp @@ -13,6 +13,8 @@ #include "effectloader.h" #include "effects.h" #include "platform.h" +#include "wayland/shmclientbuffer.h" +#include "wayland/surface_interface.h" #include "wayland_server.h" #include "workspace.h" #include "x11client.h" @@ -22,8 +24,6 @@ #include #include #include -#include -#include #include diff --git a/autotests/integration/test_helpers.cpp b/autotests/integration/test_helpers.cpp index 71ebfa6e45..974548c726 100644 --- a/autotests/integration/test_helpers.cpp +++ b/autotests/integration/test_helpers.cpp @@ -14,6 +14,7 @@ #include "screenlockerwatcher.h" #endif #include "inputmethod.h" +#include "wayland/display.h" #include "wayland_server.h" #include "workspace.h" @@ -34,7 +35,6 @@ #include #include #include -#include // screenlocker #if KWIN_BUILD_SCREENLOCKER diff --git a/autotests/integration/transient_placement.cpp b/autotests/integration/transient_placement.cpp index adadd48751..b475f914b5 100644 --- a/autotests/integration/transient_placement.cpp +++ b/autotests/integration/transient_placement.cpp @@ -13,6 +13,8 @@ #include "output.h" #include "platform.h" #include "screens.h" +#include "wayland/seat_interface.h" +#include "wayland/surface_interface.h" #include "wayland_server.h" #include "workspace.h" #include @@ -29,8 +31,6 @@ #include #include #include -#include -#include struct PopupLayout { diff --git a/autotests/integration/xdgshellclient_test.cpp b/autotests/integration/xdgshellclient_test.cpp index 43194def78..bd5b26cb9b 100644 --- a/autotests/integration/xdgshellclient_test.cpp +++ b/autotests/integration/xdgshellclient_test.cpp @@ -19,6 +19,8 @@ #include "platform.h" #include "screens.h" #include "virtualdesktops.h" +#include "wayland/clientconnection.h" +#include "wayland/display.h" #include "wayland_server.h" #include "workspace.h" @@ -36,9 +38,6 @@ #include #include -#include -#include - #include // system diff --git a/autotests/integration/xwayland_input_test.cpp b/autotests/integration/xwayland_input_test.cpp index 7c95e587cd..61ae7ea961 100644 --- a/autotests/integration/xwayland_input_test.cpp +++ b/autotests/integration/xwayland_input_test.cpp @@ -12,12 +12,11 @@ #include "deleted.h" #include "output.h" #include "platform.h" +#include "wayland/seat_interface.h" #include "wayland_server.h" #include "workspace.h" #include "x11client.h" -#include - #include #include diff --git a/autotests/integration/xwayland_selections_test.cpp b/autotests/integration/xwayland_selections_test.cpp index 255daeb624..a5b926da13 100644 --- a/autotests/integration/xwayland_selections_test.cpp +++ b/autotests/integration/xwayland_selections_test.cpp @@ -12,12 +12,11 @@ #include "abstract_client.h" #include "output.h" #include "platform.h" +#include "wayland/seat_interface.h" #include "wayland_server.h" #include "workspace.h" #include "xwl/databridge.h" -#include - #include #include diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b38980ab58..58e26a5012 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -183,8 +183,6 @@ target_link_libraries(kwin KDecoration2::KDecoration KDecoration2::KDecoration2Private - Plasma::KWaylandServer - XCB::COMPOSITE XCB::CURSOR XCB::DAMAGE @@ -201,9 +199,11 @@ target_link_libraries(kwin UDev::UDev XKB::XKB + EGL::EGL epoxy::epoxy Threads::Threads + Wayland::Server lcms2::lcms2 ) if (QT_MAJOR_VERSION EQUAL "5") @@ -248,6 +248,7 @@ target_sources(kwin PRIVATE add_subdirectory(backends) add_subdirectory(scenes) add_subdirectory(utils) +add_subdirectory(wayland) if (KWIN_BUILD_ACTIVITIES) target_sources(kwin PRIVATE activities.cpp) diff --git a/src/abstract_client.cpp b/src/abstract_client.cpp index 919449d4c8..a68fce42d4 100644 --- a/src/abstract_client.cpp +++ b/src/abstract_client.cpp @@ -34,14 +34,13 @@ #include "surfaceitem_x11.h" #include "useractions.h" #include "virtualdesktops.h" +#include "wayland/output_interface.h" +#include "wayland/plasmawindowmanagement_interface.h" +#include "wayland/surface_interface.h" +#include "wayland_server.h" #include "windowitem.h" #include "workspace.h" -#include "wayland_server.h" -#include -#include -#include - #include #include diff --git a/src/backends/drm/dmabuf_feedback.cpp b/src/backends/drm/dmabuf_feedback.cpp index 9a72327ade..1a5a58a47a 100644 --- a/src/backends/drm/dmabuf_feedback.cpp +++ b/src/backends/drm/dmabuf_feedback.cpp @@ -11,9 +11,8 @@ #include "drm_gpu.h" #include "egl_dmabuf.h" #include "egl_gbm_backend.h" - -#include -#include +#include "wayland/linuxdmabufv1clientbuffer.h" +#include "wayland/surface_interface.h" namespace KWin { diff --git a/src/backends/drm/drm_buffer_gbm.cpp b/src/backends/drm/drm_buffer_gbm.cpp index 779508e222..5c56190dfd 100644 --- a/src/backends/drm/drm_buffer_gbm.cpp +++ b/src/backends/drm/drm_buffer_gbm.cpp @@ -14,6 +14,8 @@ #include "kwineglimagetexture.h" #include "kwineglutils_p.h" #include "logging.h" +#include "wayland/clientbuffer.h" +#include "wayland/linuxdmabufv1clientbuffer.h" // system #include @@ -24,9 +26,6 @@ #include #include #include -// KWaylandServer -#include "KWaylandServer/clientbuffer.h" -#include "KWaylandServer/linuxdmabufv1clientbuffer.h" namespace KWin { diff --git a/src/backends/drm/drm_gpu.cpp b/src/backends/drm/drm_gpu.cpp index 73f098b8ab..e599be1f52 100644 --- a/src/backends/drm/drm_gpu.cpp +++ b/src/backends/drm/drm_gpu.cpp @@ -25,6 +25,7 @@ #include "main.h" #include "renderloop_p.h" #include "session.h" +#include "wayland/drmleasedevice_v1_interface.h" #include "wayland_server.h" // system #include @@ -38,8 +39,6 @@ #include #include #include -// KWaylandServer -#include "KWaylandServer/drmleasedevice_v1_interface.h" namespace KWin { diff --git a/src/backends/drm/drm_lease_output.cpp b/src/backends/drm/drm_lease_output.cpp index 5585b426e8..acfcf99e26 100644 --- a/src/backends/drm/drm_lease_output.cpp +++ b/src/backends/drm/drm_lease_output.cpp @@ -9,12 +9,12 @@ #include "drm_lease_output.h" -#include "KWaylandServer/drmleasedevice_v1_interface.h" #include "drm_layer.h" #include "drm_object_connector.h" #include "drm_object_crtc.h" #include "drm_object_plane.h" #include "drm_pipeline.h" +#include "wayland/drmleasedevice_v1_interface.h" #include "logging.h" diff --git a/src/backends/drm/drm_lease_output.h b/src/backends/drm/drm_lease_output.h index 6df0fd7010..ed02ce0844 100644 --- a/src/backends/drm/drm_lease_output.h +++ b/src/backends/drm/drm_lease_output.h @@ -9,7 +9,7 @@ #pragma once -#include +#include "wayland/drmleasedevice_v1_interface.h" #include #include diff --git a/src/backends/drm/egl_gbm_backend.cpp b/src/backends/drm/egl_gbm_backend.cpp index 7d5096b759..74b690e526 100644 --- a/src/backends/drm/egl_gbm_backend.cpp +++ b/src/backends/drm/egl_gbm_backend.cpp @@ -31,6 +31,9 @@ #include "shadowbuffer.h" #include "surfaceitem_wayland.h" #include "virtual_egl_gbm_layer.h" +#include "wayland/clientconnection.h" +#include "wayland/linuxdmabufv1clientbuffer.h" +#include "wayland/surface_interface.h" // kwin libs #include #include @@ -39,10 +42,6 @@ #include #include #include -// kwayland server -#include "KWaylandServer/clientconnection.h" -#include "KWaylandServer/linuxdmabufv1clientbuffer.h" -#include "KWaylandServer/surface_interface.h" namespace KWin { diff --git a/src/backends/drm/egl_gbm_layer.cpp b/src/backends/drm/egl_gbm_layer.cpp index 96d61e0b43..5bd1d93b35 100644 --- a/src/backends/drm/egl_gbm_layer.cpp +++ b/src/backends/drm/egl_gbm_layer.cpp @@ -17,9 +17,8 @@ #include "egl_gbm_backend.h" #include "logging.h" #include "surfaceitem_wayland.h" - -#include "KWaylandServer/linuxdmabufv1clientbuffer.h" -#include "KWaylandServer/surface_interface.h" +#include "wayland/linuxdmabufv1clientbuffer.h" +#include "wayland/surface_interface.h" #include #include diff --git a/src/backends/drm/egl_gbm_layer_surface.cpp b/src/backends/drm/egl_gbm_layer_surface.cpp index e4b939d96f..abb2a3dc13 100644 --- a/src/backends/drm/egl_gbm_layer_surface.cpp +++ b/src/backends/drm/egl_gbm_layer_surface.cpp @@ -19,9 +19,8 @@ #include "logging.h" #include "shadowbuffer.h" #include "surfaceitem_wayland.h" - -#include -#include +#include "wayland/linuxdmabufv1clientbuffer.h" +#include "wayland/surface_interface.h" #include #include @@ -102,12 +101,12 @@ OutputLayerBeginFrameInfo EglGbmLayerSurface::startRendering(const QSize &buffer if (m_shadowBuffer) { GLFramebuffer::pushFramebuffer(m_shadowBuffer->fbo()); // the blit after rendering will completely overwrite the back buffer anyways - return OutputLayerBeginFrameInfo { + return OutputLayerBeginFrameInfo{ .renderTarget = RenderTarget(m_shadowBuffer->fbo()), .repaint = {}, }; } else { - return OutputLayerBeginFrameInfo { + return OutputLayerBeginFrameInfo{ .renderTarget = RenderTarget(m_gbmSurface->fbo()), .repaint = m_gbmSurface->repaintRegion(), }; diff --git a/src/backends/drm/virtual_egl_gbm_layer.cpp b/src/backends/drm/virtual_egl_gbm_layer.cpp index a5e004a19d..5553a93cf4 100644 --- a/src/backends/drm/virtual_egl_gbm_layer.cpp +++ b/src/backends/drm/virtual_egl_gbm_layer.cpp @@ -22,9 +22,8 @@ #include "logging.h" #include "shadowbuffer.h" #include "surfaceitem_wayland.h" - -#include "KWaylandServer/linuxdmabufv1clientbuffer.h" -#include "KWaylandServer/surface_interface.h" +#include "wayland/linuxdmabufv1clientbuffer.h" +#include "wayland/surface_interface.h" #include #include diff --git a/src/backends/fakeinput/fakeinputbackend.cpp b/src/backends/fakeinput/fakeinputbackend.cpp index 8361458072..b66e15d8c8 100644 --- a/src/backends/fakeinput/fakeinputbackend.cpp +++ b/src/backends/fakeinput/fakeinputbackend.cpp @@ -6,10 +6,9 @@ #include "fakeinputbackend.h" #include "fakeinputdevice.h" +#include "wayland/fakeinput_interface.h" #include "wayland_server.h" -#include - namespace KWin { diff --git a/src/backends/fakeinput/fakeinputdevice.cpp b/src/backends/fakeinput/fakeinputdevice.cpp index e260c2388a..9dece33095 100644 --- a/src/backends/fakeinput/fakeinputdevice.cpp +++ b/src/backends/fakeinput/fakeinputdevice.cpp @@ -5,8 +5,7 @@ */ #include "fakeinputdevice.h" - -#include +#include "wayland/fakeinput_interface.h" namespace KWin { diff --git a/src/composite.cpp b/src/composite.cpp index e560459d1e..f64c742209 100644 --- a/src/composite.cpp +++ b/src/composite.cpp @@ -36,6 +36,7 @@ #include "useractions.h" #include "utils/common.h" #include "utils/xcbutils.h" +#include "wayland/surface_interface.h" #include "wayland_server.h" #include "workspace.h" #include "x11client.h" @@ -44,8 +45,6 @@ #include #include -#include - #include #include #if KWIN_BUILD_NOTIFICATIONS diff --git a/src/debug_console.cpp b/src/debug_console.cpp index 5c1bd41883..b82a4f53e4 100644 --- a/src/debug_console.cpp +++ b/src/debug_console.cpp @@ -16,6 +16,16 @@ #include "scene.h" #include "unmanaged.h" #include "utils/subsurfacemonitor.h" +#include "wayland/abstract_data_source.h" +#include "wayland/clientconnection.h" +#include "wayland/datacontrolsource_v1_interface.h" +#include "wayland/datasource_interface.h" +#include "wayland/display.h" +#include "wayland/primaryselectionsource_v1_interface.h" +#include "wayland/seat_interface.h" +#include "wayland/shmclientbuffer.h" +#include "wayland/subcompositor_interface.h" +#include "wayland/surface_interface.h" #include "wayland_server.h" #include "waylandclient.h" #include "workspace.h" @@ -26,17 +36,6 @@ #include "ui_debug_console.h" -// KWayland -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include // frameworks #include #include diff --git a/src/decorations/decorationbridge.cpp b/src/decorations/decorationbridge.cpp index 33a0f7e483..a2157b3c96 100644 --- a/src/decorations/decorationbridge.cpp +++ b/src/decorations/decorationbridge.cpp @@ -15,6 +15,7 @@ #include "settings.h" // KWin core #include "abstract_client.h" +#include "wayland/server_decoration_interface.h" #include "wayland_server.h" #include "workspace.h" @@ -23,9 +24,6 @@ #include #include -// KWayland -#include - // Frameworks #include #include diff --git a/src/dpmsinputeventfilter.cpp b/src/dpmsinputeventfilter.cpp index d6e40d3d4c..c6ba9c529e 100644 --- a/src/dpmsinputeventfilter.cpp +++ b/src/dpmsinputeventfilter.cpp @@ -10,13 +10,12 @@ #include "main.h" #include "output.h" #include "platform.h" +#include "wayland/seat_interface.h" #include "wayland_server.h" #include #include -#include - namespace KWin { diff --git a/src/effects/backgroundcontrast/CMakeLists.txt b/src/effects/backgroundcontrast/CMakeLists.txt index 1f2b81172c..6c9387bf1e 100644 --- a/src/effects/backgroundcontrast/CMakeLists.txt +++ b/src/effects/backgroundcontrast/CMakeLists.txt @@ -9,8 +9,7 @@ set(contrast_SOURCES ) kwin4_add_effect_module(kwin4_effect_contrast ${contrast_SOURCES}) target_link_libraries(kwin4_effect_contrast PRIVATE + kwin kwineffects kwinglutils - - Plasma::KWaylandServer ) diff --git a/src/effects/backgroundcontrast/contrast.cpp b/src/effects/backgroundcontrast/contrast.cpp index 89e1abfad1..0500f47129 100644 --- a/src/effects/backgroundcontrast/contrast.cpp +++ b/src/effects/backgroundcontrast/contrast.cpp @@ -10,14 +10,15 @@ #include "contrastshader.h" // KConfigSkeleton +#include "wayland/contrast_interface.h" +#include "wayland/display.h" +#include "wayland/surface_interface.h" + #include #include #include #include -#include -#include - namespace KWin { diff --git a/src/effects/backgroundcontrast/contrast.h b/src/effects/backgroundcontrast/contrast.h index 236eaa867d..7f912c113f 100644 --- a/src/effects/backgroundcontrast/contrast.h +++ b/src/effects/backgroundcontrast/contrast.h @@ -15,7 +15,10 @@ #include #include -#include +namespace KWaylandServer +{ +class ContrastManagerInterface; +} namespace KWin { diff --git a/src/effects/blur/CMakeLists.txt b/src/effects/blur/CMakeLists.txt index 6c8082433f..4bbcdb3ff6 100644 --- a/src/effects/blur/CMakeLists.txt +++ b/src/effects/blur/CMakeLists.txt @@ -13,11 +13,10 @@ kconfig_add_kcfg_files(blur_SOURCES kwin4_add_effect_module(kwin4_effect_blur ${blur_SOURCES}) target_link_libraries(kwin4_effect_blur PRIVATE + kwin kwineffects kwinglutils - Plasma::KWaylandServer - KF5::ConfigGui KDecoration2::KDecoration diff --git a/src/effects/blur/blur.cpp b/src/effects/blur/blur.cpp index 5563d107ca..ed0c39dab4 100644 --- a/src/effects/blur/blur.cpp +++ b/src/effects/blur/blur.cpp @@ -11,6 +11,10 @@ // KConfigSkeleton #include "blurconfig.h" +#include "wayland/blur_interface.h" +#include "wayland/display.h" +#include "wayland/surface_interface.h" + #include #include #include @@ -22,9 +26,6 @@ #include #include -#include -#include -#include #include diff --git a/src/effects/blur/blur.h b/src/effects/blur/blur.h index 05cfa60a8f..84f99aadcb 100644 --- a/src/effects/blur/blur.h +++ b/src/effects/blur/blur.h @@ -16,7 +16,10 @@ #include #include -#include +namespace KWaylandServer +{ +class BlurManagerInterface; +} namespace KWin { diff --git a/src/effects/slidingpopups/CMakeLists.txt b/src/effects/slidingpopups/CMakeLists.txt index e0e63c9a89..566d546343 100644 --- a/src/effects/slidingpopups/CMakeLists.txt +++ b/src/effects/slidingpopups/CMakeLists.txt @@ -13,9 +13,8 @@ kconfig_add_kcfg_files(slidingpopups_SOURCES kwin4_add_effect_module(kwin4_effect_slidingpopups ${slidingpopups_SOURCES}) target_link_libraries(kwin4_effect_slidingpopups PRIVATE + kwin kwineffects - Plasma::KWaylandServer - KF5::ConfigGui ) diff --git a/src/effects/slidingpopups/slidingpopups.cpp b/src/effects/slidingpopups/slidingpopups.cpp index d41182c534..85b7a42eb4 100644 --- a/src/effects/slidingpopups/slidingpopups.cpp +++ b/src/effects/slidingpopups/slidingpopups.cpp @@ -11,14 +11,15 @@ #include "slidingpopups.h" #include "slidingpopupsconfig.h" +#include "wayland/display.h" +#include "wayland/slide_interface.h" +#include "wayland/surface_interface.h" + #include #include #include #include -#include -#include - #include Q_DECLARE_METATYPE(KWindowEffects::SlideFromLocation) diff --git a/src/effects/slidingpopups/slidingpopups.h b/src/effects/slidingpopups/slidingpopups.h index bc4a163abf..d453d48ebc 100644 --- a/src/effects/slidingpopups/slidingpopups.h +++ b/src/effects/slidingpopups/slidingpopups.h @@ -14,7 +14,10 @@ // Include with base class for effects. #include -#include +namespace KWaylandServer +{ +class SlideManagerInterface; +} namespace KWin { diff --git a/src/events.cpp b/src/events.cpp index 668961042c..cad0b86cfc 100644 --- a/src/events.cpp +++ b/src/events.cpp @@ -31,6 +31,8 @@ #include "unmanaged.h" #include "useractions.h" #include "utils/xcbutils.h" +#include "wayland/surface_interface.h" +#include "wayland_server.h" #include @@ -53,9 +55,6 @@ #include "composite.h" #include "x11eventfilter.h" -#include "wayland_server.h" -#include - #ifndef XCB_GE_GENERIC #define XCB_GE_GENERIC 35 typedef struct xcb_ge_generic_event_t diff --git a/src/idle_inhibition.cpp b/src/idle_inhibition.cpp index 3eb3d6a826..64819c78bb 100644 --- a/src/idle_inhibition.cpp +++ b/src/idle_inhibition.cpp @@ -10,11 +10,10 @@ #include "idle_inhibition.h" #include "abstract_client.h" #include "deleted.h" +#include "wayland/idle_interface.h" +#include "wayland/surface_interface.h" #include "workspace.h" -#include -#include - #include #include diff --git a/src/input.cpp b/src/input.cpp index 9b308e0c3d..b79c9a14d1 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -40,6 +40,12 @@ #include "screens.h" #include "unmanaged.h" #include "virtualdesktops.h" +#include "wayland/display.h" +#include "wayland/inputmethod_v1_interface.h" +#include "wayland/seat_interface.h" +#include "wayland/shmclientbuffer.h" +#include "wayland/surface_interface.h" +#include "wayland/tablet_v2_interface.h" #include "wayland_server.h" #include "workspace.h" #include "xwl/xwayland_interface.h" @@ -47,12 +53,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include #include // screenlocker diff --git a/src/inputmethod.cpp b/src/inputmethod.cpp index 169ad576a8..4a90833eae 100644 --- a/src/inputmethod.cpp +++ b/src/inputmethod.cpp @@ -25,15 +25,15 @@ #include "deleted.h" #include "tablet_input.h" #include "touch_input.h" +#include "wayland/display.h" +#include "wayland/inputmethod_v1_interface.h" +#include "wayland/keyboard_interface.h" +#include "wayland/seat_interface.h" +#include "wayland/surface_interface.h" +#include "wayland/textinput_v3_interface.h" #include #include -#include -#include -#include -#include -#include -#include #include #include diff --git a/src/inputmethod.h b/src/inputmethod.h index 19cb750a13..c5356ca3e5 100644 --- a/src/inputmethod.h +++ b/src/inputmethod.h @@ -9,6 +9,8 @@ #ifndef KWIN_VIRTUAL_KEYBOARD_H #define KWIN_VIRTUAL_KEYBOARD_H +#include "wayland/textinput_v2_interface.h" + #include #include @@ -17,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/inputpanelv1client.cpp b/src/inputpanelv1client.cpp index 20ca691a81..97151de5f1 100644 --- a/src/inputpanelv1client.cpp +++ b/src/inputpanelv1client.cpp @@ -12,13 +12,13 @@ #include "inputmethod.h" #include "output.h" #include "platform.h" +#include "wayland/output_interface.h" +#include "wayland/seat_interface.h" +#include "wayland/surface_interface.h" +#include "wayland/textinput_v2_interface.h" +#include "wayland/textinput_v3_interface.h" #include "wayland_server.h" #include "workspace.h" -#include -#include -#include -#include -#include using namespace KWaylandServer; diff --git a/src/inputpanelv1client.h b/src/inputpanelv1client.h index 046f92b5fd..88c702ab92 100644 --- a/src/inputpanelv1client.h +++ b/src/inputpanelv1client.h @@ -9,8 +9,8 @@ #pragma once +#include "wayland/inputmethod_v1_interface.h" #include "waylandclient.h" -#include #include namespace KWin diff --git a/src/inputpanelv1integration.cpp b/src/inputpanelv1integration.cpp index e761af1ed7..8509407bd5 100644 --- a/src/inputpanelv1integration.cpp +++ b/src/inputpanelv1integration.cpp @@ -6,11 +6,10 @@ #include "inputpanelv1integration.h" #include "inputpanelv1client.h" +#include "wayland/display.h" +#include "wayland/inputmethod_v1_interface.h" #include "wayland_server.h" -#include -#include - using namespace KWaylandServer; namespace KWin diff --git a/src/keyboard_input.cpp b/src/keyboard_input.cpp index 6ef072673c..e272bcaab4 100644 --- a/src/keyboard_input.cpp +++ b/src/keyboard_input.cpp @@ -17,14 +17,12 @@ #include "keyboard_layout.h" #include "keyboard_repeat.h" #include "modifier_only_shortcuts.h" -#include "abstract_client.h" #include "utils/common.h" +#include "wayland/datadevice_interface.h" +#include "wayland/keyboard_interface.h" +#include "wayland/seat_interface.h" #include "wayland_server.h" #include "workspace.h" -// KWayland -#include -#include -#include // screenlocker #if KWIN_BUILD_SCREENLOCKER #include diff --git a/src/keyboard_repeat.cpp b/src/keyboard_repeat.cpp index 154a9565c5..14f6af1ce5 100644 --- a/src/keyboard_repeat.cpp +++ b/src/keyboard_repeat.cpp @@ -9,11 +9,10 @@ #include "keyboard_repeat.h" #include "input_event.h" #include "keyboard_input.h" +#include "wayland/keyboard_interface.h" +#include "wayland/seat_interface.h" #include "wayland_server.h" -#include -#include - #include namespace KWin diff --git a/src/layershellv1client.cpp b/src/layershellv1client.cpp index 3e3b61ea8b..7ae4fe1ddd 100644 --- a/src/layershellv1client.cpp +++ b/src/layershellv1client.cpp @@ -8,13 +8,12 @@ #include "deleted.h" #include "layershellv1integration.h" #include "output.h" +#include "wayland/layershell_v1_interface.h" +#include "wayland/output_interface.h" +#include "wayland/surface_interface.h" #include "wayland_server.h" #include "workspace.h" -#include -#include -#include - using namespace KWaylandServer; namespace KWin diff --git a/src/layershellv1integration.cpp b/src/layershellv1integration.cpp index 4619861d71..54235410bb 100644 --- a/src/layershellv1integration.cpp +++ b/src/layershellv1integration.cpp @@ -9,12 +9,11 @@ #include "output.h" #include "platform.h" #include "screens.h" +#include "wayland/display.h" +#include "wayland/layershell_v1_interface.h" #include "wayland_server.h" #include "workspace.h" -#include -#include - #include using namespace KWaylandServer; diff --git a/src/linux_dmabuf.h b/src/linux_dmabuf.h index bbd617ff82..f9f455d3c5 100644 --- a/src/linux_dmabuf.h +++ b/src/linux_dmabuf.h @@ -10,7 +10,7 @@ #include -#include +#include "wayland/linuxdmabufv1clientbuffer.h" namespace KWin { diff --git a/src/main.cpp b/src/main.cpp index 41971658f2..d2159265c5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -26,6 +26,7 @@ #endif #include "sm.h" #include "utils/xcbutils.h" +#include "wayland/surface_interface.h" #include "workspace.h" #include "x11eventfilter.h" @@ -35,7 +36,6 @@ #include #include #include -#include // Qt #include #include diff --git a/src/main_wayland.cpp b/src/main_wayland.cpp index b04a4fba7b..98556ed2c3 100644 --- a/src/main_wayland.cpp +++ b/src/main_wayland.cpp @@ -15,15 +15,13 @@ #include "inputmethod.h" #include "platform.h" #include "tabletmodemanager.h" +#include "wayland/display.h" +#include "wayland/seat_interface.h" #include "wayland_server.h" #include "workspace.h" #include "xwl/xwayland.h" #include "xwl/xwaylandlauncher.h" -// KWayland -#include -#include - // KDE #include #include diff --git a/src/platform.cpp b/src/platform.cpp index dcf696876c..47c7bf98af 100644 --- a/src/platform.cpp +++ b/src/platform.cpp @@ -22,11 +22,11 @@ #include "scene.h" #include "screenedge.h" #include "screens.h" +#include "wayland/outputchangeset_v2.h" +#include "wayland/outputconfiguration_v2_interface.h" #include "wayland_server.h" -#include -#include -#include +#include #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) #include diff --git a/src/platformsupport/scenes/opengl/abstract_egl_backend.cpp b/src/platformsupport/scenes/opengl/abstract_egl_backend.cpp index df08f8559c..db7882ee3c 100644 --- a/src/platformsupport/scenes/opengl/abstract_egl_backend.cpp +++ b/src/platformsupport/scenes/opengl/abstract_egl_backend.cpp @@ -14,8 +14,8 @@ #include "platform.h" #include "utils/common.h" #include "utils/egl_context_attribute_builder.h" +#include "wayland/display.h" #include "wayland_server.h" -#include // kwin libs #include #include diff --git a/src/platformsupport/scenes/opengl/basiceglsurfacetexture_wayland.cpp b/src/platformsupport/scenes/opengl/basiceglsurfacetexture_wayland.cpp index 12023dc137..1f41f804cb 100644 --- a/src/platformsupport/scenes/opengl/basiceglsurfacetexture_wayland.cpp +++ b/src/platformsupport/scenes/opengl/basiceglsurfacetexture_wayland.cpp @@ -10,10 +10,9 @@ #include "kwingltexture.h" #include "surfaceitem_wayland.h" #include "utils/common.h" - -#include -#include -#include +#include "wayland/drmclientbuffer.h" +#include "wayland/linuxdmabufv1clientbuffer.h" +#include "wayland/shmclientbuffer.h" namespace KWin { diff --git a/src/platformsupport/scenes/qpainter/qpaintersurfacetexture_wayland.cpp b/src/platformsupport/scenes/qpainter/qpaintersurfacetexture_wayland.cpp index d1b22e39f2..74c68d1ecb 100644 --- a/src/platformsupport/scenes/qpainter/qpaintersurfacetexture_wayland.cpp +++ b/src/platformsupport/scenes/qpainter/qpaintersurfacetexture_wayland.cpp @@ -7,9 +7,8 @@ #include "qpaintersurfacetexture_wayland.h" #include "surfaceitem_wayland.h" #include "utils/common.h" - -#include -#include +#include "wayland/shmclientbuffer.h" +#include "wayland/surface_interface.h" #include diff --git a/src/plugins/idletime/poller.cpp b/src/plugins/idletime/poller.cpp index 7d9142fea3..c06051e5ed 100644 --- a/src/plugins/idletime/poller.cpp +++ b/src/plugins/idletime/poller.cpp @@ -10,9 +10,9 @@ #include +#include "wayland/idle_interface.h" +#include "wayland/seat_interface.h" #include "wayland_server.h" -#include -#include namespace KWin { diff --git a/src/plugins/screencast/screencastmanager.cpp b/src/plugins/screencast/screencastmanager.cpp index 5b2717c55c..3a1d8358f6 100644 --- a/src/plugins/screencast/screencastmanager.cpp +++ b/src/plugins/screencast/screencastmanager.cpp @@ -18,15 +18,14 @@ #include "regionscreencastsource.h" #include "scene.h" #include "screencaststream.h" +#include "wayland/display.h" +#include "wayland/output_interface.h" #include "wayland_server.h" #include "windowscreencastsource.h" #include "workspace.h" #include -#include -#include - namespace KWin { diff --git a/src/plugins/screencast/screencastmanager.h b/src/plugins/screencast/screencastmanager.h index 972afd8556..6e72a6611f 100644 --- a/src/plugins/screencast/screencastmanager.h +++ b/src/plugins/screencast/screencastmanager.h @@ -10,7 +10,7 @@ #include "plugin.h" -#include +#include "wayland/screencast_v1_interface.h" namespace KWin { diff --git a/src/plugins/screencast/screencaststream.h b/src/plugins/screencast/screencaststream.h index 84b4c90517..bcaa4cdf8e 100644 --- a/src/plugins/screencast/screencaststream.h +++ b/src/plugins/screencast/screencaststream.h @@ -11,8 +11,7 @@ #include "config-kwin.h" #include "kwinglobals.h" - -#include +#include "wayland/screencast_v1_interface.h" #include #include diff --git a/src/pointer_input.cpp b/src/pointer_input.cpp index 9ec233ebaf..4d088fdeb3 100644 --- a/src/pointer_input.cpp +++ b/src/pointer_input.cpp @@ -20,19 +20,18 @@ #include "output.h" #include "platform.h" #include "screens.h" +#include "wayland/datadevice_interface.h" +#include "wayland/display.h" +#include "wayland/pointer_interface.h" +#include "wayland/pointerconstraints_v1_interface.h" +#include "wayland/seat_interface.h" +#include "wayland/shmclientbuffer.h" +#include "wayland/surface_interface.h" #include "wayland_server.h" #include "workspace.h" #include "x11client.h" // KDecoration #include -// KWayland -#include -#include -#include -#include -#include -#include -#include // screenlocker #if KWIN_BUILD_SCREENLOCKER #include diff --git a/src/popup_input_filter.cpp b/src/popup_input_filter.cpp index 9ea6e32b05..99a77b7561 100644 --- a/src/popup_input_filter.cpp +++ b/src/popup_input_filter.cpp @@ -8,10 +8,10 @@ #include "abstract_client.h" #include "deleted.h" #include "internal_client.h" +#include "wayland/seat_interface.h" #include "wayland_server.h" #include "workspace.h" -#include #include namespace KWin diff --git a/src/scene.cpp b/src/scene.cpp index f576886239..168f4ead93 100644 --- a/src/scene.cpp +++ b/src/scene.cpp @@ -60,6 +60,7 @@ #include "shadowitem.h" #include "surfaceitem.h" #include "unmanaged.h" +#include "wayland/surface_interface.h" #include "waylandclient.h" #include "windowitem.h" #include "workspace.h" @@ -77,8 +78,6 @@ #include "x11client.h" #include -#include - namespace KWin { diff --git a/src/shadow.cpp b/src/shadow.cpp index 3b4415e038..152d71416c 100644 --- a/src/shadow.cpp +++ b/src/shadow.cpp @@ -14,16 +14,14 @@ #include "composite.h" #include "internal_client.h" #include "scene.h" -#include "abstract_client.h" +#include "wayland/shadow_interface.h" +#include "wayland/shmclientbuffer.h" +#include "wayland/surface_interface.h" #include "wayland_server.h" #include #include -#include -#include -#include - #include Q_DECLARE_METATYPE(QMargins) diff --git a/src/surfaceitem_wayland.cpp b/src/surfaceitem_wayland.cpp index 2e9f153d5b..49045860be 100644 --- a/src/surfaceitem_wayland.cpp +++ b/src/surfaceitem_wayland.cpp @@ -7,10 +7,9 @@ #include "surfaceitem_wayland.h" #include "composite.h" #include "scene.h" - -#include -#include -#include +#include "wayland/clientbuffer.h" +#include "wayland/subcompositor_interface.h" +#include "wayland/surface_interface.h" namespace KWin { diff --git a/src/tablet_input.cpp b/src/tablet_input.cpp index ef00486897..fc18280853 100644 --- a/src/tablet_input.cpp +++ b/src/tablet_input.cpp @@ -12,14 +12,12 @@ #include "input_event.h" #include "input_event_spy.h" #include "pointer_input.h" -#include "abstract_client.h" +#include "wayland/seat_interface.h" +#include "wayland/surface_interface.h" #include "wayland_server.h" #include "workspace.h" // KDecoration #include -// KWayland -#include -#include // Qt #include #include diff --git a/src/touch_input.cpp b/src/touch_input.cpp index d1353ce141..6adff62c27 100644 --- a/src/touch_input.cpp +++ b/src/touch_input.cpp @@ -15,13 +15,11 @@ #include "decorations/decoratedclient.h" #include "input_event_spy.h" #include "pointer_input.h" -#include "abstract_client.h" +#include "wayland/seat_interface.h" #include "wayland_server.h" #include "workspace.h" // KDecoration #include -// KWayland -#include // screenlocker #if KWIN_BUILD_SCREENLOCKER #include diff --git a/src/unmanaged.cpp b/src/unmanaged.cpp index e463d6a08c..e6502587a9 100644 --- a/src/unmanaged.cpp +++ b/src/unmanaged.cpp @@ -14,6 +14,7 @@ #include "platform.h" #include "surfaceitem_x11.h" #include "utils/common.h" +#include "wayland/surface_interface.h" #include "workspace.h" #include @@ -23,8 +24,6 @@ #include -#include - using namespace KWaylandServer; namespace KWin diff --git a/src/utils/subsurfacemonitor.cpp b/src/utils/subsurfacemonitor.cpp index eb92d57ad4..1d2b3ec95a 100644 --- a/src/utils/subsurfacemonitor.cpp +++ b/src/utils/subsurfacemonitor.cpp @@ -9,8 +9,8 @@ #include "subsurfacemonitor.h" -#include -#include +#include "wayland/subcompositor_interface.h" +#include "wayland/surface_interface.h" using namespace KWaylandServer; diff --git a/src/virtualdesktops.cpp b/src/virtualdesktops.cpp index 9a1b896539..404db6f6a8 100644 --- a/src/virtualdesktops.cpp +++ b/src/virtualdesktops.cpp @@ -9,13 +9,13 @@ */ #include "virtualdesktops.h" #include "input.h" +#include "wayland/plasmavirtualdesktop_interface.h" // KDE #include #include #include #include -#include // Qt #include #include diff --git a/src/wayland/CMakeLists.txt b/src/wayland/CMakeLists.txt index a541577939..55358e2b8c 100644 --- a/src/wayland/CMakeLists.txt +++ b/src/wayland/CMakeLists.txt @@ -1,411 +1,259 @@ -set(SERVER_LIB_SRCS - abstract_data_source.cpp - abstract_drop_handler.cpp - appmenu_interface.cpp - blur_interface.cpp - clientbuffer.cpp - clientbufferintegration.cpp - clientconnection.cpp - compositor_interface.cpp - contrast_interface.cpp - datacontroldevice_v1_interface.cpp - datacontroldevicemanager_v1_interface.cpp - datacontroloffer_v1_interface.cpp - datacontrolsource_v1_interface.cpp - datadevice_interface.cpp - datadevicemanager_interface.cpp - dataoffer_interface.cpp - datasource_interface.cpp - display.cpp - dpms_interface.cpp - drmclientbuffer.cpp - drmleasedevice_v1_interface.cpp - fakeinput_interface.cpp - filtered_display.cpp - idle_interface.cpp - idleinhibit_v1_interface.cpp - inputmethod_v1_interface.cpp - keyboard_interface.cpp - keyboard_shortcuts_inhibit_v1_interface.cpp - keystate_interface.cpp - layershell_v1_interface.cpp - linuxdmabufv1clientbuffer.cpp - output_interface.cpp - outputdevice_v2_interface.cpp - outputconfiguration_v2_interface.cpp - outputmanagement_v2_interface.cpp - outputchangeset_v2.cpp - plasmashell_interface.cpp - plasmavirtualdesktop_interface.cpp - plasmawindowmanagement_interface.cpp - pointer_interface.cpp - pointerconstraints_v1_interface.cpp - pointergestures_v1_interface.cpp - primaryoutput_v1_interface.cpp - primaryselectiondevice_v1_interface.cpp - primaryselectiondevicemanager_v1_interface.cpp - primaryselectionoffer_v1_interface.cpp - primaryselectionsource_v1_interface.cpp - region_interface.cpp - relativepointer_v1_interface.cpp - screencast_v1_interface.cpp - seat_interface.cpp - server_decoration_interface.cpp - server_decoration_palette_interface.cpp - shadow_interface.cpp - shmclientbuffer.cpp - slide_interface.cpp - subcompositor_interface.cpp - surface_interface.cpp - surfacerole.cpp - tablet_v2_interface.cpp - textinput.cpp - textinput_v2_interface.cpp - textinput_v3_interface.cpp - touch_interface.cpp - viewporter_interface.cpp - xdgactivation_v1_interface.cpp - xdgdecoration_v1_interface.cpp - xdgforeign_v2_interface.cpp - xdgoutput_v1_interface.cpp - xdgshell_interface.cpp -) +add_subdirectory(tools) -ecm_qt_declare_logging_category(SERVER_LIB_SRCS - HEADER logging.h - IDENTIFIER KWAYLAND_SERVER - CATEGORY_NAME kwayland-server - DEFAULT_SEVERITY Critical - DESCRIPTION "KWayland Server Library" - EXPORT KWAYLANDSERVER -) +if (BUILD_TESTING) + add_subdirectory(autotests) + add_subdirectory(tests) +endif() -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +set(WaylandProtocols_xml_SOURCES) +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${Wayland_DATADIR}/wayland.xml BASENAME wayland ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/kde-output-device-v2.xml BASENAME kde-output-device-v2 ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/kde-primary-output-v1.xml BASENAME kde-primary-output-v1 ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/kde-output-management-v2.xml BASENAME kde-output-management-v2 ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/plasma-shell.xml BASENAME plasma-shell ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/plasma-virtual-desktop.xml BASENAME org-kde-plasma-virtual-desktop ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/plasma-window-management.xml BASENAME plasma-window-management ) - -ecm_add_wayland_server_protocol(SERVER_LIB_SRCS +ecm_add_wayland_server_protocol(WaylandProtocols_xml_SOURCES PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/surface-extension.xml BASENAME qt-surface-extension ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/idle.xml BASENAME idle ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/fake-input.xml BASENAME fake-input ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/shadow.xml BASENAME shadow ) -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/dpms.xml BASENAME dpms ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/blur.xml BASENAME blur ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/contrast.xml BASENAME contrast ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${WaylandProtocols_DATADIR}/unstable/relative-pointer/relative-pointer-unstable-v1.xml BASENAME relative-pointer-unstable-v1 ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/slide.xml BASENAME slide ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/server-decoration.xml BASENAME server-decoration ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${WaylandProtocols_DATADIR}/unstable/text-input/text-input-unstable-v1.xml BASENAME text-input-unstable-v1 ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/text-input-unstable-v2.xml BASENAME text-input-unstable-v2 ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${WaylandProtocols_DATADIR}/unstable/text-input/text-input-unstable-v3.xml BASENAME text-input-unstable-v3 ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${WaylandProtocols_DATADIR}/unstable/pointer-gestures/pointer-gestures-unstable-v1.xml BASENAME pointer-gestures-unstable-v1 ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${WaylandProtocols_DATADIR}/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml BASENAME pointer-constraints-unstable-v1 ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${WaylandProtocols_DATADIR}/unstable/xdg-foreign/xdg-foreign-unstable-v2.xml BASENAME xdg-foreign-unstable-v2 ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${WaylandProtocols_DATADIR}/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml BASENAME idle-inhibit-unstable-v1 ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/appmenu.xml BASENAME appmenu ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/server-decoration-palette.xml BASENAME server-decoration-palette ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${WaylandProtocols_DATADIR}/unstable/xdg-output/xdg-output-unstable-v1.xml BASENAME xdg-output-unstable-v1 ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${WaylandProtocols_DATADIR}/stable/xdg-shell/xdg-shell.xml BASENAME xdg-shell ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${WaylandProtocols_DATADIR}/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml BASENAME xdg-decoration-unstable-v1 ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/keystate.xml BASENAME keystate ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${WaylandProtocols_DATADIR}/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml BASENAME linux-dmabuf-unstable-v1 ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${WaylandProtocols_DATADIR}/unstable/tablet/tablet-unstable-v2.xml BASENAME tablet-unstable-v2 ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS - PROTOCOL ${PROJECT_SOURCE_DIR}/src/protocols/wlr-data-control-unstable-v1.xml +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES + PROTOCOL ${PROJECT_SOURCE_DIR}/src/wayland/protocols/wlr-data-control-unstable-v1.xml BASENAME wlr-data-control-unstable-v1 ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS - PROTOCOL ${PROJECT_SOURCE_DIR}/src/protocols/wlr-layer-shell-unstable-v1.xml +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES + PROTOCOL ${PROJECT_SOURCE_DIR}/src/wayland/protocols/wlr-layer-shell-unstable-v1.xml BASENAME wlr-layer-shell-unstable-v1 ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${WaylandProtocols_DATADIR}/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml BASENAME keyboard-shortcuts-inhibit-unstable-v1 ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${WaylandProtocols_DATADIR}/stable/viewporter/viewporter.xml BASENAME viewporter ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${WaylandProtocols_DATADIR}/unstable/primary-selection/primary-selection-unstable-v1.xml BASENAME wp-primary-selection-unstable-v1 ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/screencast.xml BASENAME zkde-screencast-unstable-v1 ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${WaylandProtocols_DATADIR}/unstable/input-method/input-method-unstable-v1.xml BASENAME input-method-unstable-v1 ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${WaylandProtocols_DATADIR}/staging/xdg-activation/xdg-activation-v1.xml BASENAME xdg-activation-v1 ) - -ecm_add_qtwayland_server_protocol_kde(SERVER_LIB_SRCS +ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml_SOURCES PROTOCOL ${WaylandProtocols_DATADIR}/staging/drm-lease/drm-lease-v1.xml BASENAME drm-lease-v1 ) -add_library(KWaylandServer ${SERVER_LIB_SRCS}) +# CMake has a known bug where target_source() doesn't work as expected with files generated +# in a directory other than the one where the target is defined. It should be fixed in 3.20. +add_library(WaylandProtocols_xml OBJECT ${WaylandProtocols_xml_SOURCES}) +target_link_libraries(WaylandProtocols_xml Qt::Core Wayland::Server) +target_link_libraries(kwin WaylandProtocols_xml) + +target_sources(kwin PRIVATE + abstract_data_source.cpp + abstract_drop_handler.cpp + appmenu_interface.cpp + blur_interface.cpp + clientbuffer.cpp + clientbufferintegration.cpp + clientconnection.cpp + compositor_interface.cpp + contrast_interface.cpp + datacontroldevice_v1_interface.cpp + datacontroldevicemanager_v1_interface.cpp + datacontroloffer_v1_interface.cpp + datacontrolsource_v1_interface.cpp + datadevice_interface.cpp + datadevicemanager_interface.cpp + dataoffer_interface.cpp + datasource_interface.cpp + display.cpp + dpms_interface.cpp + drmclientbuffer.cpp + drmleasedevice_v1_interface.cpp + fakeinput_interface.cpp + filtered_display.cpp + idle_interface.cpp + idleinhibit_v1_interface.cpp + inputmethod_v1_interface.cpp + keyboard_interface.cpp + keyboard_shortcuts_inhibit_v1_interface.cpp + keystate_interface.cpp + layershell_v1_interface.cpp + linuxdmabufv1clientbuffer.cpp + output_interface.cpp + outputdevice_v2_interface.cpp + outputconfiguration_v2_interface.cpp + outputmanagement_v2_interface.cpp + outputchangeset_v2.cpp + plasmashell_interface.cpp + plasmavirtualdesktop_interface.cpp + plasmawindowmanagement_interface.cpp + pointer_interface.cpp + pointerconstraints_v1_interface.cpp + pointergestures_v1_interface.cpp + primaryoutput_v1_interface.cpp + primaryselectiondevice_v1_interface.cpp + primaryselectiondevicemanager_v1_interface.cpp + primaryselectionoffer_v1_interface.cpp + primaryselectionsource_v1_interface.cpp + region_interface.cpp + relativepointer_v1_interface.cpp + screencast_v1_interface.cpp + seat_interface.cpp + server_decoration_interface.cpp + server_decoration_palette_interface.cpp + shadow_interface.cpp + shmclientbuffer.cpp + slide_interface.cpp + subcompositor_interface.cpp + surface_interface.cpp + surfacerole.cpp + tablet_v2_interface.cpp + textinput.cpp + textinput_v2_interface.cpp + textinput_v3_interface.cpp + touch_interface.cpp + viewporter_interface.cpp + xdgactivation_v1_interface.cpp + xdgdecoration_v1_interface.cpp + xdgforeign_v2_interface.cpp + xdgoutput_v1_interface.cpp + xdgshell_interface.cpp +) if(CMAKE_SYSTEM_NAME MATCHES "Linux") - target_sources(KWaylandServer PRIVATE utils/executable_path_proc.cpp) + target_sources(kwin PRIVATE utils/executable_path_proc.cpp) elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") - target_sources(KWaylandServer PRIVATE utils/executable_path_sysctl.cpp) + target_sources(kwin PRIVATE utils/executable_path_sysctl.cpp) else() message(FATAL_ERROR "Unsupported platform ${CMAKE_SYSTEM_NAME}") endif() - - -add_library(Plasma::KWaylandServer ALIAS KWaylandServer) -ecm_generate_export_header(KWaylandServer - BASE_NAME - KWaylandServer - EXPORT_FILE_NAME - KWaylandServer/kwaylandserver_export.h - GROUP_BASE_NAME KF - VERSION ${PROJECT_VERSION} -) - -target_include_directories(KWaylandServer INTERFACE "$") - -target_link_libraries(KWaylandServer - PUBLIC - Qt::Gui - Wayland::Server - PRIVATE - EGL::EGL - Qt::Concurrent -) - -target_compile_definitions(KWaylandServer PRIVATE - MESA_EGL_NO_X11_HEADERS - EGL_NO_X11 - EGL_NO_PLATFORM_SPECIFIC_TYPES -) - -set_target_properties(KWaylandServer PROPERTIES VERSION ${KWAYLANDSERVER_VERSION} - SOVERSION ${KWAYLANDSERVER_SOVERSION} -) - -install(TARGETS KWaylandServer EXPORT KWaylandServerTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) - -set(SERVER_LIB_HEADERS - ${CMAKE_CURRENT_BINARY_DIR}/KWaylandServer/kwaylandserver_export.h - abstract_data_source.h - abstract_drop_handler.h - appmenu_interface.h - blur_interface.h - clientbuffer.h - clientbufferintegration.h - clientconnection.h - compositor_interface.h - contrast_interface.h - datacontroldevice_v1_interface.h - datacontroldevicemanager_v1_interface.h - datacontroloffer_v1_interface.h - datacontrolsource_v1_interface.h - datadevice_interface.h - datadevicemanager_interface.h - dataoffer_interface.h - datasource_interface.h - display.h - dpms_interface.h - drmclientbuffer.h - drmleasedevice_v1_interface.h - fakeinput_interface.h - filtered_display.h - idle_interface.h - idleinhibit_v1_interface.h - inputmethod_v1_interface.h - keyboard_interface.h - keyboard_shortcuts_inhibit_v1_interface.h - keystate_interface.h - layershell_v1_interface.h - linuxdmabufv1clientbuffer.h - output_interface.h - outputchangeset_v2.h - outputconfiguration_v2_interface.h - outputdevice_v2_interface.h - outputmanagement_v2_interface.h - plasmashell_interface.h - plasmavirtualdesktop_interface.h - plasmawindowmanagement_interface.h - pointer_interface.h - pointerconstraints_v1_interface.h - pointergestures_v1_interface.h - primaryoutput_v1_interface.h - primaryselectiondevice_v1_interface.h - primaryselectiondevicemanager_v1_interface.h - primaryselectionoffer_v1_interface.h - primaryselectionsource_v1_interface.h - relativepointer_v1_interface.h - screencast_v1_interface.h - seat_interface.h - server_decoration_interface.h - server_decoration_palette_interface.h - shadow_interface.h - shmclientbuffer.h - slide_interface.h - subcompositor_interface.h - surface_interface.h - tablet_v2_interface.h - textinput.h - textinput_v2_interface.h - textinput_v3_interface.h - touch_interface.h - utils.h - viewporter_interface.h - xdgactivation_v1_interface.h - xdgdecoration_v1_interface.h - xdgforeign_v2_interface.h - xdgoutput_v1_interface.h - xdgshell_interface.h -) - -install(FILES - ${SERVER_LIB_HEADERS} - DESTINATION ${KDE_INSTALL_INCLUDEDIR}/KWaylandServer COMPONENT Devel -) - -# make available to ecm_add_qch in parent folder -set(KWaylandServer_APIDOX_SRCS ${SERVER_LIB_HEADERS} PARENT_SCOPE) -set(KWaylandServer_APIDOX_BUILD_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE) diff --git a/src/wayland/abstract_data_source.h b/src/wayland/abstract_data_source.h index 3688c8b75f..55461bee41 100644 --- a/src/wayland/abstract_data_source.h +++ b/src/wayland/abstract_data_source.h @@ -6,11 +6,11 @@ #pragma once +#include "kwin_export.h" + #include "clientconnection.h" #include "datadevicemanager_interface.h" -#include - struct wl_client; namespace KWaylandServer @@ -25,7 +25,7 @@ namespace KWaylandServer // Anything related to selections are pure virtual, content relating // to drag and drop has a default implementation -class KWAYLANDSERVER_EXPORT AbstractDataSource : public QObject +class KWIN_EXPORT AbstractDataSource : public QObject { Q_OBJECT public: diff --git a/src/wayland/abstract_drop_handler.h b/src/wayland/abstract_drop_handler.h index 466fa2ee09..aadd044469 100644 --- a/src/wayland/abstract_drop_handler.h +++ b/src/wayland/abstract_drop_handler.h @@ -7,7 +7,7 @@ #pragma once -#include +#include "kwin_export.h" #include @@ -15,7 +15,7 @@ namespace KWaylandServer { class SurfaceInterface; -class KWAYLANDSERVER_EXPORT AbstractDropHandler : public QObject +class KWIN_EXPORT AbstractDropHandler : public QObject { Q_OBJECT public: diff --git a/src/wayland/appmenu_interface.h b/src/wayland/appmenu_interface.h index 5ae2a59463..37621708f5 100644 --- a/src/wayland/appmenu_interface.h +++ b/src/wayland/appmenu_interface.h @@ -5,7 +5,8 @@ */ #pragma once -#include +#include "kwin_export.h" + #include struct wl_resource; @@ -25,7 +26,7 @@ class AppMenuInterfacePrivate; * This global can be used for clients to bind AppmenuInterface instances * and notifies when a new one is created */ -class KWAYLANDSERVER_EXPORT AppMenuManagerInterface : public QObject +class KWIN_EXPORT AppMenuManagerInterface : public QObject { Q_OBJECT @@ -53,7 +54,7 @@ private: * This interface is attached to a wl_surface and provides access to where * the AppMenu DBus interface is registered. */ -class KWAYLANDSERVER_EXPORT AppMenuInterface : public QObject +class KWIN_EXPORT AppMenuInterface : public QObject { Q_OBJECT public: diff --git a/src/wayland/autotests/CMakeLists.txt b/src/wayland/autotests/CMakeLists.txt index 842373f4ba..58bdbc1922 100644 --- a/src/wayland/autotests/CMakeLists.txt +++ b/src/wayland/autotests/CMakeLists.txt @@ -1,7 +1,5 @@ include(ECMMarkAsTest) -find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED Test) - remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY) remove_definitions(-DQT_NO_CAST_FROM_ASCII) remove_definitions(-DQT_NO_CAST_TO_ASCII) diff --git a/src/wayland/autotests/client/CMakeLists.txt b/src/wayland/autotests/client/CMakeLists.txt index 64a52c2d99..37ca71c291 100644 --- a/src/wayland/autotests/client/CMakeLists.txt +++ b/src/wayland/autotests/client/CMakeLists.txt @@ -5,7 +5,7 @@ set( testWaylandOutput_SRCS test_wayland_output.cpp ) add_executable(testWaylandOutput ${testWaylandOutput_SRCS}) -target_link_libraries( testWaylandOutput Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer Wayland::Client Wayland::Server) +target_link_libraries( testWaylandOutput Qt::Test Qt::Gui KF5::WaylandClient kwin Wayland::Client Wayland::Server) add_test(NAME kwayland-testWaylandOutput COMMAND testWaylandOutput) ecm_mark_as_test(testWaylandOutput) @@ -16,7 +16,7 @@ set( testWaylandSurface_SRCS test_wayland_surface.cpp ) add_executable(testWaylandSurface ${testWaylandSurface_SRCS}) -target_link_libraries( testWaylandSurface Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer Wayland::Client Wayland::Server) +target_link_libraries( testWaylandSurface Qt::Test Qt::Gui KF5::WaylandClient kwin Wayland::Client Wayland::Server) add_test(NAME kwayland-testWaylandSurface COMMAND testWaylandSurface) ecm_mark_as_test(testWaylandSurface) @@ -37,7 +37,7 @@ else() ${WaylandProtocols_DATADIR}/unstable/pointer-gestures/pointer-gestures-unstable-v1.xml) endif() target_sources(testWaylandSeat PRIVATE ${testWaylandSeat_SRCS}) -target_link_libraries( testWaylandSeat Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer Wayland::Client Wayland::Server) +target_link_libraries( testWaylandSeat Qt::Test Qt::Gui KF5::WaylandClient kwin Wayland::Client Wayland::Server) add_test(NAME kwayland-testWaylandSeat COMMAND testWaylandSeat) ecm_mark_as_test(testWaylandSeat) @@ -48,7 +48,7 @@ set( testShmPool_SRCS test_shm_pool.cpp ) add_executable(testShmPool ${testShmPool_SRCS}) -target_link_libraries( testShmPool Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer) +target_link_libraries( testShmPool Qt::Test Qt::Gui KF5::WaylandClient kwin) add_test(NAME kwayland-testShmPool COMMAND testShmPool) ecm_mark_as_test(testShmPool) @@ -59,7 +59,7 @@ set( testSubSurface_SRCS test_wayland_subsurface.cpp ) add_executable(testSubSurface ${testSubSurface_SRCS}) -target_link_libraries( testSubSurface Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer Wayland::Client) +target_link_libraries( testSubSurface Qt::Test Qt::Gui KF5::WaylandClient kwin Wayland::Client) add_test(NAME kwayland-testSubSurface COMMAND testSubSurface) ecm_mark_as_test(testSubSurface) @@ -70,7 +70,7 @@ set( testBlur_SRCS test_wayland_blur.cpp ) add_executable(testBlur ${testBlur_SRCS}) -target_link_libraries( testBlur Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer) +target_link_libraries( testBlur Qt::Test Qt::Gui KF5::WaylandClient kwin) add_test(NAME kwayland-testBlur COMMAND testBlur) ecm_mark_as_test(testBlur) @@ -81,7 +81,7 @@ set( testContrast_SRCS test_wayland_contrast.cpp ) add_executable(testContrast ${testContrast_SRCS}) -target_link_libraries( testContrast Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer Wayland::Client) +target_link_libraries( testContrast Qt::Test Qt::Gui KF5::WaylandClient kwin Wayland::Client) add_test(NAME kwayland-testContrast COMMAND testContrast) ecm_mark_as_test(testContrast) @@ -92,7 +92,7 @@ set( testSlide_SRCS test_wayland_slide.cpp ) add_executable(testSlide ${testSlide_SRCS}) -target_link_libraries( testSlide Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer Wayland::Client) +target_link_libraries( testSlide Qt::Test Qt::Gui KF5::WaylandClient kwin Wayland::Client) add_test(NAME kwayland-testSlide COMMAND testSlide) ecm_mark_as_test(testSlide) @@ -103,7 +103,7 @@ set( testWindowmanagement_SRCS test_wayland_windowmanagement.cpp ) add_executable(testWindowmanagement ${testWindowmanagement_SRCS}) -target_link_libraries( testWindowmanagement Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer Wayland::Client) +target_link_libraries( testWindowmanagement Qt::Test Qt::Gui KF5::WaylandClient kwin Wayland::Client) add_test(NAME kwayland-testWindowmanagement COMMAND testWindowmanagement) ecm_mark_as_test(testWindowmanagement) @@ -114,7 +114,7 @@ set( testDataSource_SRCS test_datasource.cpp ) add_executable(testDataSource ${testDataSource_SRCS}) -target_link_libraries( testDataSource Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer Wayland::Client) +target_link_libraries( testDataSource Qt::Test Qt::Gui KF5::WaylandClient kwin Wayland::Client) add_test(NAME kwayland-testDataSource COMMAND testDataSource) ecm_mark_as_test(testDataSource) @@ -125,7 +125,7 @@ set( testDataDevice_SRCS test_datadevice.cpp ) add_executable(testDataDevice ${testDataDevice_SRCS}) -target_link_libraries( testDataDevice Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer Wayland::Client) +target_link_libraries( testDataDevice Qt::Test Qt::Gui KF5::WaylandClient kwin Wayland::Client) add_test(NAME kwayland-testDataDevice COMMAND testDataDevice) ecm_mark_as_test(testDataDevice) @@ -136,7 +136,7 @@ set( testServerSideDecoration_SRCS test_server_side_decoration.cpp ) add_executable(testServerSideDecoration ${testServerSideDecoration_SRCS}) -target_link_libraries( testServerSideDecoration Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer Wayland::Client) +target_link_libraries( testServerSideDecoration Qt::Test Qt::Gui KF5::WaylandClient kwin Wayland::Client) add_test(NAME kwayland-testServerSideDecoration COMMAND testServerSideDecoration) ecm_mark_as_test(testServerSideDecoration) @@ -147,7 +147,7 @@ set( testDragAndDrop_SRCS test_drag_drop.cpp ) add_executable(testDragAndDrop ${testDragAndDrop_SRCS}) -target_link_libraries( testDragAndDrop Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer Wayland::Client) +target_link_libraries( testDragAndDrop Qt::Test Qt::Gui KF5::WaylandClient kwin Wayland::Client) add_test(NAME kwayland-testDragAndDrop COMMAND testDragAndDrop) ecm_mark_as_test(testDragAndDrop) @@ -158,7 +158,7 @@ set( testPlasmaShell_SRCS test_plasmashell.cpp ) add_executable(testPlasmaShell ${testPlasmaShell_SRCS}) -target_link_libraries( testPlasmaShell Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer Wayland::Client) +target_link_libraries( testPlasmaShell Qt::Test Qt::Gui KF5::WaylandClient kwin Wayland::Client) add_test(NAME kwayland-testPlasmaShell COMMAND testPlasmaShell) ecm_mark_as_test(testPlasmaShell) @@ -169,7 +169,7 @@ set( testIdle_SRCS test_idle.cpp ) add_executable(testIdle ${testIdle_SRCS}) -target_link_libraries( testIdle Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer) +target_link_libraries( testIdle Qt::Test Qt::Gui KF5::WaylandClient kwin) add_test(NAME kwayland-testIdle COMMAND testIdle) ecm_mark_as_test(testIdle) @@ -180,7 +180,7 @@ set( testShadow_SRCS test_shadow.cpp ) add_executable(testShadow ${testShadow_SRCS}) -target_link_libraries( testShadow Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer) +target_link_libraries( testShadow Qt::Test Qt::Gui KF5::WaylandClient kwin) add_test(NAME kwayland-testShadow COMMAND testShadow) ecm_mark_as_test(testShadow) @@ -191,7 +191,7 @@ set( testFakeInput_SRCS test_fake_input.cpp ) add_executable(testFakeInput ${testFakeInput_SRCS}) -target_link_libraries( testFakeInput Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer) +target_link_libraries( testFakeInput Qt::Test Qt::Gui KF5::WaylandClient kwin) add_test(NAME kwayland-testFakeInput COMMAND testFakeInput) ecm_mark_as_test(testFakeInput) @@ -202,7 +202,7 @@ set( testTextInputV2_SRCS test_text_input_v2.cpp ) add_executable(testTextInputV2 ${testTextInputV2_SRCS}) -target_link_libraries( testTextInputV2 Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer) +target_link_libraries( testTextInputV2 Qt::Test Qt::Gui KF5::WaylandClient kwin) add_test(NAME kwayland-testTextInputV2 COMMAND testTextInputV2) ecm_mark_as_test(testTextInputV2) @@ -213,7 +213,7 @@ set( testError_SRCS test_error.cpp ) add_executable(testError ${testError_SRCS}) -target_link_libraries( testError Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer Wayland::Client) +target_link_libraries( testError Qt::Test Qt::Gui KF5::WaylandClient kwin Wayland::Client) add_test(NAME kwayland-testError COMMAND testError) ecm_mark_as_test(testError) @@ -224,7 +224,7 @@ set( testSelection_SRCS test_selection.cpp ) add_executable(testSelection ${testSelection_SRCS}) -target_link_libraries( testSelection Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer Wayland::Client) +target_link_libraries( testSelection Qt::Test Qt::Gui KF5::WaylandClient kwin Wayland::Client) add_test(NAME kwayland-testSelection COMMAND testSelection) ecm_mark_as_test(testSelection) @@ -235,7 +235,7 @@ set( testXdgForeign_SRCS test_xdg_foreign.cpp ) add_executable(testXdgForeign ${testXdgForeign_SRCS}) -target_link_libraries( testXdgForeign Qt::Test Qt::Gui Plasma::KWaylandServer KF5::WaylandClient Wayland::Client) +target_link_libraries( testXdgForeign Qt::Test Qt::Gui kwin KF5::WaylandClient Wayland::Client) add_test(NAME kwayland-testXdgForeign COMMAND testXdgForeign) ecm_mark_as_test(testXdgForeign) @@ -244,17 +244,17 @@ ecm_mark_as_test(testXdgForeign) ######################################################## set(testXdgShell_SRCS test_xdg_shell.cpp) add_executable(testXdgShell ${testXdgShell_SRCS}) -target_link_libraries( testXdgShell Qt::Test Qt::Gui Plasma::KWaylandServer KF5::WaylandClient Wayland::Client) +target_link_libraries( testXdgShell Qt::Test Qt::Gui kwin KF5::WaylandClient Wayland::Client) add_test(NAME kwayland-testXdgShell COMMAND testXdgShell) ecm_mark_as_test(testXdgShell) ######################################################## # Test Pointer Constraints ######################################################## -add_executable(testPointerConstraints test_pointer_constraints.cpp) -target_link_libraries( testPointerConstraints Qt::Test Qt::Gui Plasma::KWaylandServer KF5::WaylandClient Wayland::Client) -add_test(NAME kwayland-testPointerConstraints COMMAND testPointerConstraints) -ecm_mark_as_test(testPointerConstraints) +add_executable(testPointerConstraintsInterface test_pointer_constraints.cpp) +target_link_libraries( testPointerConstraintsInterface Qt::Test Qt::Gui kwin KF5::WaylandClient Wayland::Client) +add_test(NAME kwayland-testPointerConstraintsInterface COMMAND testPointerConstraintsInterface) +ecm_mark_as_test(testPointerConstraintsInterface) ######################################################## @@ -264,7 +264,7 @@ set( testFilter_SRCS test_wayland_filter.cpp ) add_executable(testFilter ${testFilter_SRCS}) -target_link_libraries( testFilter Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer Wayland::Server) +target_link_libraries( testFilter Qt::Test Qt::Gui KF5::WaylandClient kwin Wayland::Server) add_test(NAME kwayland-testFilter COMMAND testFilter) ecm_mark_as_test(testFilter) @@ -275,7 +275,7 @@ set( testAppmenu_SRCS test_wayland_appmenu.cpp ) add_executable(testAppmenu ${testAppmenu_SRCS}) -target_link_libraries( testAppmenu Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer) +target_link_libraries( testAppmenu Qt::Test Qt::Gui KF5::WaylandClient kwin) add_test(NAME kwayland-testAppmenu COMMAND testAppmenu) ecm_mark_as_test(testAppmenu) @@ -286,7 +286,7 @@ set( testServerSideDecorationPalette_SRCS test_server_side_decoration_palette.cpp ) add_executable(testServerSideDecorationPalette ${testServerSideDecorationPalette_SRCS}) -target_link_libraries( testServerSideDecorationPalette Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer) +target_link_libraries( testServerSideDecorationPalette Qt::Test Qt::Gui KF5::WaylandClient kwin) add_test(NAME kwayland-testServerSideDecorationPalette COMMAND testServerSideDecorationPalette) ecm_mark_as_test(testServerSideDecorationPalette) @@ -297,7 +297,7 @@ set( testPlasmaVirtualDesktop_SRCS test_plasma_virtual_desktop.cpp ) add_executable(testPlasmaVirtualDesktop ${testPlasmaVirtualDesktop_SRCS}) -target_link_libraries( testPlasmaVirtualDesktop Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer) +target_link_libraries( testPlasmaVirtualDesktop Qt::Test Qt::Gui KF5::WaylandClient kwin) add_test(NAME kwayland-testPlasmaVirtualDesktop COMMAND testPlasmaVirtualDesktop) ecm_mark_as_test(testPlasmaVirtualDesktop) @@ -308,7 +308,7 @@ set( testPlasmaActivities_SRCS test_plasma_activities.cpp ) add_executable(testPlasmaActivities ${testPlasmaActivities_SRCS}) -target_link_libraries( testPlasmaActivities Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer) +target_link_libraries( testPlasmaActivities Qt::Test Qt::Gui KF5::WaylandClient kwin) add_test(NAME kwayland-testPlasmaActivities COMMAND testPlasmaActivities) ecm_mark_as_test(testPlasmaActivities) @@ -319,7 +319,7 @@ set( testXdgOutput_SRCS test_xdg_output.cpp ) add_executable(testXdgOutput ${testXdgOutput_SRCS}) -target_link_libraries( testXdgOutput Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer Wayland::Client Wayland::Server) +target_link_libraries( testXdgOutput Qt::Test Qt::Gui KF5::WaylandClient kwin Wayland::Client Wayland::Server) add_test(NAME kwayland-testXdgOutput COMMAND testXdgOutput) ecm_mark_as_test(testXdgOutput) @@ -330,7 +330,7 @@ set( testXdgdecoration_SRCS test_xdg_decoration.cpp ) add_executable(testXdgDecoration ${testXdgdecoration_SRCS}) -target_link_libraries( testXdgDecoration Qt::Test Qt::Gui KF5::WaylandClient Plasma::KWaylandServer Wayland::Client Wayland::Server) +target_link_libraries( testXdgDecoration Qt::Test Qt::Gui KF5::WaylandClient kwin Wayland::Client Wayland::Server) add_test(NAME kwayland-testXdgDecoration COMMAND testXdgDecoration) ecm_mark_as_test(testXdgDecoration) diff --git a/src/wayland/autotests/client/test_datadevice.cpp b/src/wayland/autotests/client/test_datadevice.cpp index df1f106360..fdb33af5eb 100644 --- a/src/wayland/autotests/client/test_datadevice.cpp +++ b/src/wayland/autotests/client/test_datadevice.cpp @@ -5,14 +5,16 @@ */ // Qt #include + +#include "wayland/compositor_interface.h" +#include "wayland/datadevicemanager_interface.h" +#include "wayland/datasource_interface.h" +#include "wayland/display.h" +#include "wayland/pointer_interface.h" +#include "wayland/seat_interface.h" +#include "wayland/surface_interface.h" + // KWayland -#include "../../src/server/compositor_interface.h" -#include "../../src/server/datadevicemanager_interface.h" -#include "../../src/server/datasource_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/pointer_interface.h" -#include "../../src/server/seat_interface.h" -#include "../../src/server/surface_interface.h" #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" #include "KWayland/Client/datadevice.h" @@ -24,6 +26,7 @@ #include "KWayland/Client/registry.h" #include "KWayland/Client/seat.h" #include "KWayland/Client/surface.h" + // Wayland #include diff --git a/src/wayland/autotests/client/test_datasource.cpp b/src/wayland/autotests/client/test_datasource.cpp index 39db7dfedf..2e10a42ef4 100644 --- a/src/wayland/autotests/client/test_datasource.cpp +++ b/src/wayland/autotests/client/test_datasource.cpp @@ -6,15 +6,18 @@ // Qt #include #include + +#include "wayland/datadevicemanager_interface.h" +#include "wayland/datasource_interface.h" +#include "wayland/display.h" + // KWayland -#include "../../src/server/datadevicemanager_interface.h" -#include "../../src/server/datasource_interface.h" -#include "../../src/server/display.h" #include "KWayland/Client/connection_thread.h" #include "KWayland/Client/datadevicemanager.h" #include "KWayland/Client/datasource.h" #include "KWayland/Client/event_queue.h" #include "KWayland/Client/registry.h" + // Wayland #include diff --git a/src/wayland/autotests/client/test_drag_drop.cpp b/src/wayland/autotests/client/test_drag_drop.cpp index 5e647e54d8..0581b81dd8 100644 --- a/src/wayland/autotests/client/test_drag_drop.cpp +++ b/src/wayland/autotests/client/test_drag_drop.cpp @@ -6,12 +6,13 @@ // Qt #include // KWin -#include "../../src/server/compositor_interface.h" -#include "../../src/server/datadevicemanager_interface.h" -#include "../../src/server/datasource_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/seat_interface.h" -#include "../../src/server/seat_interface_p.h" +#include "wayland/compositor_interface.h" +#include "wayland/datadevicemanager_interface.h" +#include "wayland/datasource_interface.h" +#include "wayland/display.h" +#include "wayland/seat_interface.h" +#include "wayland/seat_interface_p.h" + #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" #include "KWayland/Client/datadevice.h" diff --git a/src/wayland/autotests/client/test_error.cpp b/src/wayland/autotests/client/test_error.cpp index 4a697bc979..34963d578c 100644 --- a/src/wayland/autotests/client/test_error.cpp +++ b/src/wayland/autotests/client/test_error.cpp @@ -5,6 +5,12 @@ */ // Qt #include + +// server +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/plasmashell_interface.h" + // client #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" @@ -12,10 +18,6 @@ #include "KWayland/Client/plasmashell.h" #include "KWayland/Client/registry.h" #include "KWayland/Client/surface.h" -// server -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/plasmashell_interface.h" #include diff --git a/src/wayland/autotests/client/test_fake_input.cpp b/src/wayland/autotests/client/test_fake_input.cpp index e68a810777..f524e5aff4 100644 --- a/src/wayland/autotests/client/test_fake_input.cpp +++ b/src/wayland/autotests/client/test_fake_input.cpp @@ -11,8 +11,8 @@ #include "KWayland/Client/fakeinput.h" #include "KWayland/Client/registry.h" // server -#include "../../src/server/display.h" -#include "../../src/server/fakeinput_interface.h" +#include "wayland/display.h" +#include "wayland/fakeinput_interface.h" #include diff --git a/src/wayland/autotests/client/test_idle.cpp b/src/wayland/autotests/client/test_idle.cpp index 216a9c56e3..d434a921db 100644 --- a/src/wayland/autotests/client/test_idle.cpp +++ b/src/wayland/autotests/client/test_idle.cpp @@ -12,9 +12,9 @@ #include "KWayland/Client/registry.h" #include "KWayland/Client/seat.h" // server -#include "../../src/server/display.h" -#include "../../src/server/idle_interface.h" -#include "../../src/server/seat_interface.h" +#include "wayland/display.h" +#include "wayland/idle_interface.h" +#include "wayland/seat_interface.h" using namespace KWayland::Client; using namespace KWaylandServer; diff --git a/src/wayland/autotests/client/test_plasma_activities.cpp b/src/wayland/autotests/client/test_plasma_activities.cpp index 13f398ae16..3b03e8ce4a 100644 --- a/src/wayland/autotests/client/test_plasma_activities.cpp +++ b/src/wayland/autotests/client/test_plasma_activities.cpp @@ -6,9 +6,10 @@ // Qt #include // KWin -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/plasmawindowmanagement_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/plasmawindowmanagement_interface.h" + #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" #include "KWayland/Client/event_queue.h" diff --git a/src/wayland/autotests/client/test_plasma_virtual_desktop.cpp b/src/wayland/autotests/client/test_plasma_virtual_desktop.cpp index 4c4d3518c2..fb14fa692e 100644 --- a/src/wayland/autotests/client/test_plasma_virtual_desktop.cpp +++ b/src/wayland/autotests/client/test_plasma_virtual_desktop.cpp @@ -6,10 +6,11 @@ // Qt #include // KWin -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/plasmavirtualdesktop_interface.h" -#include "../../src/server/plasmawindowmanagement_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/plasmavirtualdesktop_interface.h" +#include "wayland/plasmawindowmanagement_interface.h" + #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" #include "KWayland/Client/event_queue.h" diff --git a/src/wayland/autotests/client/test_plasmashell.cpp b/src/wayland/autotests/client/test_plasmashell.cpp index c015d4c0a3..aae2ab27d3 100644 --- a/src/wayland/autotests/client/test_plasmashell.cpp +++ b/src/wayland/autotests/client/test_plasmashell.cpp @@ -6,9 +6,10 @@ // Qt #include // KWayland -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/plasmashell_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/plasmashell_interface.h" + #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" #include "KWayland/Client/event_queue.h" diff --git a/src/wayland/autotests/client/test_pointer_constraints.cpp b/src/wayland/autotests/client/test_pointer_constraints.cpp index 010a1b2752..4bfb738479 100644 --- a/src/wayland/autotests/client/test_pointer_constraints.cpp +++ b/src/wayland/autotests/client/test_pointer_constraints.cpp @@ -15,11 +15,11 @@ #include "KWayland/Client/seat.h" #include "KWayland/Client/surface.h" // server -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/pointerconstraints_v1_interface.h" -#include "../../src/server/seat_interface.h" -#include "../../src/server/surface_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/pointerconstraints_v1_interface.h" +#include "wayland/seat_interface.h" +#include "wayland/surface_interface.h" using namespace KWayland::Client; using namespace KWaylandServer; diff --git a/src/wayland/autotests/client/test_selection.cpp b/src/wayland/autotests/client/test_selection.cpp index 13a6715595..a437d931cf 100644 --- a/src/wayland/autotests/client/test_selection.cpp +++ b/src/wayland/autotests/client/test_selection.cpp @@ -17,10 +17,10 @@ #include "KWayland/Client/seat.h" #include "KWayland/Client/surface.h" // server -#include "../../src/server/compositor_interface.h" -#include "../../src/server/datadevicemanager_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/seat_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/datadevicemanager_interface.h" +#include "wayland/display.h" +#include "wayland/seat_interface.h" using namespace KWayland::Client; using namespace KWaylandServer; diff --git a/src/wayland/autotests/client/test_server_side_decoration.cpp b/src/wayland/autotests/client/test_server_side_decoration.cpp index 5eb0ae6afd..6ec42b7680 100644 --- a/src/wayland/autotests/client/test_server_side_decoration.cpp +++ b/src/wayland/autotests/client/test_server_side_decoration.cpp @@ -6,9 +6,10 @@ // Qt #include // KWin -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/server_decoration_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/server_decoration_interface.h" + #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" #include "KWayland/Client/event_queue.h" diff --git a/src/wayland/autotests/client/test_server_side_decoration_palette.cpp b/src/wayland/autotests/client/test_server_side_decoration_palette.cpp index 839f147a71..7edfcd4072 100644 --- a/src/wayland/autotests/client/test_server_side_decoration_palette.cpp +++ b/src/wayland/autotests/client/test_server_side_decoration_palette.cpp @@ -7,9 +7,10 @@ // Qt #include // KWin -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/server_decoration_palette_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/server_decoration_palette_interface.h" + #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" #include "KWayland/Client/event_queue.h" diff --git a/src/wayland/autotests/client/test_shadow.cpp b/src/wayland/autotests/client/test_shadow.cpp index 0f03ae16ee..5199dcc4c0 100644 --- a/src/wayland/autotests/client/test_shadow.cpp +++ b/src/wayland/autotests/client/test_shadow.cpp @@ -14,10 +14,10 @@ #include "KWayland/Client/shm_pool.h" #include "KWayland/Client/surface.h" // server -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/shadow_interface.h" -#include "../../src/server/shmclientbuffer.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/shadow_interface.h" +#include "wayland/shmclientbuffer.h" using namespace KWayland::Client; using namespace KWaylandServer; diff --git a/src/wayland/autotests/client/test_shm_pool.cpp b/src/wayland/autotests/client/test_shm_pool.cpp index 6b9cb6fafa..9658f48c22 100644 --- a/src/wayland/autotests/client/test_shm_pool.cpp +++ b/src/wayland/autotests/client/test_shm_pool.cpp @@ -7,9 +7,10 @@ #include #include // KWin -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/surface_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/surface_interface.h" + #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" #include "KWayland/Client/registry.h" diff --git a/src/wayland/autotests/client/test_text_input_v2.cpp b/src/wayland/autotests/client/test_text_input_v2.cpp index 5b26ef95ab..2c59979016 100644 --- a/src/wayland/autotests/client/test_text_input_v2.cpp +++ b/src/wayland/autotests/client/test_text_input_v2.cpp @@ -15,11 +15,11 @@ #include "KWayland/Client/surface.h" #include "KWayland/Client/textinput.h" // server -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/seat_interface.h" -#include "../../src/server/textinput.h" -#include "../../src/server/textinput_v2_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/seat_interface.h" +#include "wayland/textinput.h" +#include "wayland/textinput_v2_interface.h" using namespace KWayland::Client; using namespace KWaylandServer; diff --git a/src/wayland/autotests/client/test_wayland_appmenu.cpp b/src/wayland/autotests/client/test_wayland_appmenu.cpp index 11e450f368..6136be11da 100644 --- a/src/wayland/autotests/client/test_wayland_appmenu.cpp +++ b/src/wayland/autotests/client/test_wayland_appmenu.cpp @@ -7,9 +7,10 @@ // Qt #include // KWin -#include "../../src/server/appmenu_interface.h" -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" +#include "wayland/appmenu_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" + #include "KWayland/Client/appmenu.h" #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" diff --git a/src/wayland/autotests/client/test_wayland_blur.cpp b/src/wayland/autotests/client/test_wayland_blur.cpp index dfcd0a00c9..52a88b5580 100644 --- a/src/wayland/autotests/client/test_wayland_blur.cpp +++ b/src/wayland/autotests/client/test_wayland_blur.cpp @@ -6,9 +6,10 @@ // Qt #include // KWin -#include "../../src/server/blur_interface.h" -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" +#include "wayland/blur_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" + #include "KWayland/Client/blur.h" #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" diff --git a/src/wayland/autotests/client/test_wayland_contrast.cpp b/src/wayland/autotests/client/test_wayland_contrast.cpp index ea63e2dc7d..6d8cfc7b97 100644 --- a/src/wayland/autotests/client/test_wayland_contrast.cpp +++ b/src/wayland/autotests/client/test_wayland_contrast.cpp @@ -7,9 +7,10 @@ // Qt #include // KWin -#include "../../src/server/compositor_interface.h" -#include "../../src/server/contrast_interface.h" -#include "../../src/server/display.h" +#include "wayland/compositor_interface.h" +#include "wayland/contrast_interface.h" +#include "wayland/display.h" + #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" #include "KWayland/Client/contrast.h" diff --git a/src/wayland/autotests/client/test_wayland_filter.cpp b/src/wayland/autotests/client/test_wayland_filter.cpp index 019b7ebe25..4ec6437a80 100644 --- a/src/wayland/autotests/client/test_wayland_filter.cpp +++ b/src/wayland/autotests/client/test_wayland_filter.cpp @@ -6,10 +6,11 @@ // Qt #include // KWin -#include "../../src/server/blur_interface.h" -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/filtered_display.h" +#include "wayland/blur_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/filtered_display.h" + #include "KWayland/Client/blur.h" #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" diff --git a/src/wayland/autotests/client/test_wayland_output.cpp b/src/wayland/autotests/client/test_wayland_output.cpp index 30c911fd99..70ed142e00 100644 --- a/src/wayland/autotests/client/test_wayland_output.cpp +++ b/src/wayland/autotests/client/test_wayland_output.cpp @@ -6,14 +6,16 @@ // Qt #include // KWin -#include "../../src/server/display.h" -#include "../../src/server/dpms_interface.h" -#include "../../src/server/output_interface.h" +#include "wayland/display.h" +#include "wayland/dpms_interface.h" +#include "wayland/output_interface.h" + #include "KWayland/Client/connection_thread.h" #include "KWayland/Client/dpms.h" #include "KWayland/Client/event_queue.h" #include "KWayland/Client/output.h" #include "KWayland/Client/registry.h" + // Wayland #include diff --git a/src/wayland/autotests/client/test_wayland_outputdevice.cpp b/src/wayland/autotests/client/test_wayland_outputdevice.cpp index 2c59820470..7fce0dce4e 100644 --- a/src/wayland/autotests/client/test_wayland_outputdevice.cpp +++ b/src/wayland/autotests/client/test_wayland_outputdevice.cpp @@ -7,12 +7,14 @@ // Qt #include // KWin -#include "../../src/server/display.h" -#include "../../src/server/outputdevice_interface.h" +#include "wayland/display.h" +#include "wayland/outputdevice_interface.h" + #include "KWayland/Client/connection_thread.h" #include "KWayland/Client/event_queue.h" #include "KWayland/Client/outputdevice.h" #include "KWayland/Client/registry.h" + // Wayland #include diff --git a/src/wayland/autotests/client/test_wayland_outputmanagement.cpp b/src/wayland/autotests/client/test_wayland_outputmanagement.cpp index 449b050e41..1056c0a6b2 100644 --- a/src/wayland/autotests/client/test_wayland_outputmanagement.cpp +++ b/src/wayland/autotests/client/test_wayland_outputmanagement.cpp @@ -7,11 +7,12 @@ // Qt #include // KWin -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/outputconfiguration_interface.h" -#include "../../src/server/outputdevice_interface.h" -#include "../../src/server/outputmanagement_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/outputconfiguration_interface.h" +#include "wayland/outputdevice_interface.h" +#include "wayland/outputmanagement_interface.h" + #include "KWayland/Client/connection_thread.h" #include "KWayland/Client/event_queue.h" #include "KWayland/Client/output.h" diff --git a/src/wayland/autotests/client/test_wayland_seat.cpp b/src/wayland/autotests/client/test_wayland_seat.cpp index a7fc4f1fbe..a829dd8b01 100644 --- a/src/wayland/autotests/client/test_wayland_seat.cpp +++ b/src/wayland/autotests/client/test_wayland_seat.cpp @@ -6,18 +6,19 @@ // Qt #include // KWin -#include "../../src/server/compositor_interface.h" -#include "../../src/server/datadevicemanager_interface.h" -#include "../../src/server/datasource_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/keyboard_interface.h" -#include "../../src/server/pointer_interface.h" -#include "../../src/server/pointergestures_v1_interface.h" -#include "../../src/server/relativepointer_v1_interface.h" -#include "../../src/server/seat_interface.h" -#include "../../src/server/shmclientbuffer.h" -#include "../../src/server/subcompositor_interface.h" -#include "../../src/server/surface_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/datadevicemanager_interface.h" +#include "wayland/datasource_interface.h" +#include "wayland/display.h" +#include "wayland/keyboard_interface.h" +#include "wayland/pointer_interface.h" +#include "wayland/pointergestures_v1_interface.h" +#include "wayland/relativepointer_v1_interface.h" +#include "wayland/seat_interface.h" +#include "wayland/shmclientbuffer.h" +#include "wayland/subcompositor_interface.h" +#include "wayland/surface_interface.h" + #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" #include "KWayland/Client/datadevice.h" @@ -35,6 +36,7 @@ #include "KWayland/Client/subsurface.h" #include "KWayland/Client/surface.h" #include "KWayland/Client/touch.h" + // Wayland #include "qwayland-pointer-gestures-unstable-v1.h" #include diff --git a/src/wayland/autotests/client/test_wayland_slide.cpp b/src/wayland/autotests/client/test_wayland_slide.cpp index 81e79d0b5d..3f8e7b476c 100644 --- a/src/wayland/autotests/client/test_wayland_slide.cpp +++ b/src/wayland/autotests/client/test_wayland_slide.cpp @@ -6,9 +6,10 @@ // Qt #include // KWin -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/slide_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/slide_interface.h" + #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" #include "KWayland/Client/event_queue.h" diff --git a/src/wayland/autotests/client/test_wayland_subsurface.cpp b/src/wayland/autotests/client/test_wayland_subsurface.cpp index a2bc2163a0..1faa52600e 100644 --- a/src/wayland/autotests/client/test_wayland_subsurface.cpp +++ b/src/wayland/autotests/client/test_wayland_subsurface.cpp @@ -6,10 +6,11 @@ // Qt #include // KWin -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/subcompositor_interface.h" -#include "../../src/server/surface_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/subcompositor_interface.h" +#include "wayland/surface_interface.h" + #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" #include "KWayland/Client/event_queue.h" @@ -19,6 +20,7 @@ #include "KWayland/Client/subcompositor.h" #include "KWayland/Client/subsurface.h" #include "KWayland/Client/surface.h" + // Wayland #include diff --git a/src/wayland/autotests/client/test_wayland_surface.cpp b/src/wayland/autotests/client/test_wayland_surface.cpp index 10102e4e9a..b1bc85550c 100644 --- a/src/wayland/autotests/client/test_wayland_surface.cpp +++ b/src/wayland/autotests/client/test_wayland_surface.cpp @@ -8,12 +8,13 @@ #include #include // KWin -#include "../../src/server/clientbuffer.h" -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/idleinhibit_v1_interface.h" -#include "../../src/server/shmclientbuffer.h" -#include "../../src/server/surface_interface.h" +#include "wayland/clientbuffer.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/idleinhibit_v1_interface.h" +#include "wayland/shmclientbuffer.h" +#include "wayland/surface_interface.h" + #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" #include "KWayland/Client/event_queue.h" @@ -23,6 +24,7 @@ #include "KWayland/Client/registry.h" #include "KWayland/Client/shm_pool.h" #include "KWayland/Client/surface.h" + // Wayland #include diff --git a/src/wayland/autotests/client/test_wayland_windowmanagement.cpp b/src/wayland/autotests/client/test_wayland_windowmanagement.cpp index 0f080106ce..cda9bb0637 100644 --- a/src/wayland/autotests/client/test_wayland_windowmanagement.cpp +++ b/src/wayland/autotests/client/test_wayland_windowmanagement.cpp @@ -6,10 +6,12 @@ // Qt #include // KWin -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/plasmawindowmanagement_interface.h" -#include "../../src/server/surface_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/plasmawindowmanagement_interface.h" +#include "wayland/surface_interface.h" +#include + #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" #include "KWayland/Client/event_queue.h" @@ -17,7 +19,6 @@ #include "KWayland/Client/region.h" #include "KWayland/Client/registry.h" #include "KWayland/Client/surface.h" -#include typedef void (KWaylandServer::PlasmaWindowInterface::*ServerWindowSignal)(); Q_DECLARE_METATYPE(ServerWindowSignal) diff --git a/src/wayland/autotests/client/test_xdg_decoration.cpp b/src/wayland/autotests/client/test_xdg_decoration.cpp index 1eee67cc32..73b29ae208 100644 --- a/src/wayland/autotests/client/test_xdg_decoration.cpp +++ b/src/wayland/autotests/client/test_xdg_decoration.cpp @@ -6,10 +6,11 @@ // Qt #include // KWin -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/xdgdecoration_v1_interface.h" -#include "../../src/server/xdgshell_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/xdgdecoration_v1_interface.h" +#include "wayland/xdgshell_interface.h" + #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" #include "KWayland/Client/event_queue.h" diff --git a/src/wayland/autotests/client/test_xdg_foreign.cpp b/src/wayland/autotests/client/test_xdg_foreign.cpp index 759559af0c..c6b2d71e02 100644 --- a/src/wayland/autotests/client/test_xdg_foreign.cpp +++ b/src/wayland/autotests/client/test_xdg_foreign.cpp @@ -7,10 +7,11 @@ // Qt #include // KWin -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/surface_interface.h" -#include "../../src/server/xdgforeign_v2_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/surface_interface.h" +#include "wayland/xdgforeign_v2_interface.h" + #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" #include "KWayland/Client/event_queue.h" diff --git a/src/wayland/autotests/client/test_xdg_output.cpp b/src/wayland/autotests/client/test_xdg_output.cpp index db3ea81a16..dfa5e9c40b 100644 --- a/src/wayland/autotests/client/test_xdg_output.cpp +++ b/src/wayland/autotests/client/test_xdg_output.cpp @@ -6,10 +6,11 @@ // Qt #include // KWin -#include "../../src/server/display.h" -#include "../../src/server/dpms_interface.h" -#include "../../src/server/output_interface.h" -#include "../../src/server/xdgoutput_v1_interface.h" +#include "wayland/display.h" +#include "wayland/dpms_interface.h" +#include "wayland/output_interface.h" +#include "wayland/xdgoutput_v1_interface.h" + #include "KWayland/Client/connection_thread.h" #include "KWayland/Client/dpms.h" #include "KWayland/Client/event_queue.h" @@ -17,8 +18,6 @@ #include "KWayland/Client/registry.h" #include "KWayland/Client/xdgoutput.h" -// Wayland - class TestXdgOutput : public QObject { Q_OBJECT diff --git a/src/wayland/autotests/client/test_xdg_shell.cpp b/src/wayland/autotests/client/test_xdg_shell.cpp index a436b984ff..742703b397 100644 --- a/src/wayland/autotests/client/test_xdg_shell.cpp +++ b/src/wayland/autotests/client/test_xdg_shell.cpp @@ -18,12 +18,12 @@ #include "KWayland/Client/surface.h" #include "KWayland/Client/xdgshell.h" // server -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/output_interface.h" -#include "../../src/server/seat_interface.h" -#include "../../src/server/surface_interface.h" -#include "../../src/server/xdgshell_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/output_interface.h" +#include "wayland/seat_interface.h" +#include "wayland/surface_interface.h" +#include "wayland/xdgshell_interface.h" using namespace KWayland::Client; using namespace KWaylandServer; diff --git a/src/wayland/autotests/server/CMakeLists.txt b/src/wayland/autotests/server/CMakeLists.txt index 95e05164f6..518f78ec0d 100644 --- a/src/wayland/autotests/server/CMakeLists.txt +++ b/src/wayland/autotests/server/CMakeLists.txt @@ -5,7 +5,7 @@ set( testWaylandServerDisplay_SRCS test_display.cpp ) add_executable(testWaylandServerDisplay ${testWaylandServerDisplay_SRCS}) -target_link_libraries( testWaylandServerDisplay Qt::Test Qt::Gui Plasma::KWaylandServer Wayland::Server) +target_link_libraries( testWaylandServerDisplay Qt::Test Qt::Gui kwin Wayland::Server) add_test(NAME kwayland-testWaylandServerDisplay COMMAND testWaylandServerDisplay) ecm_mark_as_test(testWaylandServerDisplay) @@ -16,7 +16,7 @@ set( testWaylandServerSeat_SRCS test_seat.cpp ) add_executable(testWaylandServerSeat ${testWaylandServerSeat_SRCS}) -target_link_libraries( testWaylandServerSeat Qt::Test Qt::Gui Plasma::KWaylandServer Wayland::Server) +target_link_libraries( testWaylandServerSeat Qt::Test Qt::Gui kwin Wayland::Server) add_test(NAME kwayland-testWaylandServerSeat COMMAND testWaylandServerSeat) ecm_mark_as_test(testWaylandServerSeat) @@ -24,7 +24,7 @@ ecm_mark_as_test(testWaylandServerSeat) # Test No XDG_RUNTIME_DIR ######################################################## add_executable(testNoXdgRuntimeDir test_no_xdg_runtime_dir.cpp) -target_link_libraries( testNoXdgRuntimeDir Qt::Test Plasma::KWaylandServer) +target_link_libraries( testNoXdgRuntimeDir Qt::Test kwin) add_test(NAME kwayland-testNoXdgRuntimeDir COMMAND testNoXdgRuntimeDir) ecm_mark_as_test(testNoXdgRuntimeDir) @@ -42,7 +42,7 @@ else() ${WaylandProtocols_DATADIR}/unstable/tablet/tablet-unstable-v2.xml) endif() target_sources(testTabletInterface PRIVATE test_tablet_interface.cpp ${TABLET_SRCS}) -target_link_libraries( testTabletInterface Qt::Test Plasma::KWaylandServer KF5::WaylandClient Wayland::Client) +target_link_libraries( testTabletInterface Qt::Test kwin KF5::WaylandClient Wayland::Client) add_test(NAME kwayland-testTabletInterface COMMAND testTabletInterface) ecm_mark_as_test(testTabletInterface) @@ -52,15 +52,15 @@ ecm_mark_as_test(testTabletInterface) add_executable(testDataControlInterface test_datacontrol_interface.cpp ${DATACONTROL_SRCS}) if (QT_MAJOR_VERSION EQUAL "5") ecm_add_qtwayland_client_protocol(DATACONTROL_SRCS - PROTOCOL ${PROJECT_SOURCE_DIR}/src/protocols/wlr-data-control-unstable-v1.xml + PROTOCOL ${PROJECT_SOURCE_DIR}/src/wayland/protocols/wlr-data-control-unstable-v1.xml BASENAME wlr-data-control-unstable-v1 ) else() qt6_generate_wayland_protocol_client_sources(testDataControlInterface FILES - ${PROJECT_SOURCE_DIR}/src/protocols/wlr-data-control-unstable-v1.xml) + ${PROJECT_SOURCE_DIR}/src/wayland/protocols/wlr-data-control-unstable-v1.xml) endif() target_sources(testDataControlInterface PRIVATE test_datacontrol_interface.cpp ${DATACONTROL_SRCS}) -target_link_libraries( testDataControlInterface Qt::Test Plasma::KWaylandServer KF5::WaylandClient Wayland::Client) +target_link_libraries( testDataControlInterface Qt::Test kwin KF5::WaylandClient Wayland::Client) add_test(NAME kwayland-testDataControlInterface COMMAND testDataControlInterface) ecm_mark_as_test(testDataControlInterface) @@ -78,7 +78,7 @@ else() ${WaylandProtocols_DATADIR}/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml) endif() target_sources(testKeyboardShortcutsInhibitorInterface PRIVATE test_keyboard_shortcuts_inhibitor_interface.cpp ${KEYBOARD_SHORTCUTS_INHIBITOR_SRCS}) -target_link_libraries(testKeyboardShortcutsInhibitorInterface Qt::Test Plasma::KWaylandServer KF5::WaylandClient Wayland::Client) +target_link_libraries(testKeyboardShortcutsInhibitorInterface Qt::Test kwin KF5::WaylandClient Wayland::Client) add_test(NAME kwayland-testKeyboardShortcutsInhibitorInterface COMMAND testKeyboardShortcutsInhibitorInterface) ecm_mark_as_test(testKeyboardShortcutsInhibitorInterface) @@ -96,7 +96,7 @@ else() ${WaylandProtocols_DATADIR}/stable/viewporter/viewporter.xml) endif() target_sources(testViewporterInterface PRIVATE test_viewporter_interface.cpp ${VIEWPORTER_SRCS}) -target_link_libraries(testViewporterInterface Qt::Test Plasma::KWaylandServer KF5::WaylandClient Wayland::Client) +target_link_libraries(testViewporterInterface Qt::Test kwin KF5::WaylandClient Wayland::Client) add_test(NAME kwayland-testViewporterInterface COMMAND testViewporterInterface) ecm_mark_as_test(testViewporterInterface) @@ -114,7 +114,7 @@ else() ${PLASMA_WAYLAND_PROTOCOLS_DIR}/screencast.xml) endif() target_sources(testScreencastV1Interface PRIVATE test_screencast.cpp ${SCREENCAST_SRCS}) -target_link_libraries(testScreencastV1Interface Qt::Test Plasma::KWaylandServer Wayland::Client KF5::WaylandClient) +target_link_libraries(testScreencastV1Interface Qt::Test kwin Wayland::Client KF5::WaylandClient) add_test(NAME kwayland-testScreencastV1Interface COMMAND testScreencastV1Interface) ecm_mark_as_test(testScreencastV1Interface) @@ -138,7 +138,7 @@ else() ) endif() target_sources(testInputMethodInterface PRIVATE test_inputmethod_interface.cpp ${INPUTMETHOD_SRCS}) -target_link_libraries(testInputMethodInterface Qt::Test Plasma::KWaylandServer KF5::WaylandClient Wayland::Client) +target_link_libraries(testInputMethodInterface Qt::Test kwin KF5::WaylandClient Wayland::Client) add_test(NAME kwayland-testInputMethodInterface COMMAND testInputMethodInterface) ecm_mark_as_test(testInputMethodInterface) @@ -148,7 +148,7 @@ ecm_mark_as_test(testInputMethodInterface) add_executable(testLayerShellV1Interface) if (QT_MAJOR_VERSION EQUAL "5") ecm_add_qtwayland_client_protocol(LAYERSHELLV1_SRCS - PROTOCOL ${PROJECT_SOURCE_DIR}/src/protocols/wlr-layer-shell-unstable-v1.xml + PROTOCOL ${PROJECT_SOURCE_DIR}/src/wayland/protocols/wlr-layer-shell-unstable-v1.xml BASENAME wlr-layer-shell-unstable-v1 ) ecm_add_qtwayland_client_protocol(LAYERSHELLV1_SRCS @@ -157,12 +157,12 @@ if (QT_MAJOR_VERSION EQUAL "5") ) else() qt6_generate_wayland_protocol_client_sources(testLayerShellV1Interface FILES - ${PROJECT_SOURCE_DIR}/src/protocols/wlr-layer-shell-unstable-v1.xml + ${PROJECT_SOURCE_DIR}/src/wayland/protocols/wlr-layer-shell-unstable-v1.xml ${WaylandProtocols_DATADIR}/stable/xdg-shell/xdg-shell.xml ) endif() target_sources(testLayerShellV1Interface PRIVATE test_layershellv1_interface.cpp ${LAYERSHELLV1_SRCS}) -target_link_libraries(testLayerShellV1Interface Qt::Test Plasma::KWaylandServer KF5::WaylandClient Wayland::Client) +target_link_libraries(testLayerShellV1Interface Qt::Test kwin KF5::WaylandClient Wayland::Client) add_test(NAME kwayland-testLayerShellV1Interface COMMAND testLayerShellV1Interface) ecm_mark_as_test(testLayerShellV1Interface) @@ -181,6 +181,6 @@ else() ${WaylandProtocols_DATADIR}/unstable/text-input/text-input-unstable-v3.xml) endif() target_sources(testTextInputV3Interface PRIVATE test_textinputv3_interface.cpp ${TEXTINPUTV3_SRCS}) -target_link_libraries(testTextInputV3Interface Qt::Test Plasma::KWaylandServer KF5::WaylandClient Wayland::Client) +target_link_libraries(testTextInputV3Interface Qt::Test kwin KF5::WaylandClient Wayland::Client) add_test(NAME kwayland-testTextInputV3Interface COMMAND testTextInputV3Interface) ecm_mark_as_test(testTextInputV3Interface) diff --git a/src/wayland/autotests/server/test_datacontrol_interface.cpp b/src/wayland/autotests/server/test_datacontrol_interface.cpp index 71b0ecce04..9d527ebaec 100644 --- a/src/wayland/autotests/server/test_datacontrol_interface.cpp +++ b/src/wayland/autotests/server/test_datacontrol_interface.cpp @@ -11,12 +11,12 @@ #include // WaylandServer -#include "../../src/server/compositor_interface.h" -#include "../../src/server/datacontroldevice_v1_interface.h" -#include "../../src/server/datacontroldevicemanager_v1_interface.h" -#include "../../src/server/datacontrolsource_v1_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/seat_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/datacontroldevice_v1_interface.h" +#include "wayland/datacontroldevicemanager_v1_interface.h" +#include "wayland/datacontrolsource_v1_interface.h" +#include "wayland/display.h" +#include "wayland/seat_interface.h" #include #include diff --git a/src/wayland/autotests/server/test_display.cpp b/src/wayland/autotests/server/test_display.cpp index a7faa97bdd..f3615548d0 100644 --- a/src/wayland/autotests/server/test_display.cpp +++ b/src/wayland/autotests/server/test_display.cpp @@ -6,10 +6,10 @@ // Qt #include // WaylandServer -#include "../../src/server/clientconnection.h" -#include "../../src/server/display.h" -#include "../../src/server/output_interface.h" -#include "../../src/server/outputmanagement_v2_interface.h" +#include "wayland/clientconnection.h" +#include "wayland/display.h" +#include "wayland/output_interface.h" +#include "wayland/outputmanagement_v2_interface.h" // Wayland #include // system diff --git a/src/wayland/autotests/server/test_inputmethod_interface.cpp b/src/wayland/autotests/server/test_inputmethod_interface.cpp index 80595962b9..f9d088d450 100644 --- a/src/wayland/autotests/server/test_inputmethod_interface.cpp +++ b/src/wayland/autotests/server/test_inputmethod_interface.cpp @@ -9,10 +9,10 @@ #include #include // WaylandServer -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/inputmethod_v1_interface.h" -#include "../../src/server/seat_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/inputmethod_v1_interface.h" +#include "wayland/seat_interface.h" #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" diff --git a/src/wayland/autotests/server/test_keyboard_shortcuts_inhibitor_interface.cpp b/src/wayland/autotests/server/test_keyboard_shortcuts_inhibitor_interface.cpp index 8b616c9a49..ac4d068d59 100644 --- a/src/wayland/autotests/server/test_keyboard_shortcuts_inhibitor_interface.cpp +++ b/src/wayland/autotests/server/test_keyboard_shortcuts_inhibitor_interface.cpp @@ -9,10 +9,10 @@ #include #include // WaylandServer -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/keyboard_shortcuts_inhibit_v1_interface.h" -#include "../../src/server/seat_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/keyboard_shortcuts_inhibit_v1_interface.h" +#include "wayland/seat_interface.h" #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" diff --git a/src/wayland/autotests/server/test_layershellv1_interface.cpp b/src/wayland/autotests/server/test_layershellv1_interface.cpp index 17ec5d2d9d..2961ca1707 100644 --- a/src/wayland/autotests/server/test_layershellv1_interface.cpp +++ b/src/wayland/autotests/server/test_layershellv1_interface.cpp @@ -7,11 +7,11 @@ #include #include -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/layershell_v1_interface.h" -#include "../../src/server/surface_interface.h" -#include "../../src/server/xdgshell_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/layershell_v1_interface.h" +#include "wayland/surface_interface.h" +#include "wayland/xdgshell_interface.h" #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" diff --git a/src/wayland/autotests/server/test_no_xdg_runtime_dir.cpp b/src/wayland/autotests/server/test_no_xdg_runtime_dir.cpp index 0dd6a6329f..1e427d898c 100644 --- a/src/wayland/autotests/server/test_no_xdg_runtime_dir.cpp +++ b/src/wayland/autotests/server/test_no_xdg_runtime_dir.cpp @@ -6,7 +6,7 @@ // Qt #include // WaylandServer -#include "../../src/server/display.h" +#include "wayland/display.h" using namespace KWaylandServer; diff --git a/src/wayland/autotests/server/test_screencast.cpp b/src/wayland/autotests/server/test_screencast.cpp index efb679b09d..1780897fcf 100644 --- a/src/wayland/autotests/server/test_screencast.cpp +++ b/src/wayland/autotests/server/test_screencast.cpp @@ -12,10 +12,10 @@ #include // WaylandServer -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/screencast_v1_interface.h" -#include "../../src/server/seat_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/screencast_v1_interface.h" +#include "wayland/seat_interface.h" #include #include diff --git a/src/wayland/autotests/server/test_seat.cpp b/src/wayland/autotests/server/test_seat.cpp index 6bb98d4cde..dd898492d2 100644 --- a/src/wayland/autotests/server/test_seat.cpp +++ b/src/wayland/autotests/server/test_seat.cpp @@ -6,10 +6,10 @@ // Qt #include // WaylandServer -#include "../../src/server/display.h" -#include "../../src/server/keyboard_interface.h" -#include "../../src/server/pointer_interface.h" -#include "../../src/server/seat_interface.h" +#include "wayland/display.h" +#include "wayland/keyboard_interface.h" +#include "wayland/pointer_interface.h" +#include "wayland/seat_interface.h" using namespace KWaylandServer; diff --git a/src/wayland/autotests/server/test_tablet_interface.cpp b/src/wayland/autotests/server/test_tablet_interface.cpp index c5b3180c8b..74ec6fa779 100644 --- a/src/wayland/autotests/server/test_tablet_interface.cpp +++ b/src/wayland/autotests/server/test_tablet_interface.cpp @@ -8,10 +8,10 @@ #include #include // WaylandServer -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/seat_interface.h" -#include "../../src/server/tablet_v2_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/seat_interface.h" +#include "wayland/tablet_v2_interface.h" #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" diff --git a/src/wayland/autotests/server/test_textinputv3_interface.cpp b/src/wayland/autotests/server/test_textinputv3_interface.cpp index 0625b310c5..efe09b5833 100644 --- a/src/wayland/autotests/server/test_textinputv3_interface.cpp +++ b/src/wayland/autotests/server/test_textinputv3_interface.cpp @@ -7,11 +7,11 @@ #include #include -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/seat_interface.h" -#include "../../src/server/surface_interface.h" -#include "../../src/server/textinput_v3_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/seat_interface.h" +#include "wayland/surface_interface.h" +#include "wayland/textinput_v3_interface.h" #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" diff --git a/src/wayland/autotests/server/test_viewporter_interface.cpp b/src/wayland/autotests/server/test_viewporter_interface.cpp index 5920d420fc..de3c80972e 100644 --- a/src/wayland/autotests/server/test_viewporter_interface.cpp +++ b/src/wayland/autotests/server/test_viewporter_interface.cpp @@ -7,10 +7,10 @@ #include #include -#include "../../src/server/compositor_interface.h" -#include "../../src/server/display.h" -#include "../../src/server/surface_interface.h" -#include "../../src/server/viewporter_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/display.h" +#include "wayland/surface_interface.h" +#include "wayland/viewporter_interface.h" #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" diff --git a/src/wayland/blur_interface.h b/src/wayland/blur_interface.h index 13aa4ff02f..51314eee55 100644 --- a/src/wayland/blur_interface.h +++ b/src/wayland/blur_interface.h @@ -7,9 +7,9 @@ */ #pragma once -#include +#include "kwin_export.h" -#include +#include struct wl_resource; @@ -27,7 +27,7 @@ class BlurInterfacePrivate; * @see BlurInterface * @see SurfaceInterface */ -class KWAYLANDSERVER_EXPORT BlurManagerInterface : public QObject +class KWIN_EXPORT BlurManagerInterface : public QObject { Q_OBJECT public: @@ -54,7 +54,7 @@ private: * @see BlurManagerInterface * @see SurfaceInterface */ -class KWAYLANDSERVER_EXPORT BlurInterface : public QObject +class KWIN_EXPORT BlurInterface : public QObject { Q_OBJECT public: diff --git a/src/wayland/clientbuffer.h b/src/wayland/clientbuffer.h index 84326264ff..fe4699d717 100644 --- a/src/wayland/clientbuffer.h +++ b/src/wayland/clientbuffer.h @@ -6,12 +6,12 @@ #pragma once +#include "kwin_export.h" + #include #include #include -#include - struct wl_resource; namespace KWaylandServer @@ -26,7 +26,7 @@ class ClientBufferPrivate; * You can use the isDestroyed() function to check whether the wl_buffer object has been * destroyed. */ -class KWAYLANDSERVER_EXPORT ClientBuffer : public QObject +class KWIN_EXPORT ClientBuffer : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(ClientBuffer) diff --git a/src/wayland/clientbufferintegration.h b/src/wayland/clientbufferintegration.h index 86df10ca5d..0c2fd6ee02 100644 --- a/src/wayland/clientbufferintegration.h +++ b/src/wayland/clientbufferintegration.h @@ -14,7 +14,7 @@ namespace KWaylandServer { class Display; -class KWAYLANDSERVER_EXPORT ClientBufferIntegration : public QObject +class KWIN_EXPORT ClientBufferIntegration : public QObject { Q_OBJECT diff --git a/src/wayland/clientconnection.h b/src/wayland/clientconnection.h index d0330677f6..414fb1ea93 100644 --- a/src/wayland/clientconnection.h +++ b/src/wayland/clientconnection.h @@ -5,12 +5,12 @@ */ #pragma once +#include "kwin_export.h" + #include #include -#include - struct wl_client; struct wl_resource; @@ -28,7 +28,7 @@ class Display; * * @see Display */ -class KWAYLANDSERVER_EXPORT ClientConnection : public QObject +class KWIN_EXPORT ClientConnection : public QObject { Q_OBJECT public: diff --git a/src/wayland/compositor_interface.h b/src/wayland/compositor_interface.h index 97f9b1522b..a5494b7ca6 100644 --- a/src/wayland/compositor_interface.h +++ b/src/wayland/compositor_interface.h @@ -6,12 +6,12 @@ */ #pragma once +#include "kwin_export.h" + #include "surface_interface.h" #include -#include - namespace KWaylandServer { class CompositorInterfacePrivate; @@ -22,7 +22,7 @@ class Display; * * The CompositorInterface corresponds to the Wayland interface @c wl_compositor. */ -class KWAYLANDSERVER_EXPORT CompositorInterface : public QObject +class KWIN_EXPORT CompositorInterface : public QObject { Q_OBJECT diff --git a/src/wayland/contrast_interface.h b/src/wayland/contrast_interface.h index c3778f8933..a6339056f6 100644 --- a/src/wayland/contrast_interface.h +++ b/src/wayland/contrast_interface.h @@ -6,13 +6,13 @@ */ #pragma once +#include "kwin_export.h" + #include #include #include -#include - struct wl_resource; namespace KWaylandServer @@ -29,7 +29,7 @@ class ContrastInterfacePrivate; * @see ContrastInterface * @see SurfaceInterface */ -class KWAYLANDSERVER_EXPORT ContrastManagerInterface : public QObject +class KWIN_EXPORT ContrastManagerInterface : public QObject { Q_OBJECT @@ -55,7 +55,7 @@ private: * @see ContrastManagerInterface * @see SurfaceInterface */ -class KWAYLANDSERVER_EXPORT ContrastInterface : public QObject +class KWIN_EXPORT ContrastInterface : public QObject { Q_OBJECT public: diff --git a/src/wayland/datacontroldevice_v1_interface.h b/src/wayland/datacontroldevice_v1_interface.h index aa63775766..5b2c93274f 100644 --- a/src/wayland/datacontroldevice_v1_interface.h +++ b/src/wayland/datacontroldevice_v1_interface.h @@ -5,9 +5,9 @@ */ #pragma once -#include +#include "kwin_export.h" -#include +#include struct wl_resource; @@ -26,7 +26,7 @@ class SurfaceInterface; * * DataControlDeviceV1Interface corresponds to the Wayland interface @c zwlr_data_control_device_v1. */ -class KWAYLANDSERVER_EXPORT DataControlDeviceV1Interface : public QObject +class KWIN_EXPORT DataControlDeviceV1Interface : public QObject { Q_OBJECT diff --git a/src/wayland/datacontroldevicemanager_v1_interface.h b/src/wayland/datacontroldevicemanager_v1_interface.h index 8588d79cb0..d6623ad8f0 100644 --- a/src/wayland/datacontroldevicemanager_v1_interface.h +++ b/src/wayland/datacontroldevicemanager_v1_interface.h @@ -5,9 +5,9 @@ */ #pragma once -#include +#include "kwin_export.h" -#include +#include namespace KWaylandServer { @@ -22,7 +22,7 @@ class DataControlDeviceV1Interface; * * DataControlDeviceManagerV1Interface corresponds to the Wayland interface @c zwlr_data_control_manager_v1. */ -class KWAYLANDSERVER_EXPORT DataControlDeviceManagerV1Interface : public QObject +class KWIN_EXPORT DataControlDeviceManagerV1Interface : public QObject { Q_OBJECT diff --git a/src/wayland/datacontroloffer_v1_interface.h b/src/wayland/datacontroloffer_v1_interface.h index dd58c9dad6..1eb1804254 100644 --- a/src/wayland/datacontroloffer_v1_interface.h +++ b/src/wayland/datacontroloffer_v1_interface.h @@ -5,9 +5,9 @@ */ #pragma once -#include +#include "kwin_export.h" -#include +#include #include "datacontroldevicemanager_v1_interface.h" @@ -25,7 +25,7 @@ class DataControlOfferV1InterfacePrivate; * * DataControlOfferV1Interface corresponds to the Wayland interface @c zwlr_data_control_offer_v1. */ -class KWAYLANDSERVER_EXPORT DataControlOfferV1Interface : public QObject +class KWIN_EXPORT DataControlOfferV1Interface : public QObject { Q_OBJECT diff --git a/src/wayland/datacontrolsource_v1_interface.h b/src/wayland/datacontrolsource_v1_interface.h index 8a29a86d87..0d5b665817 100644 --- a/src/wayland/datacontrolsource_v1_interface.h +++ b/src/wayland/datacontrolsource_v1_interface.h @@ -5,10 +5,9 @@ */ #pragma once -#include "abstract_data_source.h" - -#include +#include "kwin_export.h" +#include "abstract_data_source.h" #include "datacontroldevicemanager_v1_interface.h" namespace KWaylandServer @@ -20,7 +19,7 @@ class DataControlSourceV1InterfacePrivate; * * DataControlSourceV1Interface corresponds to the wayland interface zwlr_data_control_source_v1. */ -class KWAYLANDSERVER_EXPORT DataControlSourceV1Interface : public AbstractDataSource +class KWIN_EXPORT DataControlSourceV1Interface : public AbstractDataSource { Q_OBJECT diff --git a/src/wayland/datadevice_interface.h b/src/wayland/datadevice_interface.h index 9f8b46fa79..b9aa3d43e7 100644 --- a/src/wayland/datadevice_interface.h +++ b/src/wayland/datadevice_interface.h @@ -7,9 +7,9 @@ */ #pragma once -#include +#include "kwin_export.h" -#include +#include #include "abstract_drop_handler.h" @@ -33,7 +33,7 @@ class DragAndDropIconPrivate; * Note that the lifetime of the drag-and-drop icon is bound to the lifetime of the underlying * icon surface. */ -class KWAYLANDSERVER_EXPORT DragAndDropIcon : public QObject +class KWIN_EXPORT DragAndDropIcon : public QObject { Q_OBJECT @@ -67,7 +67,7 @@ private: * @see SeatInterface * @see DataSourceInterface */ -class KWAYLANDSERVER_EXPORT DataDeviceInterface : public AbstractDropHandler +class KWIN_EXPORT DataDeviceInterface : public AbstractDropHandler { Q_OBJECT public: diff --git a/src/wayland/datadevicemanager_interface.h b/src/wayland/datadevicemanager_interface.h index 60c5d14aa0..2197fce43f 100644 --- a/src/wayland/datadevicemanager_interface.h +++ b/src/wayland/datadevicemanager_interface.h @@ -6,10 +6,11 @@ */ #pragma once +#include "kwin_export.h" + #include #include "datadevice_interface.h" -#include namespace KWaylandServer { @@ -21,7 +22,7 @@ class DataDeviceManagerInterfacePrivate; * @brief Represents the Global for wl_data_device_manager interface. * */ -class KWAYLANDSERVER_EXPORT DataDeviceManagerInterface : public QObject +class KWIN_EXPORT DataDeviceManagerInterface : public QObject { Q_OBJECT diff --git a/src/wayland/dataoffer_interface.h b/src/wayland/dataoffer_interface.h index e8fa7ed59b..a147173c28 100644 --- a/src/wayland/dataoffer_interface.h +++ b/src/wayland/dataoffer_interface.h @@ -6,9 +6,9 @@ */ #pragma once -#include +#include "kwin_export.h" -#include +#include #include "datadevicemanager_interface.h" @@ -22,7 +22,7 @@ class DataOfferInterfacePrivate; * @brief Represents the Resource for the wl_data_offer interface. * */ -class KWAYLANDSERVER_EXPORT DataOfferInterface : public QObject +class KWIN_EXPORT DataOfferInterface : public QObject { Q_OBJECT public: diff --git a/src/wayland/datasource_interface.h b/src/wayland/datasource_interface.h index f99971f7d4..572d6c4fa0 100644 --- a/src/wayland/datasource_interface.h +++ b/src/wayland/datasource_interface.h @@ -6,10 +6,9 @@ */ #pragma once -#include "abstract_data_source.h" - -#include +#include "kwin_export.h" +#include "abstract_data_source.h" #include "datadevicemanager_interface.h" namespace KWaylandServer @@ -19,7 +18,7 @@ class DataSourceInterfacePrivate; /** * @brief Represents the Resource for the wl_data_source interface. */ -class KWAYLANDSERVER_EXPORT DataSourceInterface : public AbstractDataSource +class KWIN_EXPORT DataSourceInterface : public AbstractDataSource { Q_OBJECT public: diff --git a/src/wayland/display.cpp b/src/wayland/display.cpp index 2b4006220d..e9b41f156c 100644 --- a/src/wayland/display.cpp +++ b/src/wayland/display.cpp @@ -8,9 +8,9 @@ #include "clientbufferintegration.h" #include "display_p.h" #include "drmclientbuffer.h" -#include "logging.h" #include "output_interface.h" #include "shmclientbuffer.h" +#include "utils/common.h" #include #include @@ -52,7 +52,7 @@ Display::~Display() bool Display::addSocketFileDescriptor(int fileDescriptor, const QString &name) { if (wl_display_add_socket_fd(d->display, fileDescriptor)) { - qCWarning(KWAYLAND_SERVER, "Failed to add %d fd to display", fileDescriptor); + qCWarning(KWIN_CORE, "Failed to add %d fd to display", fileDescriptor); return false; } if (!name.isEmpty()) { @@ -66,13 +66,13 @@ bool Display::addSocketName(const QString &name) if (name.isEmpty()) { const char *socket = wl_display_add_socket_auto(d->display); if (!socket) { - qCWarning(KWAYLAND_SERVER, "Failed to find a free display socket"); + qCWarning(KWIN_CORE, "Failed to find a free display socket"); return false; } d->registerSocketName(QString::fromUtf8(socket)); } else { if (wl_display_add_socket(d->display, qPrintable(name))) { - qCWarning(KWAYLAND_SERVER, "Failed to add %s socket to display", qPrintable(name)); + qCWarning(KWIN_CORE, "Failed to add %s socket to display", qPrintable(name)); return false; } d->registerSocketName(name); @@ -93,7 +93,7 @@ bool Display::start() const int fileDescriptor = wl_event_loop_get_fd(d->loop); if (fileDescriptor == -1) { - qCWarning(KWAYLAND_SERVER) << "Did not get the file descriptor for the event loop"; + qCWarning(KWIN_CORE) << "Did not get the file descriptor for the event loop"; return false; } @@ -112,7 +112,7 @@ bool Display::start() void Display::dispatchEvents() { if (wl_event_loop_dispatch(d->loop, 0) != 0) { - qCWarning(KWAYLAND_SERVER) << "Error on dispatching Wayland event loop"; + qCWarning(KWIN_CORE) << "Error on dispatching Wayland event loop"; } } @@ -221,7 +221,7 @@ ClientConnection *Display::createClient(int fd) void Display::setEglDisplay(void *display) { if (d->eglDisplay != EGL_NO_DISPLAY) { - qCWarning(KWAYLAND_SERVER) << "EGLDisplay cannot be changed"; + qCWarning(KWIN_CORE) << "EGLDisplay cannot be changed"; return; } d->eglDisplay = (EGLDisplay)display; diff --git a/src/wayland/display.h b/src/wayland/display.h index c90cc5bf08..499afcda7a 100644 --- a/src/wayland/display.h +++ b/src/wayland/display.h @@ -6,11 +6,11 @@ */ #pragma once +#include "kwin_export.h" + #include #include -#include - #include "clientconnection.h" struct wl_client; @@ -44,7 +44,7 @@ class SeatInterface; * * @todo Improve documentation */ -class KWAYLANDSERVER_EXPORT Display : public QObject +class KWIN_EXPORT Display : public QObject { Q_OBJECT Q_PROPERTY(bool running READ isRunning NOTIFY runningChanged) diff --git a/src/wayland/dpms_interface.h b/src/wayland/dpms_interface.h index 24cd6df385..668c73877a 100644 --- a/src/wayland/dpms_interface.h +++ b/src/wayland/dpms_interface.h @@ -5,9 +5,9 @@ */ #pragma once -#include +#include "kwin_export.h" -#include +#include namespace KWaylandServer { @@ -46,7 +46,7 @@ class DpmsManagerInterfacePrivate; * @see Display * @see OutputInterface */ -class KWAYLANDSERVER_EXPORT DpmsManagerInterface : public QObject +class KWIN_EXPORT DpmsManagerInterface : public QObject { Q_OBJECT diff --git a/src/wayland/drmclientbuffer.h b/src/wayland/drmclientbuffer.h index bbd46d532a..31eb3c2fa0 100644 --- a/src/wayland/drmclientbuffer.h +++ b/src/wayland/drmclientbuffer.h @@ -16,7 +16,7 @@ class DrmClientBufferPrivate; /** * The DrmClientBufferIntegration class provides support for wl_drm client buffers. */ -class KWAYLANDSERVER_EXPORT DrmClientBufferIntegration : public ClientBufferIntegration +class KWIN_EXPORT DrmClientBufferIntegration : public ClientBufferIntegration { Q_OBJECT @@ -33,7 +33,7 @@ public: * linux-dmabuf-v1 protocol. Note that Vulkan WSI in Mesa still prefers wl_drm, but * that's about to change, https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4942/ */ -class KWAYLANDSERVER_EXPORT DrmClientBuffer : public ClientBuffer +class KWIN_EXPORT DrmClientBuffer : public ClientBuffer { Q_OBJECT Q_DECLARE_PRIVATE(DrmClientBuffer) diff --git a/src/wayland/drmleasedevice_v1_interface.cpp b/src/wayland/drmleasedevice_v1_interface.cpp index 27837b08ab..7431ee5e23 100644 --- a/src/wayland/drmleasedevice_v1_interface.cpp +++ b/src/wayland/drmleasedevice_v1_interface.cpp @@ -7,8 +7,8 @@ #include "drmleasedevice_v1_interface.h" #include "display.h" #include "drmleasedevice_v1_interface_p.h" -#include "logging.h" #include "utils.h" +#include "utils/common.h" #include #include @@ -256,14 +256,14 @@ void DrmLeaseRequestV1Interface::wp_drm_lease_request_v1_request_connector(Resou if (connectorPrivate->device != device->q) { wl_resource_post_error(resource->handle, WP_DRM_LEASE_REQUEST_V1_ERROR_WRONG_DEVICE, "Requested connector from invalid lease device"); } else if (connectorPrivate->withdrawn) { - qCWarning(KWAYLAND_SERVER) << "DrmLease: withdrawn connector requested"; + qCWarning(KWIN_CORE) << "DrmLease: withdrawn connector requested"; } else if (connectors.contains(connector)) { wl_resource_post_error(resource->handle, WP_DRM_LEASE_REQUEST_V1_ERROR_DUPLICATE_CONNECTOR, "Requested connector twice"); } else { connectors << connector; } } else { - qCWarning(KWAYLAND_SERVER, "DrmLease: Invalid connector requested"); + qCWarning(KWIN_CORE, "DrmLease: Invalid connector requested"); } } @@ -277,16 +277,16 @@ void DrmLeaseRequestV1Interface::wp_drm_lease_request_v1_submit(Resource *resour DrmLeaseV1Interface *lease = new DrmLeaseV1Interface(device, leaseResource); device->leases << lease; if (!device->hasDrmMaster) { - qCWarning(KWAYLAND_SERVER) << "DrmLease: rejecting lease request without drm master"; + qCWarning(KWIN_CORE) << "DrmLease: rejecting lease request without drm master"; lease->deny(); } else if (invalid) { - qCWarning(KWAYLAND_SERVER()) << "DrmLease: rejecting lease request with a withdrawn connector"; + qCWarning(KWIN_CORE) << "DrmLease: rejecting lease request with a withdrawn connector"; lease->deny(); } else if (connectors.isEmpty()) { wl_resource_post_error(resource->handle, WP_DRM_LEASE_REQUEST_V1_ERROR_EMPTY_LEASE, "Requested lease without connectors"); } else { lease->d->connectors = connectors; - emit device->q->leaseRequested(lease); + Q_EMIT device->q->leaseRequested(lease); } wl_resource_destroy(resource->handle); } diff --git a/src/wayland/drmleasedevice_v1_interface.h b/src/wayland/drmleasedevice_v1_interface.h index 8ab3b8a871..d360daaf92 100644 --- a/src/wayland/drmleasedevice_v1_interface.h +++ b/src/wayland/drmleasedevice_v1_interface.h @@ -6,7 +6,7 @@ #pragma once -#include +#include "kwin_export.h" #include #include @@ -27,7 +27,7 @@ class DrmLeaseConnectorV1InterfacePrivate; * The DrmLeaseV1DeviceInterface allows the wayland compositor to offer unused * drm connectors for lease by clients. The main use for this is VR headsets */ -class KWAYLANDSERVER_EXPORT DrmLeaseDeviceV1Interface : public QObject +class KWIN_EXPORT DrmLeaseDeviceV1Interface : public QObject { Q_OBJECT public: @@ -65,7 +65,7 @@ private: * will allow clients to requests a lease for the connector, deleting it will result in the * offer and possibly an active lease being revoked */ -class KWAYLANDSERVER_EXPORT DrmLeaseConnectorV1Interface : public QObject +class KWIN_EXPORT DrmLeaseConnectorV1Interface : public QObject { Q_OBJECT public: @@ -82,7 +82,7 @@ private: /** * Represents a lease request or active lease */ -class KWAYLANDSERVER_EXPORT DrmLeaseV1Interface : public QObject +class KWIN_EXPORT DrmLeaseV1Interface : public QObject { Q_OBJECT public: diff --git a/src/wayland/fakeinput_interface.h b/src/wayland/fakeinput_interface.h index 1fd9100b01..df27f69b00 100644 --- a/src/wayland/fakeinput_interface.h +++ b/src/wayland/fakeinput_interface.h @@ -5,12 +5,12 @@ */ #pragma once +#include "kwin_export.h" + #include #include #include -#include - struct wl_resource; namespace KWaylandServer @@ -36,7 +36,7 @@ class FakeInputInterfacePrivate; * * @see FakeInputDevice */ -class KWAYLANDSERVER_EXPORT FakeInputInterface : public QObject +class KWIN_EXPORT FakeInputInterface : public QObject { Q_OBJECT @@ -60,7 +60,7 @@ private: * * @see FakeInputInterface */ -class KWAYLANDSERVER_EXPORT FakeInputDevice : public QObject +class KWIN_EXPORT FakeInputDevice : public QObject { Q_OBJECT public: diff --git a/src/wayland/filtered_display.h b/src/wayland/filtered_display.h index 0a8b59f71e..7130084071 100644 --- a/src/wayland/filtered_display.h +++ b/src/wayland/filtered_display.h @@ -8,8 +8,6 @@ #include "display.h" -#include - namespace KWaylandServer { class FilteredDisplayPrivate; @@ -19,7 +17,7 @@ class FilteredDisplayPrivate; * * Users of this class must implement the virtual @method allowInterface method. */ -class KWAYLANDSERVER_EXPORT FilteredDisplay : public Display +class KWIN_EXPORT FilteredDisplay : public Display { Q_OBJECT public: diff --git a/src/wayland/idle_interface.h b/src/wayland/idle_interface.h index 49da51a772..9527c6a245 100644 --- a/src/wayland/idle_interface.h +++ b/src/wayland/idle_interface.h @@ -5,9 +5,9 @@ */ #pragma once -#include +#include "kwin_export.h" -#include +#include struct wl_resource; @@ -34,7 +34,7 @@ class IdleInterfacePrivate; * interface it is possible to notice that there are input events. A server should consider * this to decide whether it wants to provide this feature! */ -class KWAYLANDSERVER_EXPORT IdleInterface : public QObject +class KWIN_EXPORT IdleInterface : public QObject { Q_OBJECT diff --git a/src/wayland/idleinhibit_v1_interface.h b/src/wayland/idleinhibit_v1_interface.h index 6d88a82e34..f390a4f111 100644 --- a/src/wayland/idleinhibit_v1_interface.h +++ b/src/wayland/idleinhibit_v1_interface.h @@ -5,9 +5,9 @@ */ #pragma once -#include +#include "kwin_export.h" -#include +#include struct wl_resource; @@ -21,7 +21,7 @@ class IdleInhibitManagerV1InterfacePrivate; * SurfaceInterface. Whether a SurfaceInterface inhibits idle is exposes through * @link{SurfaceInterface::inhibitsIdle}. */ -class KWAYLANDSERVER_EXPORT IdleInhibitManagerV1Interface : public QObject +class KWIN_EXPORT IdleInhibitManagerV1Interface : public QObject { Q_OBJECT diff --git a/src/wayland/inputmethod_v1_interface.cpp b/src/wayland/inputmethod_v1_interface.cpp index 9792ccfb57..e3654e62d3 100644 --- a/src/wayland/inputmethod_v1_interface.cpp +++ b/src/wayland/inputmethod_v1_interface.cpp @@ -8,11 +8,11 @@ #include "display.h" #include "keyboard_interface.h" #include "keyboard_interface_p.h" -#include "logging.h" #include "output_interface.h" #include "seat_interface.h" #include "surface_interface.h" #include "surfacerole_p.h" +#include "utils/common.h" #include #include @@ -49,19 +49,19 @@ void InputMethodGrabV1::sendKeymap(const QByteArray &keymap) { QScopedPointer tmp(new QTemporaryFile()); if (!tmp->open()) { - qCWarning(KWAYLAND_SERVER) << "Failed to create keymap file:" << tmp->errorString(); + qCWarning(KWIN_CORE) << "Failed to create keymap file:" << tmp->errorString(); return; } unlink(tmp->fileName().toUtf8().constData()); if (!tmp->resize(keymap.size())) { - qCWarning(KWAYLAND_SERVER) << "Failed to resize keymap file:" << tmp->errorString(); + qCWarning(KWIN_CORE) << "Failed to resize keymap file:" << tmp->errorString(); return; } uchar *address = tmp->map(0, keymap.size()); if (!address) { - qCWarning(KWAYLAND_SERVER) << "Failed to map keymap file:" << tmp->errorString(); + qCWarning(KWIN_CORE) << "Failed to map keymap file:" << tmp->errorString(); return; } diff --git a/src/wayland/inputmethod_v1_interface.h b/src/wayland/inputmethod_v1_interface.h index fb58f1603c..2d8271a036 100644 --- a/src/wayland/inputmethod_v1_interface.h +++ b/src/wayland/inputmethod_v1_interface.h @@ -6,7 +6,7 @@ #pragma once -#include +#include "kwin_export.h" #include #include @@ -38,7 +38,7 @@ enum class KeyboardKeyState : quint32; * * When we activate, an @class InputMethodContextV1Interface becomes available */ -class KWAYLANDSERVER_EXPORT InputMethodV1Interface : public QObject +class KWIN_EXPORT InputMethodV1Interface : public QObject { Q_OBJECT public: @@ -65,7 +65,7 @@ private: /** * Implements zwp_input_method_context_v1, allows to describe the client's input state */ -class KWAYLANDSERVER_EXPORT InputMethodContextV1Interface : public QObject +class KWIN_EXPORT InputMethodContextV1Interface : public QObject { Q_OBJECT public: @@ -105,7 +105,7 @@ private: /** * Implements zwp_input_panel_v1, tells us about the InputPanelSurfaceV1Interface that we might get */ -class KWAYLANDSERVER_EXPORT InputPanelV1Interface : public QObject +class KWIN_EXPORT InputPanelV1Interface : public QObject { Q_OBJECT public: @@ -122,7 +122,7 @@ private: /** * Implements zwp_input_panel_surface_v1, it corresponds to each element shown so it can be placed. */ -class KWAYLANDSERVER_EXPORT InputPanelSurfaceV1Interface : public QObject +class KWIN_EXPORT InputPanelSurfaceV1Interface : public QObject { Q_OBJECT public: @@ -148,7 +148,7 @@ private: /** * Implements a wl_keyboard tailored for zwp_input_method_v1 use-cases */ -class KWAYLANDSERVER_EXPORT InputMethodGrabV1 : public QObject +class KWIN_EXPORT InputMethodGrabV1 : public QObject { Q_OBJECT public: diff --git a/src/wayland/keyboard_interface.cpp b/src/wayland/keyboard_interface.cpp index 4ccf7f4d38..1bf6a4303f 100644 --- a/src/wayland/keyboard_interface.cpp +++ b/src/wayland/keyboard_interface.cpp @@ -5,10 +5,10 @@ */ #include "display.h" #include "keyboard_interface_p.h" -#include "logging.h" #include "seat_interface.h" #include "seat_interface_p.h" #include "surface_interface.h" +#include "utils/common.h" // Qt #include #include @@ -76,19 +76,19 @@ void KeyboardInterfacePrivate::sendKeymap(Resource *resource) { QScopedPointer tmp(new QTemporaryFile()); if (!tmp->open()) { - qCWarning(KWAYLAND_SERVER) << "Failed to create keymap file:" << tmp->errorString(); + qCWarning(KWIN_CORE) << "Failed to create keymap file:" << tmp->errorString(); return; } unlink(tmp->fileName().toUtf8().constData()); if (!tmp->resize(keymap.size())) { - qCWarning(KWAYLAND_SERVER) << "Failed to resize keymap file:" << tmp->errorString(); + qCWarning(KWIN_CORE) << "Failed to resize keymap file:" << tmp->errorString(); return; } uchar *address = tmp->map(0, keymap.size()); if (!address) { - qCWarning(KWAYLAND_SERVER) << "Failed to map keymap file:" << tmp->errorString(); + qCWarning(KWIN_CORE) << "Failed to map keymap file:" << tmp->errorString(); return; } diff --git a/src/wayland/keyboard_interface.h b/src/wayland/keyboard_interface.h index 84a1bf3711..7a94260d89 100644 --- a/src/wayland/keyboard_interface.h +++ b/src/wayland/keyboard_interface.h @@ -5,9 +5,9 @@ */ #pragma once -#include +#include "kwin_export.h" -#include +#include namespace KWaylandServer { @@ -20,7 +20,7 @@ enum class KeyboardKeyState : quint32; /** * @brief Resource for the wl_keyboard interface. */ -class KWAYLANDSERVER_EXPORT KeyboardInterface : public QObject +class KWIN_EXPORT KeyboardInterface : public QObject { Q_OBJECT public: diff --git a/src/wayland/keyboard_shortcuts_inhibit_v1_interface.h b/src/wayland/keyboard_shortcuts_inhibit_v1_interface.h index c1b556ab7b..56f7b5e81b 100644 --- a/src/wayland/keyboard_shortcuts_inhibit_v1_interface.h +++ b/src/wayland/keyboard_shortcuts_inhibit_v1_interface.h @@ -8,7 +8,7 @@ #include "seat_interface.h" #include "surface_interface.h" -#include + #include namespace KWaylandServer @@ -24,7 +24,7 @@ class KeyboardShortcutsInhibitManagerV1Interface; class KeyboardShortcutsInhibitorV1InterfacePrivate; class KeyboardShortcutsInhibitManagerV1InterfacePrivate; -class KWAYLANDSERVER_EXPORT KeyboardShortcutsInhibitorV1Interface : public QObject +class KWIN_EXPORT KeyboardShortcutsInhibitorV1Interface : public QObject { Q_OBJECT @@ -50,7 +50,7 @@ private: * * KeyboardShortcutsInhibitManagerV1Interface correponds to the wayland interface zwp_keyboard_shortcuts_inhibit_manager_v1. */ -class KWAYLANDSERVER_EXPORT KeyboardShortcutsInhibitManagerV1Interface : public QObject +class KWIN_EXPORT KeyboardShortcutsInhibitManagerV1Interface : public QObject { Q_OBJECT diff --git a/src/wayland/keystate_interface.h b/src/wayland/keystate_interface.h index b7647896ef..eafcd8bf69 100644 --- a/src/wayland/keystate_interface.h +++ b/src/wayland/keystate_interface.h @@ -6,7 +6,8 @@ #pragma once -#include +#include "kwin_export.h" + #include namespace KWaylandServer @@ -17,7 +18,7 @@ class KeyStateInterfacePrivate; /** * @brief Exposes key states to wayland clients */ -class KWAYLANDSERVER_EXPORT KeyStateInterface : public QObject +class KWIN_EXPORT KeyStateInterface : public QObject { Q_OBJECT diff --git a/src/wayland/layershell_v1_interface.cpp b/src/wayland/layershell_v1_interface.cpp index 19fcd68e84..447c238d96 100644 --- a/src/wayland/layershell_v1_interface.cpp +++ b/src/wayland/layershell_v1_interface.cpp @@ -6,9 +6,9 @@ #include "layershell_v1_interface.h" #include "display.h" -#include "logging.h" #include "surface_interface.h" #include "surfacerole_p.h" +#include "utils/common.h" #include "xdgshell_interface_p.h" #include @@ -445,7 +445,7 @@ QString LayerSurfaceV1Interface::scope() const quint32 LayerSurfaceV1Interface::sendConfigure(const QSize &size) { if (d->isClosed) { - qCWarning(KWAYLAND_SERVER) << "Cannot configure a closed layer shell surface"; + qCWarning(KWIN_CORE) << "Cannot configure a closed layer shell surface"; return 0; } diff --git a/src/wayland/layershell_v1_interface.h b/src/wayland/layershell_v1_interface.h index 4d20336c90..3d524fe530 100644 --- a/src/wayland/layershell_v1_interface.h +++ b/src/wayland/layershell_v1_interface.h @@ -26,7 +26,7 @@ class SurfaceInterface; * * The LayerShellV1Interface corresponds to the Wayland interface @c zwlr_layer_shell_v1. */ -class KWAYLANDSERVER_EXPORT LayerShellV1Interface : public QObject +class KWIN_EXPORT LayerShellV1Interface : public QObject { Q_OBJECT @@ -54,7 +54,7 @@ private: * * The LayerSurfaceV1Interface corresponds to the Wayland interface @c zwlr_layer_surface_v1. */ -class KWAYLANDSERVER_EXPORT LayerSurfaceV1Interface : public QObject +class KWIN_EXPORT LayerSurfaceV1Interface : public QObject { Q_OBJECT diff --git a/src/wayland/linuxdmabufv1clientbuffer.cpp b/src/wayland/linuxdmabufv1clientbuffer.cpp index f04f9ba6b3..fd6ed56f79 100644 --- a/src/wayland/linuxdmabufv1clientbuffer.cpp +++ b/src/wayland/linuxdmabufv1clientbuffer.cpp @@ -12,8 +12,8 @@ #include "linuxdmabufv1clientbuffer.h" #include "linuxdmabufv1clientbuffer_p.h" -#include "logging.h" #include "surface_interface_p.h" +#include "utils/common.h" #include #include @@ -59,7 +59,7 @@ void LinuxDmaBufV1ClientBufferIntegrationPrivate::zwp_linux_dmabuf_v1_get_surfac { auto surface = SurfaceInterface::get(surfaceResource); if (!surface) { - qCWarning(KWAYLAND_SERVER) << "requested surface feedback for nonexistant surface!"; + qCWarning(KWIN_CORE) << "requested surface feedback for nonexistant surface!"; return; } auto surfacePrivate = SurfaceInterfacePrivate::get(surface); @@ -528,22 +528,22 @@ LinuxDmaBufV1FormatTable::LinuxDmaBufV1FormatTable(const QHash tmp(new QTemporaryFile()); if (!tmp->open()) { - qCWarning(KWAYLAND_SERVER) << "Failed to create keymap file:" << tmp->errorString(); + qCWarning(KWIN_CORE) << "Failed to create keymap file:" << tmp->errorString(); return; } fd = open(tmp->fileName().toUtf8().constData(), O_RDONLY | O_CLOEXEC); if (fd < 0) { - qCWarning(KWAYLAND_SERVER) << "Could not create readonly shm fd!" << strerror(errno); + qCWarning(KWIN_CORE) << "Could not create readonly shm fd!" << strerror(errno); return; } unlink(tmp->fileName().toUtf8().constData()); if (!tmp->resize(size)) { - qCWarning(KWAYLAND_SERVER) << "Failed to resize keymap file:" << tmp->errorString(); + qCWarning(KWIN_CORE) << "Failed to resize keymap file:" << tmp->errorString(); return; } uchar *address = tmp->map(0, size); if (!address) { - qCWarning(KWAYLAND_SERVER) << "Failed to map keymap file:" << tmp->errorString(); + qCWarning(KWIN_CORE) << "Failed to map keymap file:" << tmp->errorString(); return; } memcpy(address, data.data(), size); diff --git a/src/wayland/linuxdmabufv1clientbuffer.h b/src/wayland/linuxdmabufv1clientbuffer.h index 0c40e53ea2..4947d7451e 100644 --- a/src/wayland/linuxdmabufv1clientbuffer.h +++ b/src/wayland/linuxdmabufv1clientbuffer.h @@ -38,7 +38,7 @@ struct LinuxDmaBufV1Plane * The LinuxDmaBufV1ClientBuffer can be used even after the underlying wl_buffer object * is destroyed by the client. */ -class KWAYLANDSERVER_EXPORT LinuxDmaBufV1ClientBuffer : public ClientBuffer +class KWIN_EXPORT LinuxDmaBufV1ClientBuffer : public ClientBuffer { Q_OBJECT Q_DECLARE_PRIVATE(LinuxDmaBufV1ClientBuffer) @@ -60,7 +60,7 @@ private: friend class LinuxDmaBufParamsV1; }; -class KWAYLANDSERVER_EXPORT LinuxDmaBufV1Feedback : public QObject +class KWIN_EXPORT LinuxDmaBufV1Feedback : public QObject { Q_OBJECT public: @@ -94,7 +94,7 @@ private: /** * The LinuxDmaBufV1ClientBufferIntegration class provides support for linux dma-buf buffers. */ -class KWAYLANDSERVER_EXPORT LinuxDmaBufV1ClientBufferIntegration : public ClientBufferIntegration +class KWIN_EXPORT LinuxDmaBufV1ClientBufferIntegration : public ClientBufferIntegration { Q_OBJECT diff --git a/src/wayland/output_interface.h b/src/wayland/output_interface.h index 6afb62d294..8ba2cbadeb 100644 --- a/src/wayland/output_interface.h +++ b/src/wayland/output_interface.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include "kwin_export.h" #include #include @@ -25,7 +25,7 @@ class OutputInterfacePrivate; * The OutputInterface class represents a screen. This class corresponds to the Wayland * interface @c wl_output. */ -class KWAYLANDSERVER_EXPORT OutputInterface : public QObject +class KWIN_EXPORT OutputInterface : public QObject { Q_OBJECT Q_PROPERTY(QSize physicalSize READ physicalSize WRITE setPhysicalSize NOTIFY physicalSizeChanged) diff --git a/src/wayland/outputchangeset_v2.h b/src/wayland/outputchangeset_v2.h index 31b1953f84..7b6b0f2df5 100644 --- a/src/wayland/outputchangeset_v2.h +++ b/src/wayland/outputchangeset_v2.h @@ -10,7 +10,6 @@ #include #include "outputdevice_v2_interface.h" -#include namespace KWaylandServer { @@ -26,7 +25,7 @@ class OutputChangeSetV2Private; * * @see OutputConfiguration */ -class KWAYLANDSERVER_EXPORT OutputChangeSetV2 : public QObject +class KWIN_EXPORT OutputChangeSetV2 : public QObject { Q_OBJECT public: diff --git a/src/wayland/outputconfiguration_v2_interface.cpp b/src/wayland/outputconfiguration_v2_interface.cpp index 0d08d685ab..6e3ef2e8d6 100644 --- a/src/wayland/outputconfiguration_v2_interface.cpp +++ b/src/wayland/outputconfiguration_v2_interface.cpp @@ -7,9 +7,9 @@ */ #include "outputconfiguration_v2_interface.h" #include "display.h" -#include "logging.h" #include "outputchangeset_v2_p.h" #include "outputdevice_v2_interface.h" +#include "utils/common.h" #include "qwayland-server-kde-output-device-v2.h" #include "qwayland-server-kde-output-management-v2.h" @@ -114,7 +114,7 @@ void OutputConfigurationV2InterfacePrivate::kde_output_configuration_v2_scale(Re const qreal doubleScale = wl_fixed_to_double(scale); if (doubleScale <= 0) { - qCWarning(KWAYLAND_SERVER) << "Requested to scale output device to" << doubleScale << ", but I can't do that."; + qCWarning(KWIN_CORE) << "Requested to scale output device to" << doubleScale << ", but I can't do that."; return; } OutputDeviceV2Interface *output = OutputDeviceV2Interface::get(outputdevice); @@ -132,7 +132,7 @@ void OutputConfigurationV2InterfacePrivate::kde_output_configuration_v2_overscan { Q_UNUSED(resource) if (overscan > 100) { - qCWarning(KWAYLAND_SERVER) << "Invalid overscan requested:" << overscan; + qCWarning(KWIN_CORE) << "Invalid overscan requested:" << overscan; return; } OutputDeviceV2Interface *output = OutputDeviceV2Interface::get(outputdevice); @@ -143,7 +143,7 @@ void OutputConfigurationV2InterfacePrivate::kde_output_configuration_v2_set_vrr_ { Q_UNUSED(resource) if (policy > static_cast(OutputDeviceV2Interface::VrrPolicy::Automatic)) { - qCWarning(KWAYLAND_SERVER) << "Invalid Vrr Policy requested:" << policy; + qCWarning(KWIN_CORE) << "Invalid Vrr Policy requested:" << policy; return; } OutputDeviceV2Interface *output = OutputDeviceV2Interface::get(outputdevice); @@ -154,7 +154,7 @@ void OutputConfigurationV2InterfacePrivate::kde_output_configuration_v2_set_rgb_ { Q_UNUSED(resource) if (rgbRange > static_cast(OutputDeviceV2Interface::RgbRange::Limited)) { - qCWarning(KWAYLAND_SERVER) << "Invalid Rgb Range requested:" << rgbRange; + qCWarning(KWIN_CORE) << "Invalid Rgb Range requested:" << rgbRange; return; } OutputDeviceV2Interface *output = OutputDeviceV2Interface::get(outputdevice); diff --git a/src/wayland/outputconfiguration_v2_interface.h b/src/wayland/outputconfiguration_v2_interface.h index 5749edb1c5..d12d3d2001 100644 --- a/src/wayland/outputconfiguration_v2_interface.h +++ b/src/wayland/outputconfiguration_v2_interface.h @@ -6,12 +6,12 @@ */ #pragma once +#include "kwin_export.h" + #include "outputchangeset_v2.h" #include "outputdevice_v2_interface.h" #include "outputmanagement_v2_interface.h" -#include - namespace KWaylandServer { @@ -41,7 +41,7 @@ class OutputConfigurationV2InterfacePrivate; * @see OutputManagementInterface * @see OutputConfiguration */ -class KWAYLANDSERVER_EXPORT OutputConfigurationV2Interface : public QObject +class KWIN_EXPORT OutputConfigurationV2Interface : public QObject { Q_OBJECT public: diff --git a/src/wayland/outputdevice_v2_interface.cpp b/src/wayland/outputdevice_v2_interface.cpp index 400cd64cbf..75d7663f1c 100644 --- a/src/wayland/outputdevice_v2_interface.cpp +++ b/src/wayland/outputdevice_v2_interface.cpp @@ -8,8 +8,8 @@ #include "display.h" #include "display_p.h" -#include "logging.h" #include "utils.h" +#include "utils/common.h" #include #include @@ -485,7 +485,7 @@ OutputDeviceV2Interface::Transform OutputDeviceV2Interface::transform() const void OutputDeviceV2Interface::setModes(const QList &modes) { if (modes.isEmpty()) { - qCWarning(KWAYLAND_SERVER) << "Tried to set no modes for output"; + qCWarning(KWIN_CORE) << "Tried to set no modes for output"; return; } diff --git a/src/wayland/outputdevice_v2_interface.h b/src/wayland/outputdevice_v2_interface.h index 26c609cdb3..b95170b609 100644 --- a/src/wayland/outputdevice_v2_interface.h +++ b/src/wayland/outputdevice_v2_interface.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include "kwin_export.h" #include #include @@ -31,7 +31,7 @@ class OutputDeviceModeV2InterfacePrivate; * * @see OutputManagementV2Interface */ -class KWAYLANDSERVER_EXPORT OutputDeviceV2Interface : public QObject +class KWIN_EXPORT OutputDeviceV2Interface : public QObject { Q_OBJECT public: @@ -147,7 +147,7 @@ private: * * @see OutputDeviceV2Interface */ -class KWAYLANDSERVER_EXPORT OutputDeviceModeV2Interface : public QObject +class KWIN_EXPORT OutputDeviceModeV2Interface : public QObject { Q_OBJECT public: diff --git a/src/wayland/outputmanagement_v2_interface.h b/src/wayland/outputmanagement_v2_interface.h index 172623dc0d..fd51d5e97a 100644 --- a/src/wayland/outputmanagement_v2_interface.h +++ b/src/wayland/outputmanagement_v2_interface.h @@ -5,9 +5,9 @@ */ #pragma once -#include +#include "kwin_export.h" -#include +#include namespace KWaylandServer { @@ -29,7 +29,7 @@ class OutputConfigurationV2Interface; * @see OutputConfiguration * @see OutputConfigurationInterface */ -class KWAYLANDSERVER_EXPORT OutputManagementV2Interface : public QObject +class KWIN_EXPORT OutputManagementV2Interface : public QObject { Q_OBJECT diff --git a/src/wayland/plasmashell_interface.h b/src/wayland/plasmashell_interface.h index 4bafcb0a75..8583f1c490 100644 --- a/src/wayland/plasmashell_interface.h +++ b/src/wayland/plasmashell_interface.h @@ -6,9 +6,9 @@ */ #pragma once -#include +#include "kwin_export.h" -#include +#include class QSize; struct wl_resource; @@ -32,7 +32,7 @@ class PlasmaShellSurfaceInterfacePrivate; * A server providing this interface should think about how to restrict access to it as * it allows to perform absolute window positioning. */ -class KWAYLANDSERVER_EXPORT PlasmaShellInterface : public QObject +class KWIN_EXPORT PlasmaShellInterface : public QObject { Q_OBJECT @@ -55,7 +55,7 @@ private: * * PlasmaShellSurfaceInterface gets created by PlasmaShellInterface. */ -class KWAYLANDSERVER_EXPORT PlasmaShellSurfaceInterface : public QObject +class KWIN_EXPORT PlasmaShellSurfaceInterface : public QObject { Q_OBJECT public: diff --git a/src/wayland/plasmavirtualdesktop_interface.h b/src/wayland/plasmavirtualdesktop_interface.h index 4541e03925..eaa8993e3d 100644 --- a/src/wayland/plasmavirtualdesktop_interface.h +++ b/src/wayland/plasmavirtualdesktop_interface.h @@ -5,9 +5,9 @@ */ #pragma once -#include +#include "kwin_export.h" -#include +#include namespace KWaylandServer { @@ -21,7 +21,7 @@ class PlasmaVirtualDesktopManagementInterfacePrivate; * * This class provides a convenient wrapper for the org_kde_plasma_virtual_desktop_management interface. */ -class KWAYLANDSERVER_EXPORT PlasmaVirtualDesktopManagementInterface : public QObject +class KWIN_EXPORT PlasmaVirtualDesktopManagementInterface : public QObject { Q_OBJECT @@ -91,7 +91,7 @@ private: QScopedPointer d; }; -class KWAYLANDSERVER_EXPORT PlasmaVirtualDesktopInterface : public QObject +class KWIN_EXPORT PlasmaVirtualDesktopInterface : public QObject { Q_OBJECT public: diff --git a/src/wayland/plasmawindowmanagement_interface.cpp b/src/wayland/plasmawindowmanagement_interface.cpp index d97370f156..b2c83dc189 100644 --- a/src/wayland/plasmawindowmanagement_interface.cpp +++ b/src/wayland/plasmawindowmanagement_interface.cpp @@ -5,9 +5,9 @@ */ #include "plasmawindowmanagement_interface.h" #include "display.h" -#include "logging.h" #include "plasmavirtualdesktop_interface.h" #include "surface_interface.h" +#include "utils/common.h" #include #include @@ -235,7 +235,7 @@ void PlasmaWindowManagementInterfacePrivate::org_kde_plasma_window_management_ge return window->d->uuid == internal_window_uuid; }); if (it == windows.constEnd()) { - qCWarning(KWAYLAND_SERVER) << "Could not find window with uuid" << internal_window_uuid; + qCWarning(KWIN_CORE) << "Could not find window with uuid" << internal_window_uuid; // create a temp window just for the resource, bind then immediately delete it, sending an unmap event PlasmaWindowInterface window(q, q); window.d->add(resource->client(), id, resource->version()); diff --git a/src/wayland/plasmawindowmanagement_interface.h b/src/wayland/plasmawindowmanagement_interface.h index 722eeebaa2..7dd95761e4 100644 --- a/src/wayland/plasmawindowmanagement_interface.h +++ b/src/wayland/plasmawindowmanagement_interface.h @@ -5,9 +5,9 @@ */ #pragma once -#include +#include "kwin_export.h" -#include +#include class QSize; @@ -23,7 +23,7 @@ class PlasmaWindowManagementInterfacePrivate; class PlasmaWindowInterfacePrivate; class SurfaceInterface; -class KWAYLANDSERVER_EXPORT PlasmaWindowActivationInterface +class KWIN_EXPORT PlasmaWindowActivationInterface { public: ~PlasmaWindowActivationInterface(); @@ -37,7 +37,7 @@ private: QScopedPointer d; }; -class KWAYLANDSERVER_EXPORT PlasmaWindowActivationFeedbackInterface : public QObject +class KWIN_EXPORT PlasmaWindowActivationFeedbackInterface : public QObject { Q_OBJECT @@ -57,7 +57,7 @@ private: QScopedPointer d; }; -class KWAYLANDSERVER_EXPORT PlasmaWindowManagementInterface : public QObject +class KWIN_EXPORT PlasmaWindowManagementInterface : public QObject { Q_OBJECT @@ -102,7 +102,7 @@ private: /** * @todo Add documentation */ -class KWAYLANDSERVER_EXPORT PlasmaWindowInterface : public QObject +class KWIN_EXPORT PlasmaWindowInterface : public QObject { Q_OBJECT public: diff --git a/src/wayland/pointer_interface.cpp b/src/wayland/pointer_interface.cpp index 71d7831374..6f00b1bbbf 100644 --- a/src/wayland/pointer_interface.cpp +++ b/src/wayland/pointer_interface.cpp @@ -9,7 +9,6 @@ #include "pointer_interface.h" #include "clientconnection.h" #include "display.h" -#include "logging.h" #include "pointer_interface_p.h" #include "pointergestures_v1_interface_p.h" #include "relativepointer_v1_interface_p.h" @@ -17,6 +16,7 @@ #include "surface_interface.h" #include "surfacerole_p.h" #include "utils.h" +#include "utils/common.h" namespace KWaylandServer { @@ -66,7 +66,7 @@ void PointerInterfacePrivate::pointer_set_cursor(Resource *resource, uint32_t se return; } if (focusedSurface->client()->client() != resource->client()) { - qCDebug(KWAYLAND_SERVER, "Denied set_cursor request from unfocused client"); + qCDebug(KWIN_CORE, "Denied set_cursor request from unfocused client"); return; } diff --git a/src/wayland/pointer_interface.h b/src/wayland/pointer_interface.h index 3397c78cf6..5496b00bcf 100644 --- a/src/wayland/pointer_interface.h +++ b/src/wayland/pointer_interface.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include "kwin_export.h" #include @@ -28,7 +28,7 @@ enum class PointerButtonState : quint32; * The PointerInterface class represents one or more input devices such as mice, which control * the pointer location. It corresponds to the Wayland interface @c wl_pointer. */ -class KWAYLANDSERVER_EXPORT PointerInterface : public QObject +class KWIN_EXPORT PointerInterface : public QObject { Q_OBJECT @@ -83,7 +83,7 @@ private: /** * @brief Class encapsulating a Cursor image. */ -class KWAYLANDSERVER_EXPORT Cursor : public QObject +class KWIN_EXPORT Cursor : public QObject { Q_OBJECT diff --git a/src/wayland/pointerconstraints_v1_interface.h b/src/wayland/pointerconstraints_v1_interface.h index 9c34b36361..0ca4b55158 100644 --- a/src/wayland/pointerconstraints_v1_interface.h +++ b/src/wayland/pointerconstraints_v1_interface.h @@ -7,7 +7,7 @@ #pragma once -#include +#include "kwin_export.h" #include #include @@ -30,7 +30,7 @@ class SurfaceInterface; * @see ConfinedPointerV1Interface * @see LockedPointerV1Interface */ -class KWAYLANDSERVER_EXPORT PointerConstraintsV1Interface : public QObject +class KWIN_EXPORT PointerConstraintsV1Interface : public QObject { Q_OBJECT @@ -56,7 +56,7 @@ private: * While the lock is active the PointerInterface does no longer Q_EMIT pointer motion * events, but still emits relative pointer motion events. */ -class KWAYLANDSERVER_EXPORT LockedPointerV1Interface : public QObject +class KWIN_EXPORT LockedPointerV1Interface : public QObject { Q_OBJECT @@ -172,7 +172,7 @@ private: * From compositor side the confinement can be deactivated by setting * {@link ConfinedPointerV1Interface::setConfined} to @c false. */ -class KWAYLANDSERVER_EXPORT ConfinedPointerV1Interface : public QObject +class KWIN_EXPORT ConfinedPointerV1Interface : public QObject { Q_OBJECT diff --git a/src/wayland/pointergestures_v1_interface.h b/src/wayland/pointergestures_v1_interface.h index b9c67b0d78..b85bdc398f 100644 --- a/src/wayland/pointergestures_v1_interface.h +++ b/src/wayland/pointergestures_v1_interface.h @@ -7,7 +7,7 @@ #pragma once -#include +#include "kwin_export.h" #include @@ -22,7 +22,7 @@ class PointerGesturesV1InterfacePrivate; * Creates and manages pointer swipe and pointer pinch gestures which are * reported to the SeatInterface. */ -class KWAYLANDSERVER_EXPORT PointerGesturesV1Interface : public QObject +class KWIN_EXPORT PointerGesturesV1Interface : public QObject { Q_OBJECT diff --git a/src/wayland/primaryoutput_v1_interface.h b/src/wayland/primaryoutput_v1_interface.h index a0d3e66c1a..69171f7c93 100644 --- a/src/wayland/primaryoutput_v1_interface.h +++ b/src/wayland/primaryoutput_v1_interface.h @@ -5,9 +5,9 @@ */ #pragma once -#include +#include "kwin_export.h" -#include +#include namespace KWaylandServer { @@ -15,7 +15,7 @@ class Display; class OutputDeviceV2Interface; class PrimaryOutputV1InterfacePrivate; -class KWAYLANDSERVER_EXPORT PrimaryOutputV1Interface : public QObject +class KWIN_EXPORT PrimaryOutputV1Interface : public QObject { Q_OBJECT diff --git a/src/wayland/primaryselectiondevice_v1_interface.h b/src/wayland/primaryselectiondevice_v1_interface.h index 7881679546..36ac9d02ac 100644 --- a/src/wayland/primaryselectiondevice_v1_interface.h +++ b/src/wayland/primaryselectiondevice_v1_interface.h @@ -5,9 +5,9 @@ */ #pragma once -#include +#include "kwin_export.h" -#include +#include struct wl_resource; struct wl_client; @@ -29,7 +29,7 @@ class PrimarySelectionDeviceV1InterfacePrivate; * @see PrimarySelectionSourceInterface * Lifespan is mapped to the underlying object */ -class KWAYLANDSERVER_EXPORT PrimarySelectionDeviceV1Interface : public QObject +class KWIN_EXPORT PrimarySelectionDeviceV1Interface : public QObject { Q_OBJECT public: diff --git a/src/wayland/primaryselectiondevicemanager_v1_interface.h b/src/wayland/primaryselectiondevicemanager_v1_interface.h index 42cfc11b9d..2001af6017 100644 --- a/src/wayland/primaryselectiondevicemanager_v1_interface.h +++ b/src/wayland/primaryselectiondevicemanager_v1_interface.h @@ -5,9 +5,9 @@ */ #pragma once -#include +#include "kwin_export.h" -#include +#include namespace KWaylandServer { @@ -20,7 +20,7 @@ class PrimarySelectionDeviceV1Interface; * @brief Represents the Global for zwp_primary_selection_manager_v1 interface. * */ -class KWAYLANDSERVER_EXPORT PrimarySelectionDeviceManagerV1Interface : public QObject +class KWIN_EXPORT PrimarySelectionDeviceManagerV1Interface : public QObject { Q_OBJECT diff --git a/src/wayland/primaryselectionoffer_v1_interface.h b/src/wayland/primaryselectionoffer_v1_interface.h index eca67ff871..cda0aced3a 100644 --- a/src/wayland/primaryselectionoffer_v1_interface.h +++ b/src/wayland/primaryselectionoffer_v1_interface.h @@ -5,9 +5,9 @@ */ #pragma once -#include +#include "kwin_export.h" -#include +#include #include "primaryselectiondevicemanager_v1_interface.h" @@ -23,7 +23,7 @@ class PrimarySelectionOfferV1InterfacePrivate; * @brief Represents the Resource for the wl_data_offer interface. * Lifespan is mapped to the underlying object */ -class KWAYLANDSERVER_EXPORT PrimarySelectionOfferV1Interface : public QObject +class KWIN_EXPORT PrimarySelectionOfferV1Interface : public QObject { Q_OBJECT public: diff --git a/src/wayland/primaryselectionsource_v1_interface.h b/src/wayland/primaryselectionsource_v1_interface.h index 4ebee2bd9f..a0af712c64 100644 --- a/src/wayland/primaryselectionsource_v1_interface.h +++ b/src/wayland/primaryselectionsource_v1_interface.h @@ -5,10 +5,9 @@ */ #pragma once -#include "abstract_data_source.h" - -#include +#include "kwin_export.h" +#include "abstract_data_source.h" #include "primaryselectiondevicemanager_v1_interface.h" namespace KWaylandServer @@ -19,7 +18,7 @@ class PrimarySelectionSourceV1InterfacePrivate; * @brief Represents the Resource for the zwp_primary_selection_source_v1 interface. * Lifespan is mapped to the underlying object */ -class KWAYLANDSERVER_EXPORT PrimarySelectionSourceV1Interface : public AbstractDataSource +class KWIN_EXPORT PrimarySelectionSourceV1Interface : public AbstractDataSource { Q_OBJECT public: diff --git a/src/wayland/relativepointer_v1_interface.h b/src/wayland/relativepointer_v1_interface.h index ab380e0f7c..1222b2363b 100644 --- a/src/wayland/relativepointer_v1_interface.h +++ b/src/wayland/relativepointer_v1_interface.h @@ -7,7 +7,7 @@ #pragma once -#include +#include "kwin_export.h" #include @@ -23,7 +23,7 @@ class RelativePointerManagerV1InterfacePrivate; * which automatically delegates relative motion events to the created relative pointer * interfaces. */ -class KWAYLANDSERVER_EXPORT RelativePointerManagerV1Interface : public QObject +class KWIN_EXPORT RelativePointerManagerV1Interface : public QObject { Q_OBJECT diff --git a/src/wayland/screencast_v1_interface.h b/src/wayland/screencast_v1_interface.h index 120c2668c0..d992802573 100644 --- a/src/wayland/screencast_v1_interface.h +++ b/src/wayland/screencast_v1_interface.h @@ -6,7 +6,8 @@ #pragma once -#include +#include "kwin_export.h" + #include #include @@ -20,7 +21,7 @@ class ScreencastV1InterfacePrivate; class ScreencastStreamV1InterfacePrivate; class ScreencastStreamV1Interface; -class KWAYLANDSERVER_EXPORT ScreencastStreamV1Interface : public QObject +class KWIN_EXPORT ScreencastStreamV1Interface : public QObject { Q_OBJECT public: @@ -39,7 +40,7 @@ private: QScopedPointer d; }; -class KWAYLANDSERVER_EXPORT ScreencastV1Interface : public QObject +class KWIN_EXPORT ScreencastV1Interface : public QObject { Q_OBJECT diff --git a/src/wayland/seat_interface.cpp b/src/wayland/seat_interface.cpp index fe7b0a9fd8..79395ec1df 100644 --- a/src/wayland/seat_interface.cpp +++ b/src/wayland/seat_interface.cpp @@ -16,7 +16,6 @@ #include "display_p.h" #include "keyboard_interface.h" #include "keyboard_interface_p.h" -#include "logging.h" #include "pointer_interface.h" #include "pointer_interface_p.h" #include "pointerconstraints_v1_interface.h" @@ -30,6 +29,7 @@ #include "textinput_v3_interface_p.h" #include "touch_interface_p.h" #include "utils.h" +#include "utils/common.h" #include @@ -1097,7 +1097,7 @@ void SeatInterface::notifyTouchMotion(qint32 id, const QPointF &globalPosition) auto itTouch = d->globalTouch.ids.constFind(id); if (itTouch == d->globalTouch.ids.constEnd()) { // This can happen in cases where the interaction started while the device was asleep - qCWarning(KWAYLAND_SERVER) << "Detected a touch move that never has been down, discarding"; + qCWarning(KWIN_CORE) << "Detected a touch move that never has been down, discarding"; return; } @@ -1132,7 +1132,7 @@ void SeatInterface::notifyTouchUp(qint32 id) auto itTouch = d->globalTouch.ids.find(id); if (itTouch == d->globalTouch.ids.end()) { // This can happen in cases where the interaction started while the device was asleep - qCWarning(KWAYLAND_SERVER) << "Detected a touch that never started, discarding"; + qCWarning(KWIN_CORE) << "Detected a touch that never started, discarding"; return; } const qint32 serial = d->display->nextSerial(); diff --git a/src/wayland/seat_interface.h b/src/wayland/seat_interface.h index 7ffd8fc858..24251e0e56 100644 --- a/src/wayland/seat_interface.h +++ b/src/wayland/seat_interface.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include "kwin_export.h" #include #include @@ -120,7 +120,7 @@ enum class KeyboardKeyState : quint32 { * @see TouchInterface * @see SurfaceInterface */ -class KWAYLANDSERVER_EXPORT SeatInterface : public QObject +class KWIN_EXPORT SeatInterface : public QObject { Q_OBJECT /** diff --git a/src/wayland/seat_interface_p.h b/src/wayland/seat_interface_p.h index 2d5bb4d14e..665e65df1a 100644 --- a/src/wayland/seat_interface_p.h +++ b/src/wayland/seat_interface_p.h @@ -33,7 +33,7 @@ class SeatInterfacePrivate : public QtWaylandServer::wl_seat { public: // exported for unit tests - KWAYLANDSERVER_EXPORT static SeatInterfacePrivate *get(SeatInterface *seat); + KWIN_EXPORT static SeatInterfacePrivate *get(SeatInterface *seat); SeatInterfacePrivate(SeatInterface *q, Display *display); void sendCapabilities(); diff --git a/src/wayland/server_decoration_interface.cpp b/src/wayland/server_decoration_interface.cpp index 24c0ec60c5..edce6a05ff 100644 --- a/src/wayland/server_decoration_interface.cpp +++ b/src/wayland/server_decoration_interface.cpp @@ -5,8 +5,8 @@ */ #include "server_decoration_interface.h" #include "display.h" -#include "logging.h" #include "surface_interface.h" +#include "utils/common.h" #include @@ -149,7 +149,7 @@ void ServerSideDecorationInterfacePrivate::org_kde_kwin_server_decoration_reques break; default: // invalid mode - qCWarning(KWAYLAND_SERVER) << "Invalid mode:" << mode; + qCWarning(KWIN_CORE) << "Invalid mode:" << mode; return; } preferredMode = m; diff --git a/src/wayland/server_decoration_interface.h b/src/wayland/server_decoration_interface.h index f7dc24c0af..b844c44c98 100644 --- a/src/wayland/server_decoration_interface.h +++ b/src/wayland/server_decoration_interface.h @@ -5,9 +5,9 @@ */ #pragma once -#include +#include "kwin_export.h" -#include +#include struct wl_resource; @@ -22,7 +22,7 @@ class ServerSideDecorationInterfacePrivate; /** * @brief Manager to create ServerSideDecorationInterface. */ -class KWAYLANDSERVER_EXPORT ServerSideDecorationManagerInterface : public QObject +class KWIN_EXPORT ServerSideDecorationManagerInterface : public QObject { Q_OBJECT @@ -75,7 +75,7 @@ private: * * Created by ServerSideDecorationManagerInterface and emitted with decorationCreated signal. */ -class KWAYLANDSERVER_EXPORT ServerSideDecorationInterface : public QObject +class KWIN_EXPORT ServerSideDecorationInterface : public QObject { Q_OBJECT public: diff --git a/src/wayland/server_decoration_palette_interface.cpp b/src/wayland/server_decoration_palette_interface.cpp index c029964311..2b53637dc1 100644 --- a/src/wayland/server_decoration_palette_interface.cpp +++ b/src/wayland/server_decoration_palette_interface.cpp @@ -5,8 +5,8 @@ */ #include "server_decoration_palette_interface.h" #include "display.h" -#include "logging.h" #include "surface_interface.h" +#include "utils/common.h" #include @@ -35,7 +35,7 @@ void ServerSideDecorationPaletteManagerInterfacePrivate::org_kde_kwin_server_dec SurfaceInterface *s = SurfaceInterface::get(surface); if (!s) { wl_resource_post_error(resource->handle, 0, "invalid surface"); - qCWarning(KWAYLAND_SERVER) << "ServerSideDecorationPaletteInterface requested for non existing SurfaceInterface"; + qCWarning(KWIN_CORE) << "ServerSideDecorationPaletteInterface requested for non existing SurfaceInterface"; return; } diff --git a/src/wayland/server_decoration_palette_interface.h b/src/wayland/server_decoration_palette_interface.h index bcd303c788..941673ba93 100644 --- a/src/wayland/server_decoration_palette_interface.h +++ b/src/wayland/server_decoration_palette_interface.h @@ -5,11 +5,12 @@ */ #pragma once -struct wl_resource; +#include "kwin_export.h" -#include #include +struct wl_resource; + namespace KWaylandServer { class Display; @@ -24,7 +25,7 @@ class ServerSideDecorationPaletteInterfacePrivate; * This global can be used for clients to bind ServerSideDecorationPaletteInterface instances * and notifies when a new one is created */ -class KWAYLANDSERVER_EXPORT ServerSideDecorationPaletteManagerInterface : public QObject +class KWIN_EXPORT ServerSideDecorationPaletteManagerInterface : public QObject { Q_OBJECT @@ -51,7 +52,7 @@ private: * Provides the palette * This interface is attached to a wl_surface and informs the server of a requested palette */ -class KWAYLANDSERVER_EXPORT ServerSideDecorationPaletteInterface : public QObject +class KWIN_EXPORT ServerSideDecorationPaletteInterface : public QObject { Q_OBJECT public: diff --git a/src/wayland/shadow_interface.h b/src/wayland/shadow_interface.h index 1fd9f2893c..dfc81a13d5 100644 --- a/src/wayland/shadow_interface.h +++ b/src/wayland/shadow_interface.h @@ -5,11 +5,11 @@ */ #pragma once +#include "kwin_export.h" + #include #include -#include - struct wl_resource; namespace KWaylandServer @@ -19,7 +19,7 @@ class Display; class ShadowManagerInterfacePrivate; class ShadowInterfacePrivate; -class KWAYLANDSERVER_EXPORT ShadowManagerInterface : public QObject +class KWIN_EXPORT ShadowManagerInterface : public QObject { Q_OBJECT @@ -33,7 +33,7 @@ private: QScopedPointer d; }; -class KWAYLANDSERVER_EXPORT ShadowInterface : public QObject +class KWIN_EXPORT ShadowInterface : public QObject { Q_OBJECT public: diff --git a/src/wayland/shmclientbuffer.h b/src/wayland/shmclientbuffer.h index f0e58c4b2b..fc63e39a00 100644 --- a/src/wayland/shmclientbuffer.h +++ b/src/wayland/shmclientbuffer.h @@ -19,7 +19,7 @@ class ShmClientBufferPrivate; * The buffer's data can be accessed using the data() function. Note that it is not allowed * to access data of several shared memory buffers simultaneously. */ -class KWAYLANDSERVER_EXPORT ShmClientBuffer : public ClientBuffer +class KWIN_EXPORT ShmClientBuffer : public ClientBuffer { Q_OBJECT Q_DECLARE_PRIVATE(ShmClientBuffer) diff --git a/src/wayland/slide_interface.h b/src/wayland/slide_interface.h index e8eda061ed..b757626c60 100644 --- a/src/wayland/slide_interface.h +++ b/src/wayland/slide_interface.h @@ -5,9 +5,9 @@ */ #pragma once -#include +#include "kwin_export.h" -#include +#include struct wl_resource; @@ -17,7 +17,7 @@ class Display; class SlideManagerInterfacePrivate; class SlideInterfacePrivate; -class KWAYLANDSERVER_EXPORT SlideManagerInterface : public QObject +class KWIN_EXPORT SlideManagerInterface : public QObject { Q_OBJECT @@ -31,7 +31,7 @@ private: QScopedPointer d; }; -class KWAYLANDSERVER_EXPORT SlideInterface : public QObject +class KWIN_EXPORT SlideInterface : public QObject { Q_OBJECT public: diff --git a/src/wayland/subcompositor_interface.h b/src/wayland/subcompositor_interface.h index 99e4bea7a4..08eebb5fe2 100644 --- a/src/wayland/subcompositor_interface.h +++ b/src/wayland/subcompositor_interface.h @@ -7,9 +7,9 @@ #pragma once -#include +#include "kwin_export.h" -#include +#include struct wl_resource; @@ -28,7 +28,7 @@ class SubSurfaceInterfacePrivate; * * The SubCompositorInterface corresponds to the Wayland interface @c wl_subcompositor. */ -class KWAYLANDSERVER_EXPORT SubCompositorInterface : public QObject +class KWIN_EXPORT SubCompositorInterface : public QObject { Q_OBJECT @@ -49,7 +49,7 @@ private: /** * The SubSurfaceInterface corresponds to the Wayland interface @c wl_subsurface. */ -class KWAYLANDSERVER_EXPORT SubSurfaceInterface : public QObject +class KWIN_EXPORT SubSurfaceInterface : public QObject { Q_OBJECT diff --git a/src/wayland/surface_interface.h b/src/wayland/surface_interface.h index a0151d194f..5950a8ef6a 100644 --- a/src/wayland/surface_interface.h +++ b/src/wayland/surface_interface.h @@ -13,8 +13,6 @@ #include #include -#include - namespace KWaylandServer { class BlurInterface; @@ -55,7 +53,7 @@ class LinuxDmaBufV1Feedback; * @see SlideInterface * @see LinuxDmaBufV1Feedback */ -class KWAYLANDSERVER_EXPORT SurfaceInterface : public QObject +class KWIN_EXPORT SurfaceInterface : public QObject { Q_OBJECT /** diff --git a/src/wayland/tablet_v2_interface.h b/src/wayland/tablet_v2_interface.h index fe091e292f..24156be20a 100644 --- a/src/wayland/tablet_v2_interface.h +++ b/src/wayland/tablet_v2_interface.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include "kwin_export.h" #include #include @@ -40,7 +40,7 @@ class TabletPadGroupV2InterfacePrivate; * the class that will have all of the information we need. */ -class KWAYLANDSERVER_EXPORT TabletManagerV2Interface : public QObject +class KWIN_EXPORT TabletManagerV2Interface : public QObject { Q_OBJECT public: @@ -53,7 +53,7 @@ private: QScopedPointer d; }; -class KWAYLANDSERVER_EXPORT TabletToolV2Interface : public QObject +class KWIN_EXPORT TabletToolV2Interface : public QObject { Q_OBJECT public: @@ -123,7 +123,7 @@ private: QScopedPointer d; }; -class KWAYLANDSERVER_EXPORT TabletCursorV2 : public QObject +class KWIN_EXPORT TabletCursorV2 : public QObject { Q_OBJECT public: @@ -141,7 +141,7 @@ private: friend class TabletToolV2InterfacePrivate; }; -class KWAYLANDSERVER_EXPORT TabletPadV2Interface : public QObject +class KWIN_EXPORT TabletPadV2Interface : public QObject { Q_OBJECT public: @@ -171,7 +171,7 @@ private: QScopedPointer d; }; -class KWAYLANDSERVER_EXPORT TabletPadRingV2Interface : public QObject +class KWIN_EXPORT TabletPadRingV2Interface : public QObject { Q_OBJECT public: @@ -195,7 +195,7 @@ private: QScopedPointer d; }; -class KWAYLANDSERVER_EXPORT TabletPadStripV2Interface : public QObject +class KWIN_EXPORT TabletPadStripV2Interface : public QObject { Q_OBJECT public: @@ -218,7 +218,7 @@ private: QScopedPointer d; }; -class KWAYLANDSERVER_EXPORT TabletPadGroupV2Interface : public QObject +class KWIN_EXPORT TabletPadGroupV2Interface : public QObject { Q_OBJECT public: @@ -234,7 +234,7 @@ private: QScopedPointer d; }; -class KWAYLANDSERVER_EXPORT TabletV2Interface : public QObject +class KWIN_EXPORT TabletV2Interface : public QObject { Q_OBJECT public: @@ -256,7 +256,7 @@ private: QScopedPointer d; }; -class KWAYLANDSERVER_EXPORT TabletSeatV2Interface : public QObject +class KWIN_EXPORT TabletSeatV2Interface : public QObject { Q_OBJECT public: diff --git a/src/wayland/tests/CMakeLists.txt b/src/wayland/tests/CMakeLists.txt index cc587d4761..b5e4caa3c2 100644 --- a/src/wayland/tests/CMakeLists.txt +++ b/src/wayland/tests/CMakeLists.txt @@ -6,7 +6,7 @@ set(testServer_SRCS waylandservertest.cpp ) add_executable(testServer ${testServer_SRCS}) -target_link_libraries(testServer Plasma::KWaylandServer Qt::CorePrivate) +target_link_libraries(testServer kwin Qt::CorePrivate) ecm_mark_as_test(testServer) find_package(Qt${QT_MAJOR_VERSION}Widgets ${QT_MIN_VERSION} CONFIG QUIET) @@ -15,7 +15,7 @@ if (TARGET Qt::Widgets) renderingservertest.cpp ) add_executable(testRenderingServer ${testRenderingServer_SRCS}) - target_link_libraries(testRenderingServer Plasma::KWaylandServer Qt::Concurrent Qt::Widgets) + target_link_libraries(testRenderingServer kwin Qt::Concurrent Qt::Widgets) ecm_mark_as_test(testRenderingServer) endif() diff --git a/src/wayland/tests/renderingservertest.cpp b/src/wayland/tests/renderingservertest.cpp index 8189841ec6..aa12f7e598 100644 --- a/src/wayland/tests/renderingservertest.cpp +++ b/src/wayland/tests/renderingservertest.cpp @@ -3,15 +3,15 @@ SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL */ -#include "../src/server/compositor_interface.h" -#include "../src/server/datadevicemanager_interface.h" -#include "../src/server/display.h" -#include "../src/server/keyboard_interface.h" -#include "../src/server/output_interface.h" -#include "../src/server/pointer_interface.h" -#include "../src/server/seat_interface.h" -#include "../src/server/shmclientbuffer.h" -#include "../src/server/xdgshell_interface.h" +#include "../compositor_interface.h" +#include "../datadevicemanager_interface.h" +#include "../display.h" +#include "../keyboard_interface.h" +#include "../output_interface.h" +#include "../pointer_interface.h" +#include "../seat_interface.h" +#include "../shmclientbuffer.h" +#include "../xdgshell_interface.h" #include #include diff --git a/src/wayland/tests/waylandservertest.cpp b/src/wayland/tests/waylandservertest.cpp index 9b6b6569d5..04405dca4c 100644 --- a/src/wayland/tests/waylandservertest.cpp +++ b/src/wayland/tests/waylandservertest.cpp @@ -3,11 +3,11 @@ SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL */ -#include "../src/server/compositor_interface.h" -#include "../src/server/display.h" -#include "../src/server/output_interface.h" -#include "../src/server/seat_interface.h" -#include "../src/server/xdgshell_interface.h" +#include "../compositor_interface.h" +#include "../display.h" +#include "../output_interface.h" +#include "../seat_interface.h" +#include "../xdgshell_interface.h" #include #include diff --git a/src/wayland/textinput.h b/src/wayland/textinput.h index 99854307db..6f4695f31b 100644 --- a/src/wayland/textinput.h +++ b/src/wayland/textinput.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include "kwin_export.h" #include #include @@ -15,7 +15,7 @@ namespace KWaylandServer { -Q_NAMESPACE_EXPORT(KWAYLANDSERVER_EXPORT) +Q_NAMESPACE_EXPORT(KWIN_EXPORT) /** * ContentHint allows to modify the behavior of the text input. */ diff --git a/src/wayland/textinput_v2_interface.h b/src/wayland/textinput_v2_interface.h index 5481f078b0..5474533162 100644 --- a/src/wayland/textinput_v2_interface.h +++ b/src/wayland/textinput_v2_interface.h @@ -7,8 +7,6 @@ #include -#include - #include "textinput.h" struct wl_resource; @@ -29,7 +27,7 @@ class TextInputManagerV2InterfacePrivate; * * To create a TextInputManagerV2Interface use {@link Display::createTextInputManager} */ -class KWAYLANDSERVER_EXPORT TextInputManagerV2Interface : public QObject +class KWIN_EXPORT TextInputManagerV2Interface : public QObject { Q_OBJECT public: @@ -57,7 +55,7 @@ private: * @see TextInputManagerV2Interface * @see SeatInterface */ -class KWAYLANDSERVER_EXPORT TextInputV2Interface : public QObject +class KWIN_EXPORT TextInputV2Interface : public QObject { Q_OBJECT public: diff --git a/src/wayland/textinput_v3_interface.h b/src/wayland/textinput_v3_interface.h index 64254871de..c674fd736b 100644 --- a/src/wayland/textinput_v3_interface.h +++ b/src/wayland/textinput_v3_interface.h @@ -9,7 +9,6 @@ #include #include "textinput.h" -#include struct wl_resource; namespace KWaylandServer @@ -29,7 +28,7 @@ class TextInputManagerV3InterfacePrivate; * * To create a TextInputManagerV3Interface use {@link Display::createTextInputManager} */ -class KWAYLANDSERVER_EXPORT TextInputManagerV3Interface : public QObject +class KWIN_EXPORT TextInputManagerV3Interface : public QObject { Q_OBJECT public: @@ -51,7 +50,7 @@ private: * @see TextInputManagerV3Interface * @see SeatInterface */ -class KWAYLANDSERVER_EXPORT TextInputV3Interface : public QObject +class KWIN_EXPORT TextInputV3Interface : public QObject { Q_OBJECT public: diff --git a/src/wayland/touch_interface.h b/src/wayland/touch_interface.h index adf5443631..577dcb1522 100644 --- a/src/wayland/touch_interface.h +++ b/src/wayland/touch_interface.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include "kwin_export.h" #include @@ -21,7 +21,7 @@ class TouchInterfacePrivate; * The TouchInterface class repserents a touchscreen associated with a wl_seat. It * corresponds to the Wayland interface @c wl_touch. */ -class KWAYLANDSERVER_EXPORT TouchInterface : public QObject +class KWIN_EXPORT TouchInterface : public QObject { Q_OBJECT diff --git a/src/wayland/utils.h b/src/wayland/utils.h index ac0cd6e749..10cfce5a2c 100644 --- a/src/wayland/utils.h +++ b/src/wayland/utils.h @@ -6,7 +6,7 @@ #pragma once -#include +#include "kwin_export.h" #include @@ -34,7 +34,7 @@ using ScopedGlobalPointer = QScopedPointer>; /** * Returns an infinite region. */ -inline QRegion KWAYLANDSERVER_EXPORT infiniteRegion() +inline QRegion KWIN_EXPORT infiniteRegion() { return QRegion(std::numeric_limits::min() / 2, // "/ 2" is to avoid integer overflows std::numeric_limits::min() / 2, diff --git a/src/wayland/viewporter_interface.h b/src/wayland/viewporter_interface.h index abeda3276d..a574e5d39f 100644 --- a/src/wayland/viewporter_interface.h +++ b/src/wayland/viewporter_interface.h @@ -6,7 +6,7 @@ #pragma once -#include +#include "kwin_export.h" #include @@ -23,7 +23,7 @@ class ViewporterInterfacePrivate; * * ViewporterInterface corresponds to the Wayland interface @c wp_viewporter. */ -class KWAYLANDSERVER_EXPORT ViewporterInterface : public QObject +class KWIN_EXPORT ViewporterInterface : public QObject { Q_OBJECT diff --git a/src/wayland/xdgactivation_v1_interface.cpp b/src/wayland/xdgactivation_v1_interface.cpp index daf065fd2c..103bec9ca8 100644 --- a/src/wayland/xdgactivation_v1_interface.cpp +++ b/src/wayland/xdgactivation_v1_interface.cpp @@ -6,7 +6,6 @@ #include "xdgactivation_v1_interface.h" #include "display.h" -#include "logging.h" #include "seat_interface.h" #include "surface_interface.h" diff --git a/src/wayland/xdgactivation_v1_interface.h b/src/wayland/xdgactivation_v1_interface.h index af303904b7..cdb0b93251 100644 --- a/src/wayland/xdgactivation_v1_interface.h +++ b/src/wayland/xdgactivation_v1_interface.h @@ -6,7 +6,7 @@ #pragma once -#include +#include "kwin_export.h" #include #include @@ -24,7 +24,7 @@ class ClientConnection; class XdgActivationV1InterfacePrivate; -class KWAYLANDSERVER_EXPORT XdgActivationV1Interface : public QObject +class KWIN_EXPORT XdgActivationV1Interface : public QObject { Q_OBJECT Q_DISABLE_COPY(XdgActivationV1Interface) diff --git a/src/wayland/xdgdecoration_v1_interface.h b/src/wayland/xdgdecoration_v1_interface.h index d5067c13a0..3cbeec69fe 100644 --- a/src/wayland/xdgdecoration_v1_interface.h +++ b/src/wayland/xdgdecoration_v1_interface.h @@ -6,7 +6,7 @@ #pragma once -#include +#include "kwin_export.h" #include @@ -26,7 +26,7 @@ class XdgToplevelInterface; * * XdgDecorationManagerV1Interface corresponds to the interface \c zxdg_decoration_manager_v1. */ -class KWAYLANDSERVER_EXPORT XdgDecorationManagerV1Interface : public QObject +class KWIN_EXPORT XdgDecorationManagerV1Interface : public QObject { Q_OBJECT @@ -56,7 +56,7 @@ private: * * XdgToplevelDecorationV1Interface corresponds to the interface \c zxdg_toplevel_decoration_v1. */ -class KWAYLANDSERVER_EXPORT XdgToplevelDecorationV1Interface : public QObject +class KWIN_EXPORT XdgToplevelDecorationV1Interface : public QObject { Q_OBJECT diff --git a/src/wayland/xdgforeign_v2_interface.h b/src/wayland/xdgforeign_v2_interface.h index 17232d69f6..daf4b2dff3 100644 --- a/src/wayland/xdgforeign_v2_interface.h +++ b/src/wayland/xdgforeign_v2_interface.h @@ -6,9 +6,9 @@ */ #pragma once -#include +#include "kwin_export.h" -#include +#include namespace KWaylandServer { @@ -24,7 +24,7 @@ class XdgForeignV2InterfacePrivate; * This parent relationship is traced by the transientChanged signal and the * transientFor method. */ -class KWAYLANDSERVER_EXPORT XdgForeignV2Interface : public QObject +class KWIN_EXPORT XdgForeignV2Interface : public QObject { Q_OBJECT public: diff --git a/src/wayland/xdgoutput_v1_interface.h b/src/wayland/xdgoutput_v1_interface.h index 88dbe9ab7a..37660662bc 100644 --- a/src/wayland/xdgoutput_v1_interface.h +++ b/src/wayland/xdgoutput_v1_interface.h @@ -7,9 +7,9 @@ #ifndef KWAYLAND_SERVER_XDGOUTPUT_INTERFACE_H #define KWAYLAND_SERVER_XDGOUTPUT_INTERFACE_H -#include +#include "kwin_export.h" -#include +#include /* * In terms of protocol XdgOutputInterface are a resource @@ -29,7 +29,7 @@ class XdgOutputV1InterfacePrivate; /** * Global manager for XdgOutputs */ -class KWAYLANDSERVER_EXPORT XdgOutputManagerV1Interface : public QObject +class KWIN_EXPORT XdgOutputManagerV1Interface : public QObject { Q_OBJECT @@ -54,7 +54,7 @@ private: * Users should set all relevant values on creation and on future changes. * done() should be explicitly called after change batches including initial setting. */ -class KWAYLANDSERVER_EXPORT XdgOutputV1Interface : public QObject +class KWIN_EXPORT XdgOutputV1Interface : public QObject { Q_OBJECT public: diff --git a/src/wayland/xdgshell_interface.h b/src/wayland/xdgshell_interface.h index 6690a78cbe..56142da0d8 100644 --- a/src/wayland/xdgshell_interface.h +++ b/src/wayland/xdgshell_interface.h @@ -6,7 +6,7 @@ #pragma once -#include +#include "kwin_export.h" #include #include @@ -37,7 +37,7 @@ class XdgSurfaceInterface; * * XdgShellInterface corresponds to the WaylandInterface \c xdg_wm_base. */ -class KWAYLANDSERVER_EXPORT XdgShellInterface : public QObject +class KWIN_EXPORT XdgShellInterface : public QObject { Q_OBJECT @@ -104,7 +104,7 @@ private: * * XdgSurfaceInterface corresponds to the Wayland interface \c xdg_surface. */ -class KWAYLANDSERVER_EXPORT XdgSurfaceInterface : public QObject +class KWIN_EXPORT XdgSurfaceInterface : public QObject { Q_OBJECT @@ -191,7 +191,7 @@ private: * * XdgToplevelInterface corresponds to the Wayland interface \c xdg_toplevel. */ -class KWAYLANDSERVER_EXPORT XdgToplevelInterface : public QObject +class KWIN_EXPORT XdgToplevelInterface : public QObject { Q_OBJECT @@ -397,7 +397,7 @@ private: * * XdgPositioner corresponds to the Wayland interface \c xdg_positioner. */ -class KWAYLANDSERVER_EXPORT XdgPositioner +class KWIN_EXPORT XdgPositioner { public: /** @@ -503,7 +503,7 @@ private: * * XdgPopupInterface corresponds to the Wayland interface \c xdg_popup. */ -class KWAYLANDSERVER_EXPORT XdgPopupInterface : public QObject +class KWIN_EXPORT XdgPopupInterface : public QObject { Q_OBJECT diff --git a/src/wayland_server.cpp b/src/wayland_server.cpp index da0fe97c4b..d7ee824299 100644 --- a/src/wayland_server.cpp +++ b/src/wayland_server.cpp @@ -23,6 +23,44 @@ #include "unmanaged.h" #include "utils/serviceutils.h" #include "virtualdesktops.h" +#include "wayland/appmenu_interface.h" +#include "wayland/blur_interface.h" +#include "wayland/compositor_interface.h" +#include "wayland/datacontroldevicemanager_v1_interface.h" +#include "wayland/datadevicemanager_interface.h" +#include "wayland/datasource_interface.h" +#include "wayland/display.h" +#include "wayland/dpms_interface.h" +#include "wayland/filtered_display.h" +#include "wayland/idle_interface.h" +#include "wayland/idleinhibit_v1_interface.h" +#include "wayland/inputmethod_v1_interface.h" +#include "wayland/keyboard_shortcuts_inhibit_v1_interface.h" +#include "wayland/keystate_interface.h" +#include "wayland/linuxdmabufv1clientbuffer.h" +#include "wayland/output_interface.h" +#include "wayland/outputconfiguration_v2_interface.h" +#include "wayland/outputmanagement_v2_interface.h" +#include "wayland/plasmashell_interface.h" +#include "wayland/plasmavirtualdesktop_interface.h" +#include "wayland/plasmawindowmanagement_interface.h" +#include "wayland/pointerconstraints_v1_interface.h" +#include "wayland/pointergestures_v1_interface.h" +#include "wayland/primaryoutput_v1_interface.h" +#include "wayland/primaryselectiondevicemanager_v1_interface.h" +#include "wayland/relativepointer_v1_interface.h" +#include "wayland/seat_interface.h" +#include "wayland/server_decoration_interface.h" +#include "wayland/server_decoration_palette_interface.h" +#include "wayland/shadow_interface.h" +#include "wayland/subcompositor_interface.h" +#include "wayland/tablet_v2_interface.h" +#include "wayland/viewporter_interface.h" +#include "wayland/xdgactivation_v1_interface.h" +#include "wayland/xdgdecoration_v1_interface.h" +#include "wayland/xdgforeign_v2_interface.h" +#include "wayland/xdgoutput_v1_interface.h" +#include "wayland/xdgshell_interface.h" #include "waylandoutput.h" #include "waylandoutputdevicev2.h" #include "workspace.h" @@ -31,46 +69,6 @@ #include "xdgshellclient.h" #include "xdgshellintegration.h" -// Server -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - // Qt #include #include diff --git a/src/waylandclient.cpp b/src/waylandclient.cpp index 75b3243026..d356720c04 100644 --- a/src/waylandclient.cpp +++ b/src/waylandclient.cpp @@ -9,14 +9,13 @@ #include "waylandclient.h" #include "platform.h" #include "screens.h" +#include "wayland/clientbuffer.h" +#include "wayland/clientconnection.h" +#include "wayland/display.h" +#include "wayland/surface_interface.h" #include "wayland_server.h" #include "workspace.h" -#include -#include -#include -#include - #include #include diff --git a/src/waylandoutput.h b/src/waylandoutput.h index bb9677e4ce..bec4f9c72b 100644 --- a/src/waylandoutput.h +++ b/src/waylandoutput.h @@ -7,10 +7,9 @@ #pragma once #include "output.h" - -#include -#include -#include +#include "wayland/output_interface.h" +#include "wayland/utils.h" +#include "wayland/xdgoutput_v1_interface.h" #include diff --git a/src/waylandoutputdevicev2.h b/src/waylandoutputdevicev2.h index 73fa9c56e6..2c9dd1c68f 100644 --- a/src/waylandoutputdevicev2.h +++ b/src/waylandoutputdevicev2.h @@ -8,9 +8,8 @@ #pragma once #include "output.h" - -#include -#include +#include "wayland/outputdevice_v2_interface.h" +#include "wayland/utils.h" namespace KWin { diff --git a/src/xdgactivationv1.cpp b/src/xdgactivationv1.cpp index 0e4f2554e5..e5d6583edb 100644 --- a/src/xdgactivationv1.cpp +++ b/src/xdgactivationv1.cpp @@ -11,12 +11,12 @@ #include "abstract_client.h" #include "effects.h" #include "utils/common.h" +#include "wayland/display.h" +#include "wayland/plasmawindowmanagement_interface.h" +#include "wayland/surface_interface.h" +#include "wayland/xdgactivation_v1_interface.h" #include "wayland_server.h" #include "workspace.h" -#include -#include -#include -#include using namespace KWaylandServer; diff --git a/src/xdgshellclient.cpp b/src/xdgshellclient.cpp index d1a410fd7c..05d16f21ac 100644 --- a/src/xdgshellclient.cpp +++ b/src/xdgshellclient.cpp @@ -20,19 +20,19 @@ #include "touch_input.h" #include "utils/subsurfacemonitor.h" #include "virtualdesktops.h" +#include "wayland/appmenu_interface.h" +#include "wayland/output_interface.h" +#include "wayland/plasmashell_interface.h" +#include "wayland/seat_interface.h" +#include "wayland/server_decoration_interface.h" +#include "wayland/server_decoration_palette_interface.h" +#include "wayland/surface_interface.h" +#include "wayland/xdgdecoration_v1_interface.h" #include "wayland_server.h" #include "workspace.h" #include #include -#include -#include -#include -#include -#include -#include -#include -#include using namespace KWaylandServer; diff --git a/src/xdgshellclient.h b/src/xdgshellclient.h index 41ffae0f92..62678c6b18 100644 --- a/src/xdgshellclient.h +++ b/src/xdgshellclient.h @@ -11,10 +11,9 @@ #pragma once +#include "wayland/xdgshell_interface.h" #include "waylandclient.h" -#include - #include #include diff --git a/src/xdgshellintegration.cpp b/src/xdgshellintegration.cpp index b68d83a635..ae33741259 100644 --- a/src/xdgshellintegration.cpp +++ b/src/xdgshellintegration.cpp @@ -5,13 +5,12 @@ */ #include "xdgshellintegration.h" +#include "wayland/display.h" +#include "wayland/xdgshell_interface.h" #include "wayland_server.h" #include "workspace.h" #include "xdgshellclient.h" -#include -#include - using namespace KWaylandServer; namespace KWin diff --git a/src/xkb.cpp b/src/xkb.cpp index f41ee8eb92..20afbf4101 100644 --- a/src/xkb.cpp +++ b/src/xkb.cpp @@ -8,11 +8,10 @@ */ #include "xkb.h" #include "utils/common.h" +#include "wayland/keyboard_interface.h" +#include "wayland/seat_interface.h" // frameworks #include -// KWayland -#include -#include // Qt #include #include diff --git a/src/xwaylandclient.cpp b/src/xwaylandclient.cpp index 29007df640..3ed05744ac 100644 --- a/src/xwaylandclient.cpp +++ b/src/xwaylandclient.cpp @@ -8,8 +8,7 @@ */ #include "xwaylandclient.h" - -#include +#include "wayland/surface_interface.h" using namespace KWaylandServer; diff --git a/src/xwl/clipboard.cpp b/src/xwl/clipboard.cpp index d5e61c4e2f..56c43ca86e 100644 --- a/src/xwl/clipboard.cpp +++ b/src/xwl/clipboard.cpp @@ -11,12 +11,11 @@ #include "datasource.h" #include "selection_source.h" +#include "wayland/seat_interface.h" #include "wayland_server.h" #include "workspace.h" #include "x11client.h" -#include - #include #include diff --git a/src/xwl/databridge.cpp b/src/xwl/databridge.cpp index 59d4f886cf..9ee98d6190 100644 --- a/src/xwl/databridge.cpp +++ b/src/xwl/databridge.cpp @@ -15,14 +15,13 @@ #include "abstract_client.h" #include "atoms.h" +#include "wayland/clientconnection.h" +#include "wayland/datadevice_interface.h" +#include "wayland/datadevicemanager_interface.h" +#include "wayland/seat_interface.h" #include "wayland_server.h" #include "workspace.h" -#include -#include -#include -#include - using namespace KWaylandServer; namespace KWin diff --git a/src/xwl/datasource.h b/src/xwl/datasource.h index 5d0c055df9..92049a89e6 100644 --- a/src/xwl/datasource.h +++ b/src/xwl/datasource.h @@ -5,7 +5,7 @@ #pragma once -#include +#include "wayland/abstract_data_source.h" namespace KWin { diff --git a/src/xwl/dnd.cpp b/src/xwl/dnd.cpp index 0cffacafec..b5fb61c4a1 100644 --- a/src/xwl/dnd.cpp +++ b/src/xwl/dnd.cpp @@ -16,15 +16,14 @@ #include "abstract_client.h" #include "atoms.h" +#include "wayland/compositor_interface.h" +#include "wayland/datasource_interface.h" +#include "wayland/seat_interface.h" #include "wayland_server.h" #include "workspace.h" #include "xwayland.h" #include "xwldrophandler.h" -#include -#include -#include - #include #include diff --git a/src/xwl/dnd.h b/src/xwl/dnd.h index 4e4aea80a6..9ab23d2b8b 100644 --- a/src/xwl/dnd.h +++ b/src/xwl/dnd.h @@ -11,7 +11,8 @@ #include "selection.h" -#include +#include "wayland/datadevicemanager_interface.h" + #include namespace KWaylandServer diff --git a/src/xwl/drag_wl.cpp b/src/xwl/drag_wl.cpp index eef44f8c7c..bb3c8b82a3 100644 --- a/src/xwl/drag_wl.cpp +++ b/src/xwl/drag_wl.cpp @@ -16,15 +16,14 @@ #include "xwldrophandler.h" #include "atoms.h" +#include "wayland/datadevice_interface.h" +#include "wayland/datasource_interface.h" +#include "wayland/seat_interface.h" +#include "wayland/surface_interface.h" #include "wayland_server.h" #include "workspace.h" #include "x11client.h" -#include -#include -#include -#include - #include #include diff --git a/src/xwl/drag_wl.h b/src/xwl/drag_wl.h index 412cbecbbd..0b552a0617 100644 --- a/src/xwl/drag_wl.h +++ b/src/xwl/drag_wl.h @@ -11,7 +11,7 @@ #include "drag.h" -#include +#include "wayland/datadevicemanager_interface.h" #include #include diff --git a/src/xwl/drag_x.cpp b/src/xwl/drag_x.cpp index fc549ad60e..fcbf0478e0 100644 --- a/src/xwl/drag_x.cpp +++ b/src/xwl/drag_x.cpp @@ -18,14 +18,13 @@ #include "abstract_client.h" #include "atoms.h" +#include "wayland/datadevice_interface.h" +#include "wayland/datasource_interface.h" +#include "wayland/seat_interface.h" +#include "wayland/surface_interface.h" #include "wayland_server.h" #include "workspace.h" -#include -#include -#include -#include - #include #include diff --git a/src/xwl/drag_x.h b/src/xwl/drag_x.h index 889fd71500..3ee2a43bde 100644 --- a/src/xwl/drag_x.h +++ b/src/xwl/drag_x.h @@ -12,7 +12,7 @@ #include "datasource.h" #include "drag.h" -#include +#include "wayland/datadevicemanager_interface.h" #include #include diff --git a/src/xwl/primary.cpp b/src/xwl/primary.cpp index 7bd159e81d..f5c5779cdc 100644 --- a/src/xwl/primary.cpp +++ b/src/xwl/primary.cpp @@ -12,12 +12,11 @@ #include "datasource.h" #include "selection_source.h" +#include "wayland/seat_interface.h" #include "wayland_server.h" #include "workspace.h" #include "x11client.h" -#include - #include #include diff --git a/src/xwl/selection_source.cpp b/src/xwl/selection_source.cpp index f4fbf0c9fe..3f02b79b69 100644 --- a/src/xwl/selection_source.cpp +++ b/src/xwl/selection_source.cpp @@ -11,12 +11,11 @@ #include "transfer.h" #include "atoms.h" +#include "wayland/datadevice_interface.h" +#include "wayland/datasource_interface.h" +#include "wayland/seat_interface.h" #include "wayland_server.h" -#include -#include -#include - #include #include diff --git a/src/xwl/transfer.cpp b/src/xwl/transfer.cpp index ca79e7550d..d38cefb1c2 100644 --- a/src/xwl/transfer.cpp +++ b/src/xwl/transfer.cpp @@ -13,13 +13,12 @@ #include "abstract_client.h" #include "atoms.h" +#include "wayland/datadevice_interface.h" +#include "wayland/datasource_interface.h" +#include "wayland/seat_interface.h" #include "wayland_server.h" #include "workspace.h" -#include -#include -#include - #include #include diff --git a/src/xwl/xwldrophandler.cpp b/src/xwl/xwldrophandler.cpp index 772a7a0f1d..02a6516d30 100644 --- a/src/xwl/xwldrophandler.cpp +++ b/src/xwl/xwldrophandler.cpp @@ -12,12 +12,11 @@ #include "databridge.h" #include "dnd.h" #include "drag_wl.h" +#include "wayland/seat_interface.h" #include "wayland_server.h" #include "workspace.h" #include "x11client.h" -#include - namespace KWin::Xwl { diff --git a/src/xwl/xwldrophandler.h b/src/xwl/xwldrophandler.h index d44cc45f70..18169df410 100644 --- a/src/xwl/xwldrophandler.h +++ b/src/xwl/xwldrophandler.h @@ -11,7 +11,7 @@ #ifndef XWLDROPHANDLER_H #define XWLDROPHANDLER_H -#include +#include "wayland/datadevice_interface.h" #include