1d71292e13
Summary: This call is added for the window rules kcm which has a detect functionality. As that detect functionality cannot query any Wayland windows we need to have some functionality in KWin core. Furthermore this allows to simplify the code in the kcm as all the custom X11 interaction can be removed. KWin internally has the functionality to find a window at a given position. From a security perspective adding this dbus method is fine as the user stays in control of the functionality. It requires active click to select a window. The new dbus call is already used in the rules kcm replacing the X11 based detect functionality. That a detect is now able to get information for both X11 and Wayland windows. So far only X11 windows on X11 were supported. So this fills an important gap in the Wayland offerings. It should now be possible to create rules for Wayland windows (though may not be fully functional). Test Plan: Run the kwin_rules_dialog and it detected the window correctly Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #plasma Differential Revision: https://phabricator.kde.org/D10490
62 lines
1.7 KiB
CMake
62 lines
1.7 KiB
CMake
# KI18N Translation Domain for this library
|
|
add_definitions(-DTRANSLATION_DOMAIN=\"kcmkwinrules\")
|
|
add_definitions(-DKCMRULES)
|
|
########### next target ###############
|
|
|
|
include_directories(../../)
|
|
set (kwinrules_MOC_HDRS yesnobox.h ../../client_machine.h ../../cursor.h ../../plugins/platforms/x11/standalone/x11cursor.h)
|
|
qt5_wrap_cpp(kwinrules_MOC_SRCS ${kwinrules_MOC_HDRS})
|
|
set(kwinrules_SRCS ruleswidget.cpp ruleslist.cpp kwinsrc.cpp detectwidget.cpp ${kwinrules_MOC_SRCS})
|
|
|
|
ki18n_wrap_ui(kwinrules_SRCS ruleslist.ui detectwidget.ui editshortcut.ui ruleswidgetbase.ui)
|
|
|
|
set(kwin_rules_dialog_KDEINIT_SRCS main.cpp ${kwinrules_SRCS})
|
|
|
|
kf5_add_kdeinit_executable( kwin_rules_dialog ${kwin_rules_dialog_KDEINIT_SRCS})
|
|
|
|
set(kwin_kcm_rules_XCB_LIBS
|
|
XCB::XCB
|
|
XCB::XFIXES
|
|
XCB::CURSOR
|
|
)
|
|
|
|
set(kcm_libs
|
|
Qt5::Concurrent
|
|
Qt5::X11Extras
|
|
KF5::Completion
|
|
KF5::ConfigWidgets
|
|
KF5::I18n
|
|
KF5::Service
|
|
KF5::WindowSystem
|
|
KF5::XmlGui
|
|
)
|
|
|
|
if(KWIN_BUILD_ACTIVITIES)
|
|
set(kcm_libs ${kcm_libs} KF5::Activities)
|
|
endif()
|
|
|
|
target_link_libraries(kdeinit_kwin_rules_dialog ${kcm_libs} ${kwin_kcm_rules_XCB_LIBS})
|
|
|
|
install(TARGETS kdeinit_kwin_rules_dialog ${INSTALL_TARGETS_DEFAULT_ARGS} )
|
|
install(TARGETS kwin_rules_dialog DESTINATION ${LIBEXEC_INSTALL_DIR} )
|
|
|
|
########### next target ###############
|
|
|
|
set(kcm_kwinrules_PART_SRCS kcm.cpp ${kwinrules_SRCS})
|
|
|
|
|
|
add_library(kcm_kwinrules MODULE ${kcm_kwinrules_PART_SRCS})
|
|
|
|
target_link_libraries(kcm_kwinrules ${kcm_libs} ${kwin_kcm_rules_XCB_LIBS})
|
|
|
|
install(TARGETS kcm_kwinrules DESTINATION ${PLUGIN_INSTALL_DIR} )
|
|
|
|
|
|
########### next target ###############
|
|
|
|
|
|
########### install files ###############
|
|
|
|
install( FILES kwinrules.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
|
|
|
|
|