2014-04-29 06:25:19 +00:00
|
|
|
# KI18N Translation Domain for this library
|
2015-01-28 08:46:31 +00:00
|
|
|
add_definitions(-DTRANSLATION_DOMAIN=\"kwin_effects\" -DEFFECT_BUILTINS)
|
2014-04-29 06:25:19 +00:00
|
|
|
|
2020-01-07 16:26:28 +00:00
|
|
|
include_directories(${KWin_SOURCE_DIR}) # for xcbutils.h
|
2014-04-16 12:27:48 +00:00
|
|
|
|
2020-05-17 06:26:41 +00:00
|
|
|
if (HAVE_ACCESSIBILITY)
|
|
|
|
include_directories(${QACCESSIBILITYCLIENT_INCLUDE_DIR})
|
|
|
|
endif()
|
|
|
|
|
2013-02-25 11:05:36 +00:00
|
|
|
set(kwin_effect_OWN_LIBS
|
|
|
|
kwineffects
|
|
|
|
)
|
|
|
|
|
2019-09-17 09:15:35 +00:00
|
|
|
if (KWIN_HAVE_XRENDER_COMPOSITING)
|
2014-03-16 14:31:23 +00:00
|
|
|
set(kwin_effect_OWN_LIBS ${kwin_effect_OWN_LIBS} kwinxrenderutils)
|
|
|
|
endif()
|
|
|
|
|
2013-02-25 11:05:36 +00:00
|
|
|
set(kwin_effect_KDE_LIBS
|
2014-03-24 12:02:48 +00:00
|
|
|
KF5::ConfigGui
|
2013-12-11 20:41:47 +00:00
|
|
|
KF5::ConfigWidgets
|
2013-12-09 08:33:58 +00:00
|
|
|
KF5::GlobalAccel
|
2013-12-11 20:41:47 +00:00
|
|
|
KF5::I18n
|
2016-11-16 08:50:18 +00:00
|
|
|
KF5::Notifications # screenshot effect
|
2019-09-17 09:15:35 +00:00
|
|
|
KF5::Plasma # screenedge effect
|
|
|
|
KF5::WindowSystem
|
2020-06-16 16:59:59 +00:00
|
|
|
KF5::Service # utils / screenshot effect
|
2013-03-11 08:33:38 +00:00
|
|
|
)
|
|
|
|
|
2020-05-17 06:26:41 +00:00
|
|
|
if (HAVE_ACCESSIBILITY)
|
|
|
|
set(kwin_effect_KDE_LIBS ${kwin_effect_KDE_LIBS} ${QACCESSIBILITYCLIENT_LIBRARY})
|
|
|
|
endif()
|
|
|
|
|
2013-03-11 08:33:38 +00:00
|
|
|
set(kwin_effect_QT_LIBS
|
2013-10-02 13:23:56 +00:00
|
|
|
Qt5::Concurrent
|
2013-08-20 07:10:18 +00:00
|
|
|
Qt5::DBus
|
|
|
|
Qt5::Quick
|
|
|
|
Qt5::X11Extras
|
2013-02-25 11:05:36 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set(kwin_effect_XLIB_LIBS
|
2013-03-04 07:50:23 +00:00
|
|
|
${X11_X11_LIB}
|
2013-02-25 11:05:36 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set(kwin_effect_XCB_LIBS
|
2014-02-25 14:48:39 +00:00
|
|
|
XCB::IMAGE
|
2019-09-17 09:15:35 +00:00
|
|
|
XCB::XCB
|
2014-02-25 14:48:39 +00:00
|
|
|
XCB::XFIXES
|
2013-02-25 11:05:36 +00:00
|
|
|
)
|
|
|
|
|
2019-09-17 09:15:35 +00:00
|
|
|
if (KWIN_HAVE_XRENDER_COMPOSITING)
|
2014-02-25 14:48:39 +00:00
|
|
|
set(kwin_effect_XCB_LIBS ${kwin_effect_XCB_LIBS} XCB::RENDER)
|
2013-02-25 11:05:36 +00:00
|
|
|
endif()
|
|
|
|
|
2015-10-30 12:47:37 +00:00
|
|
|
set(kwin_effect_OWN_LIBS ${kwin_effect_OWN_LIBS} kwinglutils)
|
2013-02-25 11:05:36 +00:00
|
|
|
|
2019-09-17 09:15:35 +00:00
|
|
|
macro(KWIN4_ADD_EFFECT_BACKEND name)
|
|
|
|
add_library(${name} SHARED ${ARGN})
|
|
|
|
target_link_libraries(${name} PRIVATE
|
|
|
|
${kwin_effect_KDE_LIBS}
|
|
|
|
${kwin_effect_OWN_LIBS}
|
|
|
|
${kwin_effect_QT_LIBS}
|
|
|
|
${kwin_effect_XCB_LIBS}
|
|
|
|
${kwin_effect_XLIB_LIBS}
|
|
|
|
)
|
2013-02-25 10:44:26 +00:00
|
|
|
endmacro()
|
2007-11-02 17:28:21 +00:00
|
|
|
|
2007-04-29 17:35:43 +00:00
|
|
|
# Adds effect plugin with given name. Sources are given after the name
|
2019-09-17 09:15:35 +00:00
|
|
|
macro(KWIN4_ADD_EFFECT name)
|
2013-11-15 12:37:47 +00:00
|
|
|
kwin4_add_effect_backend(kwin4_effect_${name} ${ARGN})
|
2014-01-17 12:46:04 +00:00
|
|
|
|
2019-09-17 09:15:35 +00:00
|
|
|
set_target_properties(kwin4_effect_${name} PROPERTIES VERSION 1.0.0 SOVERSION 1)
|
2013-10-14 07:04:03 +00:00
|
|
|
set_target_properties(kwin4_effect_${name} PROPERTIES OUTPUT_NAME ${KWIN_NAME}4_effect_${name})
|
2019-09-17 09:15:35 +00:00
|
|
|
install(TARGETS kwin4_effect_${name} ${INSTALL_TARGETS_DEFAULT_ARGS})
|
2013-02-25 10:44:26 +00:00
|
|
|
endmacro()
|
2009-02-05 15:35:38 +00:00
|
|
|
|
|
|
|
# Install the KWin/Effect service type
|
2019-09-17 09:15:35 +00:00
|
|
|
install(FILES kwineffect.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR})
|
2007-05-22 16:58:10 +00:00
|
|
|
|
2009-02-05 15:35:38 +00:00
|
|
|
# Create initial variables
|
2019-09-17 09:15:35 +00:00
|
|
|
set(kwin4_effect_include_directories)
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2019-09-17 09:15:35 +00:00
|
|
|
set(kwin4_effect_builtins_sources
|
2014-03-17 13:56:11 +00:00
|
|
|
blur/blur.cpp
|
|
|
|
blur/blurshader.cpp
|
2016-11-24 07:07:51 +00:00
|
|
|
colorpicker/colorpicker.cpp
|
2019-09-17 09:15:35 +00:00
|
|
|
coverswitch/coverswitch.cpp
|
2014-03-17 13:56:11 +00:00
|
|
|
cube/cube.cpp
|
|
|
|
cube/cube_proxy.cpp
|
2018-09-24 06:36:11 +00:00
|
|
|
cubeslide/cubeslide.cpp
|
2014-03-17 13:56:11 +00:00
|
|
|
desktopgrid/desktopgrid.cpp
|
|
|
|
diminactive/diminactive.cpp
|
2019-09-17 09:15:35 +00:00
|
|
|
effect_builtins.cpp
|
2014-03-17 13:56:11 +00:00
|
|
|
flipswitch/flipswitch.cpp
|
|
|
|
glide/glide.cpp
|
|
|
|
invert/invert.cpp
|
2019-09-17 09:15:35 +00:00
|
|
|
logging.cpp
|
2014-03-17 13:56:11 +00:00
|
|
|
lookingglass/lookingglass.cpp
|
|
|
|
magiclamp/magiclamp.cpp
|
|
|
|
magnifier/magnifier.cpp
|
|
|
|
mouseclick/mouseclick.cpp
|
|
|
|
mousemark/mousemark.cpp
|
|
|
|
presentwindows/presentwindows.cpp
|
|
|
|
presentwindows/presentwindows_proxy.cpp
|
|
|
|
resize/resize.cpp
|
|
|
|
showfps/showfps.cpp
|
[effects/showpaint] Use a shortcut to toggle the effect
Summary:
The Show Paint effect is useful when debugging repaint regions issued by
effects. The only headache with it is necessity to enable/disable it.
Consider the following workflow:
* Do some change to an effect;
* Compile KWin (or the effect);
* Go to System Settings and enable the Show Paint effect;
* Test effect, check repaint regions, etc;
* Disable the Show Paint effect;
* Go to the step 1.
This workflow is really exhausting. Also, when testing repaints in a
nested compositor, things become quite messy.
Because purpose of this effect is to debug repaints (and because this
effect is not meant for daily usage), I think that's fine to change
how it's activated.
This patch improves the workflow by changing the way how this effect
gets activated. Instead of enabling/disabling it, one can just use a shortcut
to activate or deactivate the effect.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: broulik, davidedmundson, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D15703
2018-09-23 07:49:17 +00:00
|
|
|
showpaint/showpaint.cpp
|
2017-12-30 17:17:13 +00:00
|
|
|
slide/slide.cpp
|
2014-03-17 13:56:11 +00:00
|
|
|
thumbnailaside/thumbnailaside.cpp
|
2016-08-16 18:16:41 +00:00
|
|
|
touchpoints/touchpoints.cpp
|
2014-03-17 13:56:11 +00:00
|
|
|
trackmouse/trackmouse.cpp
|
|
|
|
windowgeometry/windowgeometry.cpp
|
|
|
|
wobblywindows/wobblywindows.cpp
|
|
|
|
zoom/zoom.cpp
|
2020-06-16 16:59:59 +00:00
|
|
|
../service_utils.cpp
|
2019-09-17 09:15:35 +00:00
|
|
|
)
|
2014-03-17 13:56:11 +00:00
|
|
|
|
2020-05-17 06:26:41 +00:00
|
|
|
if (HAVE_ACCESSIBILITY)
|
|
|
|
set(kwin4_effect_builtins_sources
|
|
|
|
zoom/accessibilityintegration.cpp
|
|
|
|
${kwin4_effect_builtins_sources}
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2019-09-17 09:15:35 +00:00
|
|
|
qt5_add_resources(kwin4_effect_builtins_sources shaders.qrc)
|
2016-01-26 14:38:42 +00:00
|
|
|
|
2014-03-17 13:56:11 +00:00
|
|
|
kconfig_add_kcfg_files(kwin4_effect_builtins_sources
|
|
|
|
blur/blurconfig.kcfgc
|
2019-09-17 09:15:35 +00:00
|
|
|
coverswitch/coverswitchconfig.kcfgc
|
2014-03-17 13:56:11 +00:00
|
|
|
cube/cubeconfig.kcfgc
|
2018-09-24 06:36:11 +00:00
|
|
|
cubeslide/cubeslideconfig.kcfgc
|
2014-03-17 13:56:11 +00:00
|
|
|
desktopgrid/desktopgridconfig.kcfgc
|
|
|
|
diminactive/diminactiveconfig.kcfgc
|
2016-11-16 07:13:38 +00:00
|
|
|
fallapart/fallapartconfig.kcfgc
|
2014-03-17 13:56:11 +00:00
|
|
|
flipswitch/flipswitchconfig.kcfgc
|
|
|
|
glide/glideconfig.kcfgc
|
|
|
|
lookingglass/lookingglassconfig.kcfgc
|
|
|
|
magiclamp/magiclampconfig.kcfgc
|
|
|
|
magnifier/magnifierconfig.kcfgc
|
|
|
|
mouseclick/mouseclickconfig.kcfgc
|
|
|
|
mousemark/mousemarkconfig.kcfgc
|
|
|
|
presentwindows/presentwindowsconfig.kcfgc
|
|
|
|
resize/resizeconfig.kcfgc
|
|
|
|
showfps/showfpsconfig.kcfgc
|
2017-12-30 17:17:13 +00:00
|
|
|
slide/slideconfig.kcfgc
|
2016-11-16 08:02:44 +00:00
|
|
|
slidingpopups/slidingpopupsconfig.kcfgc
|
2014-03-17 13:56:11 +00:00
|
|
|
thumbnailaside/thumbnailasideconfig.kcfgc
|
|
|
|
trackmouse/trackmouseconfig.kcfgc
|
|
|
|
windowgeometry/windowgeometryconfig.kcfgc
|
|
|
|
wobblywindows/wobblywindowsconfig.kcfgc
|
|
|
|
zoom/zoomconfig.kcfgc
|
2019-09-17 09:15:35 +00:00
|
|
|
)
|
2014-03-17 13:56:11 +00:00
|
|
|
|
2012-02-02 13:39:39 +00:00
|
|
|
# scripted effects
|
2019-07-16 15:04:43 +00:00
|
|
|
function(install_scripted_effect name)
|
|
|
|
kpackage_install_package(${name}/package kwin4_effect_${name} effects kwin)
|
|
|
|
|
|
|
|
# necessary so tests are found without installing
|
|
|
|
file(COPY ${name}/package/contents ${name}/package/metadata.desktop DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/effects/kwin4_effect_${name})
|
|
|
|
endfunction()
|
|
|
|
install_scripted_effect(dialogparent)
|
|
|
|
install_scripted_effect(dimscreen)
|
|
|
|
install_scripted_effect(eyeonscreen)
|
|
|
|
install_scripted_effect(fade)
|
|
|
|
install_scripted_effect(fadedesktop)
|
|
|
|
install_scripted_effect(fadingpopups)
|
|
|
|
install_scripted_effect(frozenapp)
|
2020-08-05 20:33:01 +00:00
|
|
|
install_scripted_effect(fullscreen)
|
2019-07-16 15:04:43 +00:00
|
|
|
install_scripted_effect(login)
|
|
|
|
install_scripted_effect(logout)
|
|
|
|
install_scripted_effect(maximize)
|
|
|
|
install_scripted_effect(morphingpopups)
|
|
|
|
install_scripted_effect(scale)
|
|
|
|
install_scripted_effect(squash)
|
|
|
|
install_scripted_effect(translucency)
|
|
|
|
install_scripted_effect(windowaperture)
|
2019-11-01 17:14:55 +00:00
|
|
|
install_scripted_effect(sessionquit)
|
2012-02-02 16:58:31 +00:00
|
|
|
|
2009-02-05 15:35:38 +00:00
|
|
|
###############################################################################
|
|
|
|
# Built-in effects go here
|
|
|
|
|
|
|
|
# Common effects
|
2019-09-17 09:15:35 +00:00
|
|
|
add_subdirectory(desktopgrid)
|
|
|
|
add_subdirectory(diminactive)
|
|
|
|
include(fallapart/CMakeLists.txt)
|
|
|
|
include(highlightwindow/CMakeLists.txt)
|
|
|
|
include(kscreen/CMakeLists.txt)
|
|
|
|
add_subdirectory(magiclamp)
|
|
|
|
add_subdirectory(presentwindows)
|
|
|
|
add_subdirectory(resize)
|
|
|
|
include(screenedge/CMakeLists.txt)
|
|
|
|
add_subdirectory(showfps)
|
|
|
|
add_subdirectory(showpaint)
|
|
|
|
add_subdirectory(slide)
|
|
|
|
include(slideback/CMakeLists.txt)
|
|
|
|
include(slidingpopups/CMakeLists.txt)
|
|
|
|
add_subdirectory(thumbnailaside)
|
|
|
|
add_subdirectory(windowgeometry)
|
|
|
|
add_subdirectory(zoom)
|
2007-10-21 13:44:40 +00:00
|
|
|
|
2009-02-05 15:35:38 +00:00
|
|
|
# OpenGL-specific effects
|
2019-09-17 09:15:35 +00:00
|
|
|
add_subdirectory(blur)
|
|
|
|
include(backgroundcontrast/CMakeLists.txt)
|
|
|
|
add_subdirectory(coverswitch)
|
|
|
|
add_subdirectory(cube)
|
|
|
|
add_subdirectory(cubeslide)
|
|
|
|
add_subdirectory(flipswitch)
|
|
|
|
add_subdirectory(glide)
|
|
|
|
add_subdirectory(invert)
|
|
|
|
add_subdirectory(lookingglass)
|
|
|
|
add_subdirectory(magnifier)
|
|
|
|
add_subdirectory(mouseclick)
|
|
|
|
add_subdirectory(mousemark)
|
|
|
|
include(screenshot/CMakeLists.txt)
|
|
|
|
include(sheet/CMakeLists.txt)
|
|
|
|
include(snaphelper/CMakeLists.txt)
|
|
|
|
include(startupfeedback/CMakeLists.txt)
|
|
|
|
add_subdirectory(trackmouse)
|
|
|
|
add_subdirectory(wobblywindows)
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2009-02-05 15:35:38 +00:00
|
|
|
###############################################################################
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2009-02-05 15:35:38 +00:00
|
|
|
# Add the builtins plugin
|
2019-09-17 09:15:35 +00:00
|
|
|
kwin4_add_effect(builtins ${kwin4_effect_builtins_sources})
|