334b4bf622
The ownership for virtual desktops is moved from Workspace into a new VirtualDesktopManager. The manager is responsible for providing the count of virtual desktops and keeping track of the currently used virtual desktop. All methods related to moving between desktops are also moved from Workspace to the new manager, though all methods related to Clients on Virtual Desktops remain in Workspace for the time being. This is to have the new manager as independent from KWin core as possible. An rather important change for the handling of virtual desktops is that the count and the id of a desktop is now an unsinged integer instead of an integer. The reason for that is that we cannot have a negative count of desktops as well as it is not possible to be on a desktop with a negative identifier. In that regard it is important to remember that a Client can be on a desktop with a negative identifier. The special value for a Client being on all desktops is handled by using -1 as a desktop. For the time being this is not adjusted but instead of comparing the virtual desktop ids one should prefer to use the convenient methods like isOnDesktop and isOnAllDesktops. This would allow in future to internally change the representation for on all desktops.
35 lines
1.6 KiB
CMake
35 lines
1.6 KiB
CMake
set( testUpdateKWin49_SRCS test_update_kwin_49.cpp ../data/update_kwin_49.cpp ../tabbox/tabboxconfig.cpp )
|
|
kde4_add_unit_test( testUpdateKWin49 TESTNAME kwin-TestUpdateKWin49 ${testUpdateKWin49_SRCS} )
|
|
|
|
target_link_libraries( testUpdateKWin49 ${KDE4_KDECORE_LIBS} ${QT_QTTEST_LIBRARY} )
|
|
|
|
########################################################
|
|
# Test ScreenPaintData
|
|
########################################################
|
|
set( testScreenPaintData_SRCS test_screen_paint_data.cpp )
|
|
kde4_add_unit_test( testScreenPaintData TESTNAME kwin-TestScreenPaintData ${testScreenPaintData_SRCS} )
|
|
|
|
target_link_libraries( testScreenPaintData kwineffects ${QT_QTCORE_LIBRARY} ${QT_QTTEST_LIBRARY} )
|
|
|
|
########################################################
|
|
# Test WindowPaintData
|
|
########################################################
|
|
set( testWindowPaintData_SRCS test_window_paint_data.cpp )
|
|
kde4_add_unit_test( testWindowPaintData TESTNAME kwin-TestWindowPaintData ${testWindowPaintData_SRCS} )
|
|
|
|
target_link_libraries( testWindowPaintData kwineffects ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTTEST_LIBRARY} )
|
|
|
|
########################################################
|
|
# Test VirtualDesktopManager
|
|
########################################################
|
|
set( testVirtualDesktops_SRCS
|
|
test_virtual_desktops.cpp
|
|
../virtualdesktops.cpp
|
|
)
|
|
kde4_add_unit_test( testVirtualDesktops TESTNAME kwin-TestVirtualDesktops ${testVirtualDesktops_SRCS} )
|
|
|
|
target_link_libraries( testVirtualDesktops
|
|
${KDE4_KDEUI_LIBS}
|
|
${QT_QTCORE_LIBRARY}
|
|
${QT_QTTEST_LIBRARY}
|
|
)
|