kwin/autotests/CMakeLists.txt

427 lines
12 KiB
CMake
Raw Normal View History

add_definitions(-DKWIN_UNIT_TEST)
remove_definitions(-DQT_USE_QSTRINGBUILDER)
add_subdirectory(libkwineffects)
add_subdirectory(libxrenderutils)
add_subdirectory(integration)
add_subdirectory(libinput)
if (HAVE_DRM)
add_subdirectory(drm)
endif()
add_subdirectory(tabbox)
########################################################
# Test ScreenPaintData
########################################################
set(testScreenPaintData_SRCS test_screen_paint_data.cpp)
add_executable(testScreenPaintData ${testScreenPaintData_SRCS})
target_link_libraries(testScreenPaintData kwineffects Qt5::Test Qt5::Widgets KF5::WindowSystem)
add_test(NAME kwin-testScreenPaintData COMMAND testScreenPaintData)
ecm_mark_as_test(testScreenPaintData)
########################################################
# Test WindowPaintData
########################################################
set(testWindowPaintData_SRCS test_window_paint_data.cpp)
add_executable(testWindowPaintData ${testWindowPaintData_SRCS})
target_link_libraries(testWindowPaintData kwineffects Qt5::Widgets Qt5::Test )
add_test(NAME kwin-testWindowPaintData COMMAND testWindowPaintData)
ecm_mark_as_test(testWindowPaintData)
########################################################
# Test VirtualDesktopManager
########################################################
set(testVirtualDesktops_SRCS
../virtualdesktops.cpp
test_virtual_desktops.cpp
)
add_executable(testVirtualDesktops ${testVirtualDesktops_SRCS})
target_link_libraries(testVirtualDesktops
Qt5::Test
Qt5::Widgets
KF5::ConfigCore
KF5::GlobalAccel
KF5::I18n
Plasma::KWaylandServer
KF5::WindowSystem
)
add_test(NAME kwin-testVirtualDesktops COMMAND testVirtualDesktops)
ecm_mark_as_test(testVirtualDesktops)
Improved resolving whether a window is on local machine Most windows use the hostname in WM_CLIENT_MACHINE, but there are windows using the FQDN (for example libreoffice). So instead of "foo" it is "foo.local.net" or similar. The logic so far has been unable to properly determine whether windows with FQDN are on the local system. In order to solve this problem the handling is split out into an own class which stores the information of hostname and whether it is a local machine. This is to not query multiple times. To determine whether the Client is on the local system getaddrinfo is used for the own hostname and the FQDN provided in WM_CLIENT_MACHINE. If one of the queried names matches, we know that it is on the local machine. The old logic to compare the hostname is still used and getaddrinfo is only a fallback in case hostname does not match. The problem with getaddrinfo is, that it accesses the network and by that could block. To circumvent this problem the calls are moved into threads by using QtConcurrent::run. Obviously this brings disadvantages. When trying to resolve whether a Client is on the local machine and a FQDN is used, the information is initially wrong. The new ClientMachine class emits a signal when the information that the system is local becomes available, but for some things this is just too late: * window rules are already gathered * Session Management has already taken place In both cases this is an acceptable loss. For window rules it just needs a proper matching of the machine in case of localhost (remote hosts are not affected). And the case of session management is very academic as it is unlikely that a restoring session contains remote windows. BUG: 308391 FIXED-IN: 4.11 REVIEW: 108235
2013-01-07 11:07:27 +04:00
########################################################
# Test ClientMachine
########################################################
set(testClientMachine_SRCS
../client_machine.cpp
test_client_machine.cpp
Improved resolving whether a window is on local machine Most windows use the hostname in WM_CLIENT_MACHINE, but there are windows using the FQDN (for example libreoffice). So instead of "foo" it is "foo.local.net" or similar. The logic so far has been unable to properly determine whether windows with FQDN are on the local system. In order to solve this problem the handling is split out into an own class which stores the information of hostname and whether it is a local machine. This is to not query multiple times. To determine whether the Client is on the local system getaddrinfo is used for the own hostname and the FQDN provided in WM_CLIENT_MACHINE. If one of the queried names matches, we know that it is on the local machine. The old logic to compare the hostname is still used and getaddrinfo is only a fallback in case hostname does not match. The problem with getaddrinfo is, that it accesses the network and by that could block. To circumvent this problem the calls are moved into threads by using QtConcurrent::run. Obviously this brings disadvantages. When trying to resolve whether a Client is on the local machine and a FQDN is used, the information is initially wrong. The new ClientMachine class emits a signal when the information that the system is local becomes available, but for some things this is just too late: * window rules are already gathered * Session Management has already taken place In both cases this is an acceptable loss. For window rules it just needs a proper matching of the machine in case of localhost (remote hosts are not affected). And the case of session management is very academic as it is unlikely that a restoring session contains remote windows. BUG: 308391 FIXED-IN: 4.11 REVIEW: 108235
2013-01-07 11:07:27 +04:00
)
add_executable(testClientMachine ${testClientMachine_SRCS})
set_target_properties(testClientMachine PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW")
Improved resolving whether a window is on local machine Most windows use the hostname in WM_CLIENT_MACHINE, but there are windows using the FQDN (for example libreoffice). So instead of "foo" it is "foo.local.net" or similar. The logic so far has been unable to properly determine whether windows with FQDN are on the local system. In order to solve this problem the handling is split out into an own class which stores the information of hostname and whether it is a local machine. This is to not query multiple times. To determine whether the Client is on the local system getaddrinfo is used for the own hostname and the FQDN provided in WM_CLIENT_MACHINE. If one of the queried names matches, we know that it is on the local machine. The old logic to compare the hostname is still used and getaddrinfo is only a fallback in case hostname does not match. The problem with getaddrinfo is, that it accesses the network and by that could block. To circumvent this problem the calls are moved into threads by using QtConcurrent::run. Obviously this brings disadvantages. When trying to resolve whether a Client is on the local machine and a FQDN is used, the information is initially wrong. The new ClientMachine class emits a signal when the information that the system is local becomes available, but for some things this is just too late: * window rules are already gathered * Session Management has already taken place In both cases this is an acceptable loss. For window rules it just needs a proper matching of the machine in case of localhost (remote hosts are not affected). And the case of session management is very academic as it is unlikely that a restoring session contains remote windows. BUG: 308391 FIXED-IN: 4.11 REVIEW: 108235
2013-01-07 11:07:27 +04:00
target_link_libraries(testClientMachine
Qt5::Concurrent
Qt5::Test
Qt5::Widgets
Qt5::X11Extras
KF5::ConfigCore
KF5::WindowSystem
XCB::XCB
XCB::XFIXES
${X11_X11_LIB} # to make jenkins happy
Improved resolving whether a window is on local machine Most windows use the hostname in WM_CLIENT_MACHINE, but there are windows using the FQDN (for example libreoffice). So instead of "foo" it is "foo.local.net" or similar. The logic so far has been unable to properly determine whether windows with FQDN are on the local system. In order to solve this problem the handling is split out into an own class which stores the information of hostname and whether it is a local machine. This is to not query multiple times. To determine whether the Client is on the local system getaddrinfo is used for the own hostname and the FQDN provided in WM_CLIENT_MACHINE. If one of the queried names matches, we know that it is on the local machine. The old logic to compare the hostname is still used and getaddrinfo is only a fallback in case hostname does not match. The problem with getaddrinfo is, that it accesses the network and by that could block. To circumvent this problem the calls are moved into threads by using QtConcurrent::run. Obviously this brings disadvantages. When trying to resolve whether a Client is on the local machine and a FQDN is used, the information is initially wrong. The new ClientMachine class emits a signal when the information that the system is local becomes available, but for some things this is just too late: * window rules are already gathered * Session Management has already taken place In both cases this is an acceptable loss. For window rules it just needs a proper matching of the machine in case of localhost (remote hosts are not affected). And the case of session management is very academic as it is unlikely that a restoring session contains remote windows. BUG: 308391 FIXED-IN: 4.11 REVIEW: 108235
2013-01-07 11:07:27 +04:00
)
add_test(NAME kwin-testClientMachine COMMAND testClientMachine)
ecm_mark_as_test(testClientMachine)
########################################################
# Test XcbWrapper
########################################################
set(testXcbWrapper_SRCS
test_xcb_wrapper.cpp
)
add_executable(testXcbWrapper ${testXcbWrapper_SRCS})
target_link_libraries(testXcbWrapper
Qt5::Test
Qt5::Widgets
Qt5::X11Extras
KF5::ConfigCore
KF5::WindowSystem
XCB::XCB
)
add_test(NAME kwin-testXcbWrapper COMMAND testXcbWrapper)
ecm_mark_as_test(testXcbWrapper)
if (XCB_ICCCM_FOUND)
add_executable(testXcbSizeHints test_xcb_size_hints.cpp)
set_target_properties(testXcbSizeHints PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW")
target_link_libraries(testXcbSizeHints
Qt5::Test
Qt5::Widgets
Qt5::X11Extras
KF5::ConfigCore
KF5::WindowSystem
XCB::ICCCM
XCB::XCB
)
add_test(NAME kwin-testXcbSizeHints COMMAND testXcbSizeHints)
ecm_mark_as_test(testXcbSizeHints)
endif()
########################################################
# Test XcbWindow
########################################################
set(testXcbWindow_SRCS
test_xcb_window.cpp
)
add_executable(testXcbWindow ${testXcbWindow_SRCS})
target_link_libraries(testXcbWindow
Qt5::Test
Qt5::Widgets
Qt5::X11Extras
KF5::ConfigCore
KF5::WindowSystem
XCB::XCB
)
add_test(NAME kwin-testXcbWindow COMMAND testXcbWindow)
ecm_mark_as_test(testXcbWindow)
########################################################
# Test BuiltInEffectLoader
########################################################
set(testBuiltInEffectLoader_SRCS
../effectloader.cpp
mock_effectshandler.cpp
test_builtin_effectloader.cpp
)
add_executable(testBuiltInEffectLoader ${testBuiltInEffectLoader_SRCS})
set_target_properties(testBuiltInEffectLoader PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW")
target_link_libraries(testBuiltInEffectLoader
Qt5::Concurrent
Qt5::Test
Qt5::X11Extras
KF5::Package
kwineffects
kwin4_effect_builtins
)
add_test(NAME kwin-testBuiltInEffectLoader COMMAND testBuiltInEffectLoader)
ecm_mark_as_test(testBuiltInEffectLoader)
########################################################
# Test ScriptedEffectLoader
########################################################
include_directories(${KWin_SOURCE_DIR})
set(testScriptedEffectLoader_SRCS
../effectloader.cpp
../cursor.cpp
../screens.cpp
../scripting/scriptedeffect.cpp
../scripting/scripting_logging.cpp
../scripting/scriptingutils.cpp
mock_abstract_client.cpp
mock_effectshandler.cpp
mock_screens.cpp
mock_workspace.cpp
test_scripted_effectloader.cpp
)
kconfig_add_kcfg_files(testScriptedEffectLoader_SRCS ../settings.kcfgc)
add_executable(testScriptedEffectLoader ${testScriptedEffectLoader_SRCS})
target_link_libraries(testScriptedEffectLoader
Qt5::Concurrent
Qt5::Qml
Qt5::Script
Qt5::Sensors
Qt5::Test
Qt5::X11Extras
KF5::ConfigGui
KF5::GlobalAccel
KF5::I18n
KF5::Notifications
KF5::Package
kwineffects
kwin4_effect_builtins
)
add_test(NAME kwin-testScriptedEffectLoader COMMAND testScriptedEffectLoader)
ecm_mark_as_test(testScriptedEffectLoader)
########################################################
# Test PluginEffectLoader
########################################################
set(testPluginEffectLoader_SRCS
../effectloader.cpp
mock_effectshandler.cpp
test_plugin_effectloader.cpp
)
add_executable(testPluginEffectLoader ${testPluginEffectLoader_SRCS})
target_link_libraries(testPluginEffectLoader
Qt5::Concurrent
Qt5::Test
Qt5::X11Extras
KF5::Package
kwineffects
kwin4_effect_builtins
)
add_test(NAME kwin-testPluginEffectLoader COMMAND testPluginEffectLoader)
ecm_mark_as_test(testPluginEffectLoader)
########################################################
# FakeEffectPlugin
########################################################
add_library(fakeeffectplugin MODULE fakeeffectplugin.cpp)
set_target_properties(fakeeffectplugin PROPERTIES PREFIX "")
target_link_libraries(fakeeffectplugin kwineffects)
########################################################
# FakeEffectPlugin-Version
########################################################
add_library(effectversionplugin MODULE fakeeffectplugin_version.cpp)
set_target_properties(effectversionplugin PROPERTIES PREFIX "")
target_link_libraries(effectversionplugin kwineffects)
########################################################
# Test Screens
########################################################
set(testScreens_SRCS
../screens.cpp
../cursor.cpp
../x11eventfilter.cpp
mock_abstract_client.cpp
mock_screens.cpp
mock_workspace.cpp
mock_x11client.cpp
test_screens.cpp
)
kconfig_add_kcfg_files(testScreens_SRCS ../settings.kcfgc)
add_executable(testScreens ${testScreens_SRCS})
target_include_directories(testScreens BEFORE PRIVATE ./)
target_link_libraries(testScreens
Qt5::DBus
Qt5::Sensors
Qt5::Test
Qt5::Widgets
Qt5::X11Extras
KF5::ConfigCore
KF5::ConfigGui
KF5::I18n
KF5::Notifications
KF5::WindowSystem
XCB::XCB #for xcbutils.h
)
add_test(NAME kwin_testScreens COMMAND testScreens)
ecm_mark_as_test(testScreens)
########################################################
# Test ScreenEdges
########################################################
set(testScreenEdges_SRCS
../atoms.cpp
../gestures.cpp
../plugins/platforms/x11/standalone/edge.cpp
../screenedge.cpp
../screens.cpp
../virtualdesktops.cpp
../cursor.cpp
../xcbutils.cpp # init of extensions
mock_abstract_client.cpp
mock_screens.cpp
mock_workspace.cpp
mock_x11client.cpp
test_screen_edges.cpp
)
kconfig_add_kcfg_files(testScreenEdges_SRCS ../settings.kcfgc)
qt5_add_dbus_interface(testScreenEdges_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/kf5_org.freedesktop.ScreenSaver.xml screenlocker_interface )
add_executable(testScreenEdges ${testScreenEdges_SRCS})
set_target_properties(testScreenEdges PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW")
target_include_directories(testScreenEdges BEFORE PRIVATE ./)
target_link_libraries(testScreenEdges
Qt5::DBus
Qt5::Sensors
Qt5::Test
Qt5::X11Extras
KF5::ConfigCore
KF5::ConfigGui
KF5::GlobalAccel
KF5::I18n
KF5::Notifications
Plasma::KWaylandServer
KF5::WindowSystem
XCB::COMPOSITE
XCB::DAMAGE
XCB::GLX
XCB::RANDR
XCB::SHM
XCB::SYNC
XCB::XCB
XCB::XFIXES
)
add_test(NAME kwin_testScreenEdges COMMAND testScreenEdges)
ecm_mark_as_test(testScreenEdges)
Introduce a KWin internal on-screen-notification service Summary: Recently we noticed that there are multiple areas where KWin needs to inform the user about how to operate. Examples are: * Screenshot * ColorPicker * Pointer constraint enabled * Pointer constraint about to be removed * Kill Window For Screenshot and ColorPicker we used an EffectFrame to render it. But this is not an optimal solution as it's lacking many features we would need. We cannot properly use it from within KWin core, we cannot implement features like hide on mouse over, etc. etc. This change introduces an OnScreenNotification which supports: * showing an icon * showing a message * timeout It is Qml styled, so that it can be easily adjusted. This is a big improvement over the EffectFrame solution. The Qml file creates a Plasma Dialog of type OSD. Thus KWin places it like the normal OSD windows and also looks kind of similar. In the case of KWin the focus is more on the message, than an icon, so the icon is placed left of the text. While the OnScreenNotification is supposed to be used like a singleton, it doesn't use the KWin singleton pattern. Instead a small wrapper namespace OSD is introduced which provides a convenient API for KWin internal areas to show/hide the notification. By not using the KWin singleton pattern, the OnScreenNotification does not depend on any other parts of KWin and can be easily unit-tested. A few features are still missing and will be added in further commits: * hide-out on mouse over * optional skip close animation (needed for screenshot) * X11 support (not that important as it's mostly for Wayland features) Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D3723
2016-12-18 13:53:50 +03:00
########################################################
# Test OnScreenNotification
########################################################
set(testOnScreenNotification_SRCS
../input_event_spy.cpp
../onscreennotification.cpp
onscreennotificationtest.cpp
Introduce a KWin internal on-screen-notification service Summary: Recently we noticed that there are multiple areas where KWin needs to inform the user about how to operate. Examples are: * Screenshot * ColorPicker * Pointer constraint enabled * Pointer constraint about to be removed * Kill Window For Screenshot and ColorPicker we used an EffectFrame to render it. But this is not an optimal solution as it's lacking many features we would need. We cannot properly use it from within KWin core, we cannot implement features like hide on mouse over, etc. etc. This change introduces an OnScreenNotification which supports: * showing an icon * showing a message * timeout It is Qml styled, so that it can be easily adjusted. This is a big improvement over the EffectFrame solution. The Qml file creates a Plasma Dialog of type OSD. Thus KWin places it like the normal OSD windows and also looks kind of similar. In the case of KWin the focus is more on the message, than an icon, so the icon is placed left of the text. While the OnScreenNotification is supposed to be used like a singleton, it doesn't use the KWin singleton pattern. Instead a small wrapper namespace OSD is introduced which provides a convenient API for KWin internal areas to show/hide the notification. By not using the KWin singleton pattern, the OnScreenNotification does not depend on any other parts of KWin and can be easily unit-tested. A few features are still missing and will be added in further commits: * hide-out on mouse over * optional skip close animation (needed for screenshot) * X11 support (not that important as it's mostly for Wayland features) Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D3723
2016-12-18 13:53:50 +03:00
)
add_executable(testOnScreenNotification ${testOnScreenNotification_SRCS})
Introduce a KWin internal on-screen-notification service Summary: Recently we noticed that there are multiple areas where KWin needs to inform the user about how to operate. Examples are: * Screenshot * ColorPicker * Pointer constraint enabled * Pointer constraint about to be removed * Kill Window For Screenshot and ColorPicker we used an EffectFrame to render it. But this is not an optimal solution as it's lacking many features we would need. We cannot properly use it from within KWin core, we cannot implement features like hide on mouse over, etc. etc. This change introduces an OnScreenNotification which supports: * showing an icon * showing a message * timeout It is Qml styled, so that it can be easily adjusted. This is a big improvement over the EffectFrame solution. The Qml file creates a Plasma Dialog of type OSD. Thus KWin places it like the normal OSD windows and also looks kind of similar. In the case of KWin the focus is more on the message, than an icon, so the icon is placed left of the text. While the OnScreenNotification is supposed to be used like a singleton, it doesn't use the KWin singleton pattern. Instead a small wrapper namespace OSD is introduced which provides a convenient API for KWin internal areas to show/hide the notification. By not using the KWin singleton pattern, the OnScreenNotification does not depend on any other parts of KWin and can be easily unit-tested. A few features are still missing and will be added in further commits: * hide-out on mouse over * optional skip close animation (needed for screenshot) * X11 support (not that important as it's mostly for Wayland features) Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D3723
2016-12-18 13:53:50 +03:00
target_link_libraries(testOnScreenNotification
Qt5::DBus
Qt5::Quick
Introduce a KWin internal on-screen-notification service Summary: Recently we noticed that there are multiple areas where KWin needs to inform the user about how to operate. Examples are: * Screenshot * ColorPicker * Pointer constraint enabled * Pointer constraint about to be removed * Kill Window For Screenshot and ColorPicker we used an EffectFrame to render it. But this is not an optimal solution as it's lacking many features we would need. We cannot properly use it from within KWin core, we cannot implement features like hide on mouse over, etc. etc. This change introduces an OnScreenNotification which supports: * showing an icon * showing a message * timeout It is Qml styled, so that it can be easily adjusted. This is a big improvement over the EffectFrame solution. The Qml file creates a Plasma Dialog of type OSD. Thus KWin places it like the normal OSD windows and also looks kind of similar. In the case of KWin the focus is more on the message, than an icon, so the icon is placed left of the text. While the OnScreenNotification is supposed to be used like a singleton, it doesn't use the KWin singleton pattern. Instead a small wrapper namespace OSD is introduced which provides a convenient API for KWin internal areas to show/hide the notification. By not using the KWin singleton pattern, the OnScreenNotification does not depend on any other parts of KWin and can be easily unit-tested. A few features are still missing and will be added in further commits: * hide-out on mouse over * optional skip close animation (needed for screenshot) * X11 support (not that important as it's mostly for Wayland features) Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D3723
2016-12-18 13:53:50 +03:00
Qt5::Test
Qt5::Widgets # QAction include
KF5::ConfigCore
Introduce a KWin internal on-screen-notification service Summary: Recently we noticed that there are multiple areas where KWin needs to inform the user about how to operate. Examples are: * Screenshot * ColorPicker * Pointer constraint enabled * Pointer constraint about to be removed * Kill Window For Screenshot and ColorPicker we used an EffectFrame to render it. But this is not an optimal solution as it's lacking many features we would need. We cannot properly use it from within KWin core, we cannot implement features like hide on mouse over, etc. etc. This change introduces an OnScreenNotification which supports: * showing an icon * showing a message * timeout It is Qml styled, so that it can be easily adjusted. This is a big improvement over the EffectFrame solution. The Qml file creates a Plasma Dialog of type OSD. Thus KWin places it like the normal OSD windows and also looks kind of similar. In the case of KWin the focus is more on the message, than an icon, so the icon is placed left of the text. While the OnScreenNotification is supposed to be used like a singleton, it doesn't use the KWin singleton pattern. Instead a small wrapper namespace OSD is introduced which provides a convenient API for KWin internal areas to show/hide the notification. By not using the KWin singleton pattern, the OnScreenNotification does not depend on any other parts of KWin and can be easily unit-tested. A few features are still missing and will be added in further commits: * hide-out on mouse over * optional skip close animation (needed for screenshot) * X11 support (not that important as it's mostly for Wayland features) Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D3723
2016-12-18 13:53:50 +03:00
)
add_test(NAME kwin-testOnScreenNotification COMMAND testOnScreenNotification)
Introduce a KWin internal on-screen-notification service Summary: Recently we noticed that there are multiple areas where KWin needs to inform the user about how to operate. Examples are: * Screenshot * ColorPicker * Pointer constraint enabled * Pointer constraint about to be removed * Kill Window For Screenshot and ColorPicker we used an EffectFrame to render it. But this is not an optimal solution as it's lacking many features we would need. We cannot properly use it from within KWin core, we cannot implement features like hide on mouse over, etc. etc. This change introduces an OnScreenNotification which supports: * showing an icon * showing a message * timeout It is Qml styled, so that it can be easily adjusted. This is a big improvement over the EffectFrame solution. The Qml file creates a Plasma Dialog of type OSD. Thus KWin places it like the normal OSD windows and also looks kind of similar. In the case of KWin the focus is more on the message, than an icon, so the icon is placed left of the text. While the OnScreenNotification is supposed to be used like a singleton, it doesn't use the KWin singleton pattern. Instead a small wrapper namespace OSD is introduced which provides a convenient API for KWin internal areas to show/hide the notification. By not using the KWin singleton pattern, the OnScreenNotification does not depend on any other parts of KWin and can be easily unit-tested. A few features are still missing and will be added in further commits: * hide-out on mouse over * optional skip close animation (needed for screenshot) * X11 support (not that important as it's mostly for Wayland features) Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D3723
2016-12-18 13:53:50 +03:00
ecm_mark_as_test(testOnScreenNotification)
Add support for global touchpad swipe gestures Summary: This change adds global touchpad swipe gestures to the GlobalShortcutsManager and hooks up the swipe gestures as defined at the Plasma Affenfels sprint: * swipe up: Desktop Grid * swipe down: Present Windows * swipe left: previous virtual desktop * swipe right: next virtual desktop The main work is handled by two new classes: SwipeGesture and GestureRecognizer. This is implemented in a way that it can be extended to also recognize touch screen gestures and pinch gestures. The SwipeGesture defines what is required for the gesture to trigger. Currently this includes the minimum and maximum number of fingers participating in the gesture and the direction. The gesture gets registered in the GestureRecognizer. The events for the gesture are fed into the GestureRecognizer. It evaluates which gestures could trigger and tracks them for every update of the gesture. In the process of the gesture tracking the GestureRecognizer emits signals on the Gesture: * started: when the Gesture gets considered for a sequence * cancelled: the Gesture no longer matches the sequence * triggered: the sequence ended and the Gesture still matches The remaining changes are related to hook up the existing shortcut framework with the new touchpad gestures. The GlobalShortcutManager gained support for it, InputRedirection and EffectsHandler offer methods to register a QAction. VirtualDesktopManager, PresentWindows and DesktopGrid are adjusted to support the gesture. Reviewers: #kwin, #plasma_on_wayland Subscribers: plasma-devel Tags: #plasma_on_wayland Differential Revision: https://phabricator.kde.org/D5097
2017-03-18 13:00:30 +03:00
########################################################
# Test Gestures
########################################################
set(testGestures_SRCS
Add support for global touchpad swipe gestures Summary: This change adds global touchpad swipe gestures to the GlobalShortcutsManager and hooks up the swipe gestures as defined at the Plasma Affenfels sprint: * swipe up: Desktop Grid * swipe down: Present Windows * swipe left: previous virtual desktop * swipe right: next virtual desktop The main work is handled by two new classes: SwipeGesture and GestureRecognizer. This is implemented in a way that it can be extended to also recognize touch screen gestures and pinch gestures. The SwipeGesture defines what is required for the gesture to trigger. Currently this includes the minimum and maximum number of fingers participating in the gesture and the direction. The gesture gets registered in the GestureRecognizer. The events for the gesture are fed into the GestureRecognizer. It evaluates which gestures could trigger and tracks them for every update of the gesture. In the process of the gesture tracking the GestureRecognizer emits signals on the Gesture: * started: when the Gesture gets considered for a sequence * cancelled: the Gesture no longer matches the sequence * triggered: the sequence ended and the Gesture still matches The remaining changes are related to hook up the existing shortcut framework with the new touchpad gestures. The GlobalShortcutManager gained support for it, InputRedirection and EffectsHandler offer methods to register a QAction. VirtualDesktopManager, PresentWindows and DesktopGrid are adjusted to support the gesture. Reviewers: #kwin, #plasma_on_wayland Subscribers: plasma-devel Tags: #plasma_on_wayland Differential Revision: https://phabricator.kde.org/D5097
2017-03-18 13:00:30 +03:00
../gestures.cpp
test_gestures.cpp
Add support for global touchpad swipe gestures Summary: This change adds global touchpad swipe gestures to the GlobalShortcutsManager and hooks up the swipe gestures as defined at the Plasma Affenfels sprint: * swipe up: Desktop Grid * swipe down: Present Windows * swipe left: previous virtual desktop * swipe right: next virtual desktop The main work is handled by two new classes: SwipeGesture and GestureRecognizer. This is implemented in a way that it can be extended to also recognize touch screen gestures and pinch gestures. The SwipeGesture defines what is required for the gesture to trigger. Currently this includes the minimum and maximum number of fingers participating in the gesture and the direction. The gesture gets registered in the GestureRecognizer. The events for the gesture are fed into the GestureRecognizer. It evaluates which gestures could trigger and tracks them for every update of the gesture. In the process of the gesture tracking the GestureRecognizer emits signals on the Gesture: * started: when the Gesture gets considered for a sequence * cancelled: the Gesture no longer matches the sequence * triggered: the sequence ended and the Gesture still matches The remaining changes are related to hook up the existing shortcut framework with the new touchpad gestures. The GlobalShortcutManager gained support for it, InputRedirection and EffectsHandler offer methods to register a QAction. VirtualDesktopManager, PresentWindows and DesktopGrid are adjusted to support the gesture. Reviewers: #kwin, #plasma_on_wayland Subscribers: plasma-devel Tags: #plasma_on_wayland Differential Revision: https://phabricator.kde.org/D5097
2017-03-18 13:00:30 +03:00
)
add_executable(testGestures ${testGestures_SRCS})
Add support for global touchpad swipe gestures Summary: This change adds global touchpad swipe gestures to the GlobalShortcutsManager and hooks up the swipe gestures as defined at the Plasma Affenfels sprint: * swipe up: Desktop Grid * swipe down: Present Windows * swipe left: previous virtual desktop * swipe right: next virtual desktop The main work is handled by two new classes: SwipeGesture and GestureRecognizer. This is implemented in a way that it can be extended to also recognize touch screen gestures and pinch gestures. The SwipeGesture defines what is required for the gesture to trigger. Currently this includes the minimum and maximum number of fingers participating in the gesture and the direction. The gesture gets registered in the GestureRecognizer. The events for the gesture are fed into the GestureRecognizer. It evaluates which gestures could trigger and tracks them for every update of the gesture. In the process of the gesture tracking the GestureRecognizer emits signals on the Gesture: * started: when the Gesture gets considered for a sequence * cancelled: the Gesture no longer matches the sequence * triggered: the sequence ended and the Gesture still matches The remaining changes are related to hook up the existing shortcut framework with the new touchpad gestures. The GlobalShortcutManager gained support for it, InputRedirection and EffectsHandler offer methods to register a QAction. VirtualDesktopManager, PresentWindows and DesktopGrid are adjusted to support the gesture. Reviewers: #kwin, #plasma_on_wayland Subscribers: plasma-devel Tags: #plasma_on_wayland Differential Revision: https://phabricator.kde.org/D5097
2017-03-18 13:00:30 +03:00
target_link_libraries(testGestures
Qt5::Test
)
add_test(NAME kwin-testGestures COMMAND testGestures)
Add support for global touchpad swipe gestures Summary: This change adds global touchpad swipe gestures to the GlobalShortcutsManager and hooks up the swipe gestures as defined at the Plasma Affenfels sprint: * swipe up: Desktop Grid * swipe down: Present Windows * swipe left: previous virtual desktop * swipe right: next virtual desktop The main work is handled by two new classes: SwipeGesture and GestureRecognizer. This is implemented in a way that it can be extended to also recognize touch screen gestures and pinch gestures. The SwipeGesture defines what is required for the gesture to trigger. Currently this includes the minimum and maximum number of fingers participating in the gesture and the direction. The gesture gets registered in the GestureRecognizer. The events for the gesture are fed into the GestureRecognizer. It evaluates which gestures could trigger and tracks them for every update of the gesture. In the process of the gesture tracking the GestureRecognizer emits signals on the Gesture: * started: when the Gesture gets considered for a sequence * cancelled: the Gesture no longer matches the sequence * triggered: the sequence ended and the Gesture still matches The remaining changes are related to hook up the existing shortcut framework with the new touchpad gestures. The GlobalShortcutManager gained support for it, InputRedirection and EffectsHandler offer methods to register a QAction. VirtualDesktopManager, PresentWindows and DesktopGrid are adjusted to support the gesture. Reviewers: #kwin, #plasma_on_wayland Subscribers: plasma-devel Tags: #plasma_on_wayland Differential Revision: https://phabricator.kde.org/D5097
2017-03-18 13:00:30 +03:00
ecm_mark_as_test(testGestures)
2017-05-05 20:16:38 +03:00
########################################################
# Test X11 TimestampUpdate
########################################################
add_executable(testX11TimestampUpdate test_x11_timestamp_update.cpp)
target_link_libraries(testX11TimestampUpdate
KF5::CoreAddons
Qt5::Test
kwin
)
add_test(NAME kwin-testX11TimestampUpdate COMMAND testX11TimestampUpdate)
ecm_mark_as_test(testX11TimestampUpdate)
set(testOpenGLContextAttributeBuilder_SRCS
../abstract_opengl_context_attribute_builder.cpp
../egl_context_attribute_builder.cpp
opengl_context_attribute_builder_test.cpp
)
if (HAVE_EPOXY_GLX)
set(testOpenGLContextAttributeBuilder_SRCS ${testOpenGLContextAttributeBuilder_SRCS} ../plugins/platforms/x11/standalone/glx_context_attribute_builder.cpp)
endif()
add_executable(testOpenGLContextAttributeBuilder ${testOpenGLContextAttributeBuilder_SRCS})
target_link_libraries(testOpenGLContextAttributeBuilder Qt5::Test)
add_test(NAME kwin-testOpenGLContextAttributeBuilder COMMAND testOpenGLContextAttributeBuilder)
ecm_mark_as_test(testOpenGLContextAttributeBuilder)
set(testXkb_SRCS
../xkb.cpp
test_xkb.cpp
)
add_executable(testXkb ${testXkb_SRCS})
target_link_libraries(testXkb
Qt5::Gui
Qt5::Test
Qt5::Widgets
KF5::ConfigCore
Plasma::KWaylandServer
KF5::WindowSystem
XKB::XKB
)
add_test(NAME kwin-testXkb COMMAND testXkb)
ecm_mark_as_test(testXkb)
if (HAVE_GBM)
add_executable(testGbmSurface test_gbm_surface.cpp ../plugins/platforms/drm/gbm_surface.cpp)
target_link_libraries(testGbmSurface Qt5::Test)
add_test(NAME kwin-testGbmSurface COMMAND testGbmSurface)
2017-10-11 19:31:43 +03:00
ecm_mark_as_test(testGbmSurface)
endif()
add_executable(testVirtualKeyboardDBus test_virtualkeyboard_dbus.cpp ../virtualkeyboard_dbus.cpp)
target_link_libraries(testVirtualKeyboardDBus
Qt5::DBus
Qt5::Test
)
add_test(NAME kwin-testVirtualKeyboardDBus COMMAND testVirtualKeyboardDBus)
ecm_mark_as_test(testVirtualKeyboardDBus)