eb78b1ca3a
Summary: There were several reasons to rewrite the Minimize Animation effect in JavaScript: to simplify code and to get rid of full repaints. One could say that nothing prevents us from calculating the dirty region in postPaintScreen or postPaintWindow and it is correct, but with the scripting effects API the dirty region will be calculated for us, so we can focus more on "what we want" instead of "how". Visually, the "old" effect and the rewritten one look quite the same. Except one tiny bit: if a window doesn't have an icon in the task manager, it won't be animated. The reason for that is the purpose of this effect is to show where the window will be after it's minimized, if the window doesn't have icon in the task manager, one can't click at the center of the screen to unminimize the window. There is one significant change, the name of the effect was changed to "Squash". If we put this effect and the Magic lamp effect under "Window Minimize Animation" category (or if we add some "heading" label), then the old name and the name of the category would "conflict". The new name was suggested by Nate Graham and it very closely describes what the effect does. "Scale" doesn't fit this effect because while a window is being animated, its aspect ratio is not preserved. Reviewers: #kwin, #plasma, davidedmundson Reviewed By: #kwin, #plasma, davidedmundson Subscribers: davidedmundson, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D16372
196 lines
5.6 KiB
CMake
196 lines
5.6 KiB
CMake
# KI18N Translation Domain for this library
|
|
add_definitions(-DTRANSLATION_DOMAIN=\"kwin_effects\" -DEFFECT_BUILTINS)
|
|
|
|
include_directories(${KWIN_SOURCE_DIR}) # for xcbutils.h
|
|
|
|
set(kwin_effect_OWN_LIBS
|
|
kwineffects
|
|
)
|
|
|
|
if( KWIN_HAVE_XRENDER_COMPOSITING )
|
|
set(kwin_effect_OWN_LIBS ${kwin_effect_OWN_LIBS} kwinxrenderutils)
|
|
endif()
|
|
|
|
set(kwin_effect_KDE_LIBS
|
|
KF5::ConfigGui
|
|
KF5::ConfigWidgets
|
|
KF5::GlobalAccel
|
|
KF5::I18n
|
|
KF5::WindowSystem
|
|
KF5::Plasma # screenedge effect
|
|
KF5::IconThemes
|
|
KF5::Service
|
|
KF5::Notifications # screenshot effect
|
|
)
|
|
|
|
set(kwin_effect_QT_LIBS
|
|
Qt5::Concurrent
|
|
Qt5::DBus
|
|
Qt5::Quick
|
|
Qt5::X11Extras
|
|
)
|
|
|
|
set(kwin_effect_XLIB_LIBS
|
|
${X11_X11_LIB}
|
|
)
|
|
|
|
set(kwin_effect_XCB_LIBS
|
|
XCB::XCB
|
|
XCB::IMAGE
|
|
XCB::XFIXES
|
|
)
|
|
|
|
if( KWIN_HAVE_XRENDER_COMPOSITING )
|
|
set(kwin_effect_XCB_LIBS ${kwin_effect_XCB_LIBS} XCB::RENDER)
|
|
endif()
|
|
|
|
set(kwin_effect_OWN_LIBS ${kwin_effect_OWN_LIBS} kwinglutils)
|
|
|
|
macro( KWIN4_ADD_EFFECT_BACKEND name )
|
|
add_library( ${name} SHARED ${ARGN} )
|
|
target_link_libraries( ${name} PRIVATE ${kwin_effect_OWN_LIBS} ${kwin_effect_KDE_LIBS} ${kwin_effect_QT_LIBS} ${kwin_effect_XLIB_LIBS} ${kwin_effect_XCB_LIBS})
|
|
endmacro()
|
|
|
|
# Adds effect plugin with given name. Sources are given after the name
|
|
macro( KWIN4_ADD_EFFECT name )
|
|
kwin4_add_effect_backend(kwin4_effect_${name} ${ARGN})
|
|
|
|
set_target_properties(kwin4_effect_${name} PROPERTIES VERSION 1.0.0 SOVERSION 1 )
|
|
set_target_properties(kwin4_effect_${name} PROPERTIES OUTPUT_NAME ${KWIN_NAME}4_effect_${name})
|
|
install(TARGETS kwin4_effect_${name} ${INSTALL_TARGETS_DEFAULT_ARGS} )
|
|
|
|
endmacro()
|
|
|
|
# Install the KWin/Effect service type
|
|
install( FILES kwineffect.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} )
|
|
|
|
# Create initial variables
|
|
set( kwin4_effect_include_directories )
|
|
|
|
set( kwin4_effect_builtins_sources
|
|
logging.cpp
|
|
effect_builtins.cpp
|
|
blur/blur.cpp
|
|
blur/blurshader.cpp
|
|
colorpicker/colorpicker.cpp
|
|
cube/cube.cpp
|
|
cube/cube_proxy.cpp
|
|
cubeslide/cubeslide.cpp
|
|
coverswitch/coverswitch.cpp
|
|
desktopgrid/desktopgrid.cpp
|
|
diminactive/diminactive.cpp
|
|
flipswitch/flipswitch.cpp
|
|
glide/glide.cpp
|
|
invert/invert.cpp
|
|
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
|
|
scale/scale.cpp
|
|
showfps/showfps.cpp
|
|
showpaint/showpaint.cpp
|
|
slide/slide.cpp
|
|
thumbnailaside/thumbnailaside.cpp
|
|
touchpoints/touchpoints.cpp
|
|
trackmouse/trackmouse.cpp
|
|
windowgeometry/windowgeometry.cpp
|
|
wobblywindows/wobblywindows.cpp
|
|
zoom/zoom.cpp
|
|
)
|
|
|
|
qt5_add_resources( kwin4_effect_builtins_sources shaders.qrc )
|
|
|
|
kconfig_add_kcfg_files(kwin4_effect_builtins_sources
|
|
blur/blurconfig.kcfgc
|
|
cube/cubeconfig.kcfgc
|
|
cubeslide/cubeslideconfig.kcfgc
|
|
coverswitch/coverswitchconfig.kcfgc
|
|
desktopgrid/desktopgridconfig.kcfgc
|
|
diminactive/diminactiveconfig.kcfgc
|
|
fallapart/fallapartconfig.kcfgc
|
|
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
|
|
scale/scaleconfig.kcfgc
|
|
showfps/showfpsconfig.kcfgc
|
|
slide/slideconfig.kcfgc
|
|
slidingpopups/slidingpopupsconfig.kcfgc
|
|
thumbnailaside/thumbnailasideconfig.kcfgc
|
|
trackmouse/trackmouseconfig.kcfgc
|
|
windowgeometry/windowgeometryconfig.kcfgc
|
|
wobblywindows/wobblywindowsconfig.kcfgc
|
|
zoom/zoomconfig.kcfgc
|
|
)
|
|
|
|
# scripted effects
|
|
add_subdirectory( dialogparent )
|
|
add_subdirectory( eyeonscreen )
|
|
add_subdirectory( fade )
|
|
add_subdirectory( fadedesktop )
|
|
add_subdirectory( frozenapp )
|
|
add_subdirectory( login )
|
|
add_subdirectory( logout )
|
|
add_subdirectory( maximize )
|
|
add_subdirectory( morphingpopups )
|
|
add_subdirectory( squash )
|
|
add_subdirectory( translucency )
|
|
add_subdirectory( windowaperture )
|
|
|
|
###############################################################################
|
|
# Built-in effects go here
|
|
|
|
# Common effects
|
|
add_subdirectory( desktopgrid )
|
|
add_subdirectory( diminactive )
|
|
include( dimscreen/CMakeLists.txt )
|
|
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 )
|
|
|
|
# OpenGL-specific effects
|
|
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 )
|
|
add_subdirectory( scale )
|
|
include( screenshot/CMakeLists.txt )
|
|
include( sheet/CMakeLists.txt )
|
|
include( snaphelper/CMakeLists.txt )
|
|
include( startupfeedback/CMakeLists.txt )
|
|
add_subdirectory( trackmouse )
|
|
add_subdirectory( wobblywindows )
|
|
|
|
###############################################################################
|
|
|
|
# Add the builtins plugin
|
|
kwin4_add_effect( builtins ${kwin4_effect_builtins_sources} )
|