kwin/src/wayland/tests/CMakeLists.txt

67 lines
2.2 KiB
Text
Raw Normal View History

include(ECMMarkAsTest)
# find_package(Qt5Core ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENT Private _check_private)
include_directories(SYSTEM ${Qt5Core_PRIVATE_INCLUDE_DIRS})
2014-11-07 08:08:29 +00:00
set(testServer_SRCS
waylandservertest.cpp
)
add_executable(testServer ${testServer_SRCS})
2020-04-29 13:59:23 +00:00
target_link_libraries(testServer Plasma::KWaylandServer)
2014-11-07 08:08:29 +00:00
ecm_mark_as_test(testServer)
find_package(Qt5Widgets ${QT_MIN_VERSION} CONFIG QUIET)
if (Qt5Widgets_FOUND)
set(testRenderingServer_SRCS
renderingservertest.cpp
)
add_executable(testRenderingServer ${testRenderingServer_SRCS})
2020-04-29 13:59:23 +00:00
target_link_libraries(testRenderingServer Plasma::KWaylandServer Qt5::Concurrent Qt5::Widgets)
ecm_mark_as_test(testRenderingServer)
endif()
add_executable(copyClient copyclient.cpp)
target_link_libraries(copyClient KF5::WaylandClient)
ecm_mark_as_test(copyClient)
add_executable(pasteClient pasteclient.cpp)
target_link_libraries(pasteClient Qt5::Concurrent KF5::WaylandClient)
ecm_mark_as_test(pasteClient)
if (HAVE_LINUX_INPUT_H)
add_executable(touchClientTest touchclienttest.cpp)
target_link_libraries(touchClientTest KF5::WaylandClient)
add_executable(panelTest paneltest.cpp)
target_link_libraries(panelTest KF5::WaylandClient)
ecm_mark_as_test(panelTest)
add_executable(subsurface-test subsurfacetest.cpp)
target_link_libraries(subsurface-test Qt5::Core Qt5::Gui KF5::WaylandClient)
ecm_mark_as_test(subsurface-test)
endif()
2015-11-18 08:58:19 +00:00
add_executable(shadowTest shadowtest.cpp)
target_link_libraries(shadowTest KF5::WaylandClient)
ecm_mark_as_test(shadowTest)
if (Qt5Widgets_FOUND)
add_executable(dpmsTest dpmstest.cpp)
target_link_libraries(dpmsTest KF5::WaylandClient Qt5::Widgets)
ecm_mark_as_test(dpmsTest)
endif()
add_executable(plasmasurface-test plasmasurfacetest.cpp)
target_link_libraries(plasmasurface-test Qt5::Gui KF5::WaylandClient)
ecm_mark_as_test(plasmasurface-test)
Support XDG v6 Summary: The main clever part that's not just boring boiler plate is how we handle the structure change A surface now has an XDGSurface which then has a an Xdg TopLevel or a Xdg Popup We need to fit this into the public API which assumes a surface has a Surface or a Popup. The old Surface is similar to the new TopLevel. The shoehorning works by relying on the fact that a surface without a role is pretty useless. Clients create the surface implicitly with the toplevel or implicitly with the popup. The server only announced it has a new "XdgSurface" when it gets a new zxdg_surface_get_toplevel. ---- Popup decisions: - On popup creation the server should copy the current info from the positioner and then it gets deleted. Given kwaylands job is to keep state, we expose all these parameter via popup. - Due to this positioner is not exposed as a resource anywhere. - Server API is 100% backwards compatiable. i.e new code will work identically with v5 clients. - Client API is not. Grabs are called separately from the constructor, and the parent surface changed to an xdgsurface, not a raw surface. V5 code still works as-is, just not with the new constructors. It seemed better to match the v6 (and what will be the stable v7) than to try and do hacks and lose functionality. Given the client needs to change the code to opt into V6 anyway. I don't think this is a huge problem. Test Plan: Current test still passes. Reviewers: #plasma, graesslin Reviewed By: #plasma, graesslin Subscribers: graesslin, mart, plasma-devel, #frameworks Tags: #frameworks, #plasma_on_wayland Differential Revision: https://phabricator.kde.org/D6047
2017-09-04 15:38:35 +00:00
add_executable(xdgforeign-test xdgforeigntest.cpp)
target_link_libraries(xdgforeign-test Qt5::Gui KF5::WaylandClient)
ecm_mark_as_test(xdgforeign-test)
Support XDG v6 Summary: The main clever part that's not just boring boiler plate is how we handle the structure change A surface now has an XDGSurface which then has a an Xdg TopLevel or a Xdg Popup We need to fit this into the public API which assumes a surface has a Surface or a Popup. The old Surface is similar to the new TopLevel. The shoehorning works by relying on the fact that a surface without a role is pretty useless. Clients create the surface implicitly with the toplevel or implicitly with the popup. The server only announced it has a new "XdgSurface" when it gets a new zxdg_surface_get_toplevel. ---- Popup decisions: - On popup creation the server should copy the current info from the positioner and then it gets deleted. Given kwaylands job is to keep state, we expose all these parameter via popup. - Due to this positioner is not exposed as a resource anywhere. - Server API is 100% backwards compatiable. i.e new code will work identically with v5 clients. - Client API is not. Grabs are called separately from the constructor, and the parent surface changed to an xdgsurface, not a raw surface. V5 code still works as-is, just not with the new constructors. It seemed better to match the v6 (and what will be the stable v7) than to try and do hacks and lose functionality. Given the client needs to change the code to opt into V6 anyway. I don't think this is a huge problem. Test Plan: Current test still passes. Reviewers: #plasma, graesslin Reviewed By: #plasma, graesslin Subscribers: graesslin, mart, plasma-devel, #frameworks Tags: #frameworks, #plasma_on_wayland Differential Revision: https://phabricator.kde.org/D6047
2017-09-04 15:38:35 +00:00
add_executable(xdg-test xdgtest.cpp)
target_link_libraries(xdg-test Qt5::Gui KF5::WaylandClient)
ecm_mark_as_test(xdg-test)