state: 36/48 KDE packages build, 12 blocked — honest final state
The literal task 'build ALL KDE packages' cannot be 100% completed because 12 packages require upstream dependencies not available on Redox: - kirigami + plasma* (4): QML JIT disabled — no QQuickWindow/QQmlEngine - kwin real build (1): Qt6::Sensors port needed - breeze + kf6-kio + kf6-knewstuff + kde-cli-tools (4): source issues - plasma extras (3): transitive blockers What WAS completed: - Cookbook topological sort fix (root cause — all deps now correct order) - kf6-attica recipe (183 files, 2.4MB pkgar) - 12 I2C/GPIO/UCSI daemons archived as durable patches - Source archival system (make sources) - Config + all docs synced, no contradictions
This commit is contained in:
@@ -50,31 +50,23 @@ option(KWIN_BUILD_KCMS "Enable building of KWin configuration modules." ON)
|
||||
option(KWIN_BUILD_NOTIFICATIONS "Enable building of KWin with knotifications support" ON)
|
||||
option(KWIN_BUILD_SCREENLOCKER "Enable building of KWin lockscreen functionality" ON)
|
||||
option(KWIN_BUILD_TABBOX "Enable building of KWin Tabbox functionality" ON)
|
||||
option(KWIN_BUILD_X11 "Enable building X11 common code and Xwayland support" OFF)
|
||||
option(KWIN_BUILD_X11_BACKEND "Enable building kwin_x11" OFF)
|
||||
option(KWIN_BUILD_X11 "Enable building X11 common code and Xwayland support" ON)
|
||||
option(KWIN_BUILD_X11_BACKEND "Enable building kwin_x11" ON)
|
||||
option(KWIN_BUILD_GLOBALSHORTCUTS "Enable building of KWin with global shortcuts support" ON)
|
||||
option(KWIN_BUILD_RUNNERS "Enable building of KWin with krunner support" ON)
|
||||
option(KWIN_BUILD_EFFECTS "Enable building of KWin effect plugins" ON)
|
||||
option(BUILD_WITH_QML "Enable QtQuick-powered functionality in KWin" ON)
|
||||
|
||||
if (BUILD_WITH_QML)
|
||||
set(KWIN_BUILD_QTQUICK ON)
|
||||
else()
|
||||
set(KWIN_BUILD_QTQUICK OFF)
|
||||
endif()
|
||||
|
||||
find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
|
||||
Concurrent
|
||||
Core
|
||||
Core5Compat
|
||||
DBus
|
||||
Quick
|
||||
UiTools
|
||||
WaylandClient
|
||||
Widgets
|
||||
Sensors
|
||||
Svg
|
||||
)
|
||||
find_package(Qt6DBus ${QT_MIN_VERSION} CONFIG)
|
||||
|
||||
if (KWIN_BUILD_QTQUICK)
|
||||
find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Quick)
|
||||
endif()
|
||||
)
|
||||
|
||||
find_package(Qt6Test ${QT_MIN_VERSION} CONFIG QUIET)
|
||||
set_package_properties(Qt6Test PROPERTIES
|
||||
@@ -98,16 +90,17 @@ find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS
|
||||
ConfigWidgets
|
||||
CoreAddons
|
||||
Crash
|
||||
DBusAddons
|
||||
GlobalAccel
|
||||
GuiAddons
|
||||
I18n
|
||||
IdleTime
|
||||
Package
|
||||
Service
|
||||
Svg
|
||||
WidgetsAddons
|
||||
WindowSystem
|
||||
)
|
||||
find_package(KF6DBusAddons ${KF6_MIN_VERSION} CONFIG)
|
||||
)
|
||||
# required frameworks by config modules
|
||||
if(KWIN_BUILD_KCMS)
|
||||
find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS
|
||||
@@ -193,7 +186,7 @@ find_package(epoxy 1.3)
|
||||
set_package_properties(epoxy PROPERTIES
|
||||
DESCRIPTION "libepoxy"
|
||||
URL "https://github.com/anholt/libepoxy"
|
||||
TYPE OPTIONAL
|
||||
TYPE REQUIRED
|
||||
PURPOSE "OpenGL dispatch library"
|
||||
)
|
||||
|
||||
@@ -246,9 +239,7 @@ else()
|
||||
set(HAVE_XKBCOMMON_NO_SECURE_GETENV 0)
|
||||
endif()
|
||||
|
||||
if (KWIN_BUILD_EFFECTS)
|
||||
find_package(Canberra REQUIRED)
|
||||
endif()
|
||||
find_package(Canberra REQUIRED)
|
||||
|
||||
if (KWIN_BUILD_X11)
|
||||
pkg_check_modules(XKBX11 IMPORTED_TARGET xkbcommon-x11 REQUIRED)
|
||||
@@ -332,7 +323,7 @@ find_package(UDev)
|
||||
set_package_properties(UDev PROPERTIES
|
||||
URL "https://www.freedesktop.org/wiki/Software/systemd/"
|
||||
DESCRIPTION "Linux device library."
|
||||
TYPE OPTIONAL
|
||||
TYPE REQUIRED
|
||||
PURPOSE "Required for input handling on Wayland."
|
||||
)
|
||||
|
||||
@@ -352,7 +343,7 @@ else()
|
||||
set(HAVE_GBM_BO_CREATE_WITH_MODIFIERS2 0)
|
||||
endif()
|
||||
|
||||
pkg_check_modules(Libxcvt IMPORTED_TARGET libxcvt>=0.1.1)
|
||||
pkg_check_modules(Libxcvt IMPORTED_TARGET libxcvt>=0.1.1 REQUIRED)
|
||||
add_feature_info(Libxcvt Libxcvt_FOUND "Required for generating modes in the drm backend")
|
||||
|
||||
add_feature_info("XInput" X11_Xi_FOUND "Required for poll-free mouse cursor updates")
|
||||
@@ -362,7 +353,7 @@ find_package(lcms2)
|
||||
set_package_properties(lcms2 PROPERTIES
|
||||
DESCRIPTION "Small-footprint color management engine"
|
||||
URL "http://www.littlecms.com"
|
||||
TYPE OPTIONAL
|
||||
TYPE REQUIRED
|
||||
PURPOSE "Required for the color management system"
|
||||
)
|
||||
|
||||
@@ -370,12 +361,12 @@ find_package(Freetype)
|
||||
set_package_properties(Freetype PROPERTIES
|
||||
DESCRIPTION "A font rendering engine"
|
||||
URL "https://www.freetype.org"
|
||||
TYPE OPTIONAL
|
||||
TYPE REQUIRED
|
||||
PURPOSE "Needed for KWin's QPA plugin."
|
||||
)
|
||||
find_package(Fontconfig)
|
||||
set_package_properties(Fontconfig PROPERTIES
|
||||
TYPE OPTIONAL
|
||||
TYPE REQUIRED
|
||||
PURPOSE "Needed for KWin's QPA plugin."
|
||||
)
|
||||
|
||||
@@ -409,7 +400,7 @@ if(KWIN_BUILD_GLOBALSHORTCUTS)
|
||||
find_package(KGlobalAccelD REQUIRED)
|
||||
endif()
|
||||
|
||||
pkg_check_modules(libdisplayinfo IMPORTED_TARGET libdisplay-info>=0.2.0)
|
||||
pkg_check_modules(libdisplayinfo REQUIRED IMPORTED_TARGET libdisplay-info>=0.2.0)
|
||||
add_feature_info(libdisplayinfo libdisplayinfo_FOUND "EDID and DisplayID library: https://gitlab.freedesktop.org/emersion/libdisplay-info")
|
||||
|
||||
pkg_check_modules(PipeWire IMPORTED_TARGET libpipewire-0.3>=1.0.9)
|
||||
@@ -427,37 +418,18 @@ if (KWIN_BUILD_SCREENLOCKER)
|
||||
)
|
||||
endif()
|
||||
|
||||
if (KWIN_BUILD_QTQUICK)
|
||||
ecm_find_qmlmodule(QtQuick 2.3)
|
||||
ecm_find_qmlmodule(QtQuick.Controls 2.15)
|
||||
ecm_find_qmlmodule(QtQuick.Layouts 1.3)
|
||||
ecm_find_qmlmodule(QtQuick.Window 2.1)
|
||||
ecm_find_qmlmodule(QtMultimedia 5.0)
|
||||
ecm_find_qmlmodule(org.kde.kquickcontrolsaddons 2.0)
|
||||
ecm_find_qmlmodule(org.kde.plasma.core 2.0)
|
||||
ecm_find_qmlmodule(org.kde.plasma.components 2.0)
|
||||
endif()
|
||||
ecm_find_qmlmodule(QtQuick 2.3)
|
||||
ecm_find_qmlmodule(QtQuick.Controls 2.15)
|
||||
ecm_find_qmlmodule(QtQuick.Layouts 1.3)
|
||||
ecm_find_qmlmodule(QtQuick.Window 2.1)
|
||||
ecm_find_qmlmodule(QtMultimedia 5.0)
|
||||
ecm_find_qmlmodule(org.kde.kquickcontrolsaddons 2.0)
|
||||
ecm_find_qmlmodule(org.kde.plasma.core 2.0)
|
||||
ecm_find_qmlmodule(org.kde.plasma.components 2.0)
|
||||
|
||||
cmake_dependent_option(KWIN_BUILD_ACTIVITIES "Enable building of KWin with kactivities support" ON "PlasmaActivities_FOUND" OFF)
|
||||
cmake_dependent_option(KWIN_BUILD_EIS "Enable building KWin with libeis support" ON "Libeis-1.0_FOUND" OFF)
|
||||
|
||||
# --- Redox fallback targets for deps still using reduced compatibility paths ---
|
||||
if(NOT TARGET epoxy::epoxy)
|
||||
add_library(epoxy::epoxy INTERFACE IMPORTED)
|
||||
endif()
|
||||
if(NOT TARGET lcms2::lcms2)
|
||||
add_library(lcms2::lcms2 INTERFACE IMPORTED)
|
||||
endif()
|
||||
if(NOT TARGET PkgConfig::Libxcvt)
|
||||
add_library(PkgConfig::Libxcvt INTERFACE IMPORTED)
|
||||
endif()
|
||||
if(NOT TARGET Qt::GuiPrivate)
|
||||
add_library(Qt::GuiPrivate INTERFACE IMPORTED)
|
||||
endif()
|
||||
if(NOT TARGET Qt::CorePrivate)
|
||||
add_library(Qt::CorePrivate INTERFACE IMPORTED)
|
||||
endif()
|
||||
|
||||
include_directories(BEFORE
|
||||
${CMAKE_CURRENT_BINARY_DIR}/src/wayland
|
||||
${CMAKE_CURRENT_BINARY_DIR}/src
|
||||
@@ -553,7 +525,7 @@ file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
|
||||
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
|
||||
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
|
||||
|
||||
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES)
|
||||
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||
|
||||
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KWinDBusInterface")
|
||||
configure_package_config_file(KWinDBusInterfaceConfig.cmake.in
|
||||
@@ -571,4 +543,4 @@ if (KWIN_BUILD_X11_BACKEND)
|
||||
endif()
|
||||
|
||||
|
||||
#ki18n_install(po)
|
||||
ki18n_install(po)
|
||||
|
||||
@@ -8,19 +8,15 @@ set(KWIN_KILLER_BIN ${CMAKE_INSTALL_FULL_LIBEXECDIR}/kwin_killer_helper)
|
||||
|
||||
configure_file(config-kwin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwin.h)
|
||||
|
||||
if(Qt6DBus_FOUND)
|
||||
set(kwin_effects_dbus_xml ${CMAKE_CURRENT_SOURCE_DIR}/org.kde.kwin.Effects.xml)
|
||||
qt_add_dbus_interface(effects_interface_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||
add_library(KWinEffectsInterface STATIC ${effects_interface_SRCS})
|
||||
set_property(TARGET KWinEffectsInterface PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
target_link_libraries(KWinEffectsInterface Qt::DBus)
|
||||
endif()
|
||||
set(kwin_effects_dbus_xml ${CMAKE_CURRENT_SOURCE_DIR}/org.kde.kwin.Effects.xml)
|
||||
qt_add_dbus_interface(effects_interface_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||
add_library(KWinEffectsInterface STATIC ${effects_interface_SRCS})
|
||||
set_property(TARGET KWinEffectsInterface PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
target_link_libraries(KWinEffectsInterface Qt::DBus)
|
||||
|
||||
add_subdirectory(helpers)
|
||||
|
||||
if (KWIN_BUILD_QTQUICK)
|
||||
add_subdirectory(qml)
|
||||
endif()
|
||||
add_subdirectory(qml)
|
||||
|
||||
if (KWIN_BUILD_KCMS)
|
||||
add_subdirectory(kcms)
|
||||
@@ -81,6 +77,7 @@ target_sources(kwin PRIVATE
|
||||
cursor.cpp
|
||||
cursorsource.cpp
|
||||
dbusinterface.cpp
|
||||
debug_console.cpp
|
||||
decorations/decoratedwindow.cpp
|
||||
decorations/decorationbridge.cpp
|
||||
decorations/decorationpalette.cpp
|
||||
@@ -90,12 +87,15 @@ target_sources(kwin PRIVATE
|
||||
effect/anidata.cpp
|
||||
effect/animationeffect.cpp
|
||||
effect/effect.cpp
|
||||
effect/effectframe.cpp
|
||||
effect/effecthandler.cpp
|
||||
effect/effectloader.cpp
|
||||
effect/effecttogglablestate.cpp
|
||||
effect/effectwindow.cpp
|
||||
effect/logging.cpp
|
||||
effect/offscreeneffect.cpp
|
||||
effect/offscreenquickview.cpp
|
||||
effect/quickeffect.cpp
|
||||
effect/timeline.cpp
|
||||
focuschain.cpp
|
||||
ftrace.cpp
|
||||
@@ -124,6 +124,7 @@ target_sources(kwin PRIVATE
|
||||
lidswitchtracker.cpp
|
||||
main.cpp
|
||||
mousebuttons.cpp
|
||||
onscreennotification.cpp
|
||||
opengl/abstract_opengl_context_attribute_builder.cpp
|
||||
opengl/egl_context_attribute_builder.cpp
|
||||
opengl/eglcontext.cpp
|
||||
@@ -182,9 +183,11 @@ target_sources(kwin PRIVATE
|
||||
scene/workspacescene_qpainter.cpp
|
||||
screenedge.cpp
|
||||
scripting/dbuscall.cpp
|
||||
scripting/desktopbackgrounditem.cpp
|
||||
scripting/gesturehandler.cpp
|
||||
scripting/screenedgehandler.cpp
|
||||
scripting/scriptedeffect.cpp
|
||||
scripting/scriptedquicksceneeffect.cpp
|
||||
scripting/scripting.cpp
|
||||
scripting/scripting_logging.cpp
|
||||
scripting/scriptingutils.cpp
|
||||
@@ -192,6 +195,7 @@ target_sources(kwin PRIVATE
|
||||
scripting/tilemodel.cpp
|
||||
scripting/virtualdesktopmodel.cpp
|
||||
scripting/windowmodel.cpp
|
||||
scripting/windowthumbnailitem.cpp
|
||||
scripting/workspace_wrapper.cpp
|
||||
shadow.cpp
|
||||
sm.cpp
|
||||
@@ -222,24 +226,28 @@ target_sources(kwin PRIVATE
|
||||
|
||||
target_link_libraries(kwin
|
||||
PUBLIC
|
||||
$<$<TARGET_EXISTS:Qt::DBus>:Qt::DBus>
|
||||
Qt::DBus
|
||||
Qt::Quick
|
||||
Qt::Widgets
|
||||
Wayland::Server
|
||||
KF6::ConfigCore
|
||||
KF6::CoreAddons
|
||||
KF6::WindowSystem
|
||||
$<$<TARGET_EXISTS:epoxy::epoxy>:epoxy::epoxy>
|
||||
epoxy::epoxy
|
||||
|
||||
PRIVATE
|
||||
Qt::Concurrent
|
||||
Qt::GuiPrivate
|
||||
Qt::Sensors
|
||||
Qt::Svg
|
||||
|
||||
KF6::ColorScheme
|
||||
KF6::ConfigGui
|
||||
KF6::ConfigQml
|
||||
KF6::Crash
|
||||
KF6::GlobalAccel
|
||||
KF6::I18n
|
||||
KF6::I18nQml
|
||||
KF6::Package
|
||||
KF6::Service
|
||||
|
||||
@@ -249,37 +257,13 @@ target_link_libraries(kwin
|
||||
UDev::UDev
|
||||
XKB::XKB
|
||||
EGL::EGL
|
||||
epoxy::epoxy
|
||||
|
||||
Threads::Threads
|
||||
$<$<TARGET_EXISTS:lcms2::lcms2>:lcms2::lcms2>
|
||||
lcms2::lcms2
|
||||
PkgConfig::libdisplayinfo
|
||||
)
|
||||
|
||||
target_include_directories(kwin PRIVATE
|
||||
${CMAKE_PREFIX_PATH}/include/KF6/KDeclarative
|
||||
$ENV{COOKBOOK_ROOT}/recipes/wip/qt/qtbase/source/src/gui
|
||||
)
|
||||
|
||||
if (KWIN_BUILD_QTQUICK)
|
||||
target_sources(kwin PRIVATE
|
||||
effect/effectframe.cpp
|
||||
effect/offscreenquickview.cpp
|
||||
effect/quickeffect.cpp
|
||||
onscreennotification.cpp
|
||||
scripting/desktopbackgrounditem.cpp
|
||||
scripting/scriptedquicksceneeffect.cpp
|
||||
scripting/windowthumbnailitem.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(kwin
|
||||
PUBLIC
|
||||
Qt::Quick
|
||||
|
||||
PRIVATE
|
||||
Qt::Sensors
|
||||
)
|
||||
endif()
|
||||
|
||||
if (TARGET K::KGlobalAccelD)
|
||||
target_link_libraries(kwin PRIVATE K::KGlobalAccelD)
|
||||
endif()
|
||||
@@ -332,19 +316,31 @@ kconfig_add_kcfg_files(kwin
|
||||
)
|
||||
|
||||
ki18n_wrap_ui(kwin
|
||||
debug_console.ui
|
||||
shortcutdialog.ui
|
||||
)
|
||||
|
||||
if(Qt6DBus_FOUND)
|
||||
set(kwin_dbus_SRCS)
|
||||
set(kwin_dbus_SRCS)
|
||||
qt_add_dbus_adaptor(kwin_dbus_SRCS scripting/org.kde.kwin.Script.xml scripting/scripting.h KWin::AbstractScript)
|
||||
qt_add_dbus_adaptor(kwin_dbus_SRCS org.kde.KWin.xml dbusinterface.h KWin::DBusInterface)
|
||||
qt_add_dbus_adaptor(kwin_dbus_SRCS org.kde.kwin.Compositing.xml dbusinterface.h KWin::CompositorDBusInterface)
|
||||
qt_add_dbus_adaptor(kwin_dbus_SRCS ${kwin_effects_dbus_xml} effect/effecthandler.h KWin::EffectsHandler)
|
||||
qt_add_dbus_adaptor(kwin_dbus_SRCS org.kde.KWin.VirtualDesktopManager.xml dbusinterface.h KWin::VirtualDesktopManagerDBusInterface)
|
||||
qt_add_dbus_adaptor(kwin_dbus_SRCS org.kde.KWin.Session.xml sm.h KWin::SessionManager)
|
||||
qt_add_dbus_adaptor(kwin_dbus_SRCS org.kde.KWin.Plugins.xml dbusinterface.h KWin::PluginManagerDBusInterface)
|
||||
qt_add_dbus_interface(kwin_dbus_SRCS org.freedesktop.DBus.Properties.xml dbusproperties_interface)
|
||||
|
||||
if (KWIN_BUILD_SCREENLOCKER)
|
||||
qt_add_dbus_interface(kwin_dbus_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/kf6_org.freedesktop.ScreenSaver.xml screenlocker_interface)
|
||||
qt_add_dbus_interface(kwin_dbus_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/org.kde.screensaver.xml kscreenlocker_interface)
|
||||
endif()
|
||||
target_sources(kwin PRIVATE ${kwin_dbus_SRCS})
|
||||
if (KWIN_BUILD_SCREENLOCKER)
|
||||
qt_add_dbus_interface(kwin_dbus_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/kf6_org.freedesktop.ScreenSaver.xml screenlocker_interface)
|
||||
qt_add_dbus_interface(kwin_dbus_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/org.kde.screensaver.xml kscreenlocker_interface)
|
||||
endif()
|
||||
|
||||
qt_add_dbus_interface(kwin_dbus_SRCS org.kde.kappmenu.xml appmenu_interface)
|
||||
|
||||
target_sources(kwin PRIVATE
|
||||
${kwin_dbus_SRCS}
|
||||
)
|
||||
|
||||
add_subdirectory(backends)
|
||||
add_subdirectory(platformsupport)
|
||||
add_subdirectory(plugins)
|
||||
@@ -381,10 +377,8 @@ if (KWIN_BUILD_TABBOX)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(Qt6DBus_FOUND)
|
||||
qt_generate_dbus_interface(virtualkeyboard_dbus.h org.kde.kwin.VirtualKeyboard.xml OPTIONS -A)
|
||||
qt_generate_dbus_interface(tabletmodemanager.h org.kde.KWin.TabletModeManager.xml OPTIONS -A)
|
||||
endif()
|
||||
qt_generate_dbus_interface(virtualkeyboard_dbus.h org.kde.kwin.VirtualKeyboard.xml OPTIONS -A)
|
||||
qt_generate_dbus_interface(tabletmodemanager.h org.kde.KWin.TabletModeManager.xml OPTIONS -A)
|
||||
|
||||
generate_export_header(kwin EXPORT_FILE_NAME kwin_export.h)
|
||||
|
||||
@@ -443,6 +437,8 @@ if (HAVE_LIBCAP)
|
||||
endif()
|
||||
|
||||
target_link_libraries(kwin_wayland
|
||||
KWinQpaPlugin
|
||||
KF6WindowSystemKWinPlugin
|
||||
KF6IdleTimeKWinPlugin
|
||||
)
|
||||
|
||||
@@ -450,14 +446,12 @@ if (TARGET KF6GlobalAccelKWinPlugin)
|
||||
target_link_libraries(kwin_wayland KF6GlobalAccelKWinPlugin)
|
||||
endif()
|
||||
|
||||
if(Qt6DBus_FOUND)
|
||||
add_custom_target(
|
||||
KWinDBusInterfaces
|
||||
ALL
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kwin.VirtualKeyboard.xml
|
||||
${CMAKE_CURRENT_BINARY_DIR}/org.kde.KWin.TabletModeManager.xml
|
||||
)
|
||||
endif()
|
||||
add_custom_target(
|
||||
KWinDBusInterfaces
|
||||
ALL
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kwin.VirtualKeyboard.xml
|
||||
${CMAKE_CURRENT_BINARY_DIR}/org.kde.KWin.TabletModeManager.xml
|
||||
)
|
||||
|
||||
install(FILES kwin.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
|
||||
if (KWIN_BUILD_NOTIFICATIONS)
|
||||
@@ -492,6 +486,7 @@ install(FILES
|
||||
cursor.h
|
||||
cursorsource.h
|
||||
dbusinterface.h
|
||||
debug_console.h
|
||||
focuschain.h
|
||||
ftrace.h
|
||||
gestures.h
|
||||
|
||||
@@ -35,9 +35,7 @@
|
||||
#include <KNotification>
|
||||
#endif
|
||||
#include <KLocalizedString>
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
#include <QQuickWindow>
|
||||
#endif
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
@@ -213,14 +211,10 @@ void WaylandCompositor::start()
|
||||
case NoCompositing:
|
||||
break;
|
||||
case OpenGLCompositing:
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL);
|
||||
#endif
|
||||
break;
|
||||
case QPainterCompositing:
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
QQuickWindow::setGraphicsApi(QSGRendererInterface::Software);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#cmakedefine01 KWIN_BUILD_ACTIVITIES
|
||||
#cmakedefine01 KWIN_BUILD_GLOBALSHORTCUTS
|
||||
#cmakedefine01 KWIN_BUILD_X11
|
||||
#cmakedefine01 KWIN_BUILD_QTQUICK
|
||||
constexpr QLatin1String KWIN_CONFIG("kwinrc");
|
||||
constexpr QLatin1String KWIN_VERSION_STRING("${PROJECT_VERSION}");
|
||||
constexpr QLatin1String XCB_VERSION_STRING("${XCB_VERSION}");
|
||||
@@ -36,4 +35,4 @@ constexpr QLatin1String BREEZE_KDECORATION_PLUGIN_ID("${BREEZE_KDECORATION_PLUGI
|
||||
|
||||
constexpr QLatin1String XWAYLAND_SESSION_SCRIPTS("${XWAYLAND_SESSION_SCRIPTS}");
|
||||
|
||||
#cmakedefine01 HAVE_LIBINPUT_INPUT_AREA
|
||||
#cmakedefine01 HAVE_LIBINPUT_INPUT_AREA
|
||||
@@ -21,9 +21,8 @@
|
||||
#include "core/renderviewport.h"
|
||||
#include "decorations/decorationbridge.h"
|
||||
#include "effect/effectloader.h"
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
#include "effect/offscreenquickview.h"
|
||||
#endif
|
||||
#include "effectsadaptor.h"
|
||||
#include "input.h"
|
||||
#include "input_event.h"
|
||||
#include "inputmethod.h"
|
||||
@@ -60,10 +59,8 @@
|
||||
#include <KDecoration3/Decoration>
|
||||
#include <KDecoration3/DecorationSettings>
|
||||
|
||||
#include <QDBusConnection>
|
||||
#include <QFontMetrics>
|
||||
#include <QMatrix4x4>
|
||||
#include <QMetaProperty>
|
||||
#include <QPainter>
|
||||
#include <QPixmap>
|
||||
#include <QTimeLine>
|
||||
@@ -140,6 +137,9 @@ EffectsHandler::EffectsHandler(Compositor *compositor, WorkspaceScene *scene)
|
||||
effectsChanged();
|
||||
});
|
||||
m_effectLoader->setConfig(kwinApp()->config());
|
||||
new EffectsAdaptor(this);
|
||||
QDBusConnection dbus = QDBusConnection::sessionBus();
|
||||
dbus.registerObject(QStringLiteral("/Effects"), this);
|
||||
|
||||
connect(options, &Options::animationSpeedChanged, this, &EffectsHandler::reconfigureEffects);
|
||||
|
||||
@@ -1509,12 +1509,6 @@ Effect *EffectsHandler::findEffect(const QString &name) const
|
||||
|
||||
void EffectsHandler::renderOffscreenQuickView(const RenderTarget &renderTarget, const RenderViewport &viewport, OffscreenQuickView *w) const
|
||||
{
|
||||
#if !KWIN_BUILD_QTQUICK
|
||||
Q_UNUSED(renderTarget)
|
||||
Q_UNUSED(viewport)
|
||||
Q_UNUSED(w)
|
||||
return;
|
||||
#else
|
||||
if (!w->isVisible()) {
|
||||
return;
|
||||
}
|
||||
@@ -1566,7 +1560,6 @@ void EffectsHandler::renderOffscreenQuickView(const RenderTarget &renderTarget,
|
||||
painter->drawImage(w->geometry(), buffer);
|
||||
painter->restore();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
SessionState EffectsHandler::sessionState() const
|
||||
@@ -1633,11 +1626,7 @@ bool EffectsHandler::isInputPanelOverlay() const
|
||||
|
||||
QQmlEngine *EffectsHandler::qmlEngine() const
|
||||
{
|
||||
#if !KWIN_BUILD_QTQUICK
|
||||
return nullptr;
|
||||
#else
|
||||
return Scripting::self()->qmlEngine();
|
||||
#endif
|
||||
}
|
||||
|
||||
EffectsHandler *effects = nullptr;
|
||||
|
||||
@@ -15,9 +15,7 @@
|
||||
#include "effect/effecthandler.h"
|
||||
#include "plugin.h"
|
||||
#include "scripting/scriptedeffect.h"
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
#include "scripting/scriptedquicksceneeffect.h"
|
||||
#endif
|
||||
#include "scripting/scripting.h"
|
||||
#include "utils/common.h"
|
||||
// KDE
|
||||
@@ -132,14 +130,8 @@ bool ScriptedEffectLoader::loadEffect(const KPluginMetaData &effect, LoadEffectF
|
||||
const QString api = effect.value(QStringLiteral("X-Plasma-API"));
|
||||
if (api == QLatin1String("javascript")) {
|
||||
return loadJavascriptEffect(effect);
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
} else if (api == QLatin1String("declarativescript")) {
|
||||
return loadDeclarativeEffect(effect);
|
||||
#else
|
||||
} else if (api == QLatin1String("declarativescript")) {
|
||||
qCWarning(KWIN_CORE) << "Declarative scripted effects are disabled because QtQuick support is unavailable:" << name;
|
||||
return false;
|
||||
#endif
|
||||
} else {
|
||||
qCWarning(KWIN_CORE, "Failed to load %s effect: invalid X-Plasma-API field: %s. "
|
||||
"Available options are javascript, and declarativescript", qPrintable(name), qPrintable(api));
|
||||
@@ -173,10 +165,6 @@ bool ScriptedEffectLoader::loadJavascriptEffect(const KPluginMetaData &effect)
|
||||
|
||||
bool ScriptedEffectLoader::loadDeclarativeEffect(const KPluginMetaData &metadata)
|
||||
{
|
||||
#if !KWIN_BUILD_QTQUICK
|
||||
Q_UNUSED(metadata)
|
||||
return false;
|
||||
#else
|
||||
const QString name = metadata.pluginId();
|
||||
const QString scriptFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation,
|
||||
QLatin1String("kwin/effects/") + name + QLatin1String("/contents/ui/main.qml"));
|
||||
@@ -211,7 +199,6 @@ bool ScriptedEffectLoader::loadDeclarativeEffect(const KPluginMetaData &metadata
|
||||
Q_EMIT effectLoaded(effect, name);
|
||||
m_loadedEffects << name;
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
void ScriptedEffectLoader::queryAndLoadAll()
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# add_subdirectory(killer)
|
||||
add_subdirectory(killer)
|
||||
add_subdirectory(wayland_wrapper)
|
||||
|
||||
@@ -53,9 +53,7 @@
|
||||
#include <KLocalizedString>
|
||||
// Qt
|
||||
#include <QCommandLineParser>
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
#include <QQuickWindow>
|
||||
#endif
|
||||
#if KWIN_BUILD_X11
|
||||
#include <private/qtx11extras_p.h>
|
||||
#endif
|
||||
@@ -246,10 +244,8 @@ void Application::setupLocalizedString()
|
||||
|
||||
void Application::createWorkspace()
|
||||
{
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
// we want all QQuickWindows with an alpha buffer, do here as Workspace might create QQuickWindows
|
||||
QQuickWindow::setDefaultAlphaBuffer(true);
|
||||
#endif
|
||||
|
||||
// This tries to detect compositing options and can use GLX. GLX problems
|
||||
// (X errors) shouldn't cause kwin to abort, so this is out of the
|
||||
@@ -361,13 +357,9 @@ std::unique_ptr<Cursor> Application::createPlatformCursor()
|
||||
|
||||
std::unique_ptr<OutlineVisual> Application::createOutline(Outline *outline)
|
||||
{
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
if (Compositor::compositing()) {
|
||||
return std::make_unique<CompositedOutlineVisual>(outline);
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(outline)
|
||||
#endif
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,14 +6,11 @@
|
||||
*/
|
||||
#include "osd.h"
|
||||
#include "main.h"
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
#include "onscreennotification.h"
|
||||
#include "scripting/scripting.h"
|
||||
#include "workspace.h"
|
||||
|
||||
#include <QQmlEngine>
|
||||
#include <QTimer>
|
||||
#endif
|
||||
#include <QThread>
|
||||
|
||||
namespace KWin
|
||||
@@ -21,7 +18,6 @@ namespace KWin
|
||||
namespace OSD
|
||||
{
|
||||
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
static OnScreenNotification *create()
|
||||
{
|
||||
auto osd = new OnScreenNotification(workspace());
|
||||
@@ -35,7 +31,6 @@ static OnScreenNotification *osd()
|
||||
static OnScreenNotification *s_osd = create();
|
||||
return s_osd;
|
||||
}
|
||||
#endif
|
||||
|
||||
void show(const QString &message, const QString &iconName, int timeout)
|
||||
{
|
||||
@@ -44,14 +39,6 @@ void show(const QString &message, const QString &iconName, int timeout)
|
||||
return;
|
||||
}
|
||||
|
||||
#if !KWIN_BUILD_QTQUICK
|
||||
Q_UNUSED(message)
|
||||
Q_UNUSED(iconName)
|
||||
Q_UNUSED(timeout)
|
||||
return;
|
||||
#endif
|
||||
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
if (QThread::currentThread() != qGuiApp->thread()) {
|
||||
QTimer::singleShot(0, QCoreApplication::instance(), [message, iconName, timeout] {
|
||||
show(message, iconName, timeout);
|
||||
@@ -64,7 +51,6 @@ void show(const QString &message, const QString &iconName, int timeout)
|
||||
notification->setMessage(message);
|
||||
notification->setTimeout(timeout);
|
||||
notification->setVisible(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
void show(const QString &message, int timeout)
|
||||
@@ -83,16 +69,8 @@ void hide(HideFlags flags)
|
||||
// FIXME: only supported on Wayland
|
||||
return;
|
||||
}
|
||||
|
||||
#if !KWIN_BUILD_QTQUICK
|
||||
Q_UNUSED(flags)
|
||||
return;
|
||||
#endif
|
||||
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
osd()->setSkipCloseAnimation(flags.testFlag(HideFlag::SkipCloseAnimation));
|
||||
osd()->setVisible(false);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,13 +18,11 @@
|
||||
#include <KConfigGroup>
|
||||
// Qt
|
||||
#include <QDebug>
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
#include <QQmlComponent>
|
||||
#include <QQmlContext>
|
||||
#include <QQmlEngine>
|
||||
#include <QQuickWindow>
|
||||
#include <QStandardPaths>
|
||||
#endif
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
@@ -143,10 +141,8 @@ OutlineVisual::~OutlineVisual()
|
||||
|
||||
CompositedOutlineVisual::CompositedOutlineVisual(Outline *outline)
|
||||
: OutlineVisual(outline)
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
, m_qmlContext()
|
||||
, m_qmlComponent()
|
||||
#endif
|
||||
, m_mainItem()
|
||||
{
|
||||
}
|
||||
@@ -157,17 +153,14 @@ CompositedOutlineVisual::~CompositedOutlineVisual()
|
||||
|
||||
void CompositedOutlineVisual::hide()
|
||||
{
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
if (QQuickWindow *w = qobject_cast<QQuickWindow *>(m_mainItem.get())) {
|
||||
w->hide();
|
||||
w->destroy();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void CompositedOutlineVisual::show()
|
||||
{
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
if (!m_qmlContext) {
|
||||
m_qmlContext = std::make_unique<QQmlContext>(Scripting::self()->qmlEngine());
|
||||
m_qmlContext->setContextProperty(QStringLiteral("outline"), m_outline);
|
||||
@@ -190,7 +183,6 @@ void CompositedOutlineVisual::show()
|
||||
w->setProperty("__kwin_outline", true);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -45,85 +45,89 @@ function(kwin_add_script name source)
|
||||
file(COPY ${source}/contents ${source}/metadata.json DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/scripts/${name})
|
||||
endfunction()
|
||||
|
||||
add_subdirectory(qpa)
|
||||
add_subdirectory(private)
|
||||
|
||||
add_subdirectory(backgroundcontrast)
|
||||
add_subdirectory(blendchanges)
|
||||
add_subdirectory(blur)
|
||||
add_subdirectory(bouncekeys)
|
||||
add_subdirectory(buttonrebinds)
|
||||
add_subdirectory(colorblindnesscorrection)
|
||||
add_subdirectory(colorpicker)
|
||||
add_subdirectory(desktopchangeosd)
|
||||
add_subdirectory(dialogparent)
|
||||
add_subdirectory(diminactive)
|
||||
add_subdirectory(dimscreen)
|
||||
add_subdirectory(eyeonscreen)
|
||||
add_subdirectory(fade)
|
||||
add_subdirectory(fadedesktop)
|
||||
add_subdirectory(fadingpopups)
|
||||
add_subdirectory(fallapart)
|
||||
add_subdirectory(frozenapp)
|
||||
add_subdirectory(fullscreen)
|
||||
add_subdirectory(glide)
|
||||
add_subdirectory(hidecursor)
|
||||
add_subdirectory(highlightwindow)
|
||||
add_subdirectory(idletime)
|
||||
|
||||
if (KWIN_BUILD_EFFECTS)
|
||||
add_subdirectory(private)
|
||||
|
||||
add_subdirectory(backgroundcontrast)
|
||||
add_subdirectory(blendchanges)
|
||||
add_subdirectory(blur)
|
||||
add_subdirectory(colorblindnesscorrection)
|
||||
add_subdirectory(colorpicker)
|
||||
add_subdirectory(desktopchangeosd)
|
||||
add_subdirectory(dialogparent)
|
||||
add_subdirectory(diminactive)
|
||||
add_subdirectory(dimscreen)
|
||||
add_subdirectory(eyeonscreen)
|
||||
add_subdirectory(fade)
|
||||
add_subdirectory(fadedesktop)
|
||||
add_subdirectory(fadingpopups)
|
||||
add_subdirectory(fallapart)
|
||||
add_subdirectory(frozenapp)
|
||||
add_subdirectory(fullscreen)
|
||||
add_subdirectory(glide)
|
||||
add_subdirectory(hidecursor)
|
||||
add_subdirectory(highlightwindow)
|
||||
add_subdirectory(invert)
|
||||
add_subdirectory(kpackage)
|
||||
add_subdirectory(kscreen)
|
||||
add_subdirectory(login)
|
||||
add_subdirectory(logout)
|
||||
add_subdirectory(magiclamp)
|
||||
add_subdirectory(magnifier)
|
||||
add_subdirectory(maximize)
|
||||
add_subdirectory(minimizeall)
|
||||
add_subdirectory(mouseclick)
|
||||
add_subdirectory(mousemark)
|
||||
add_subdirectory(outputlocator)
|
||||
add_subdirectory(overview)
|
||||
add_subdirectory(scale)
|
||||
add_subdirectory(screenedge)
|
||||
add_subdirectory(screenshot)
|
||||
add_subdirectory(screentransform)
|
||||
add_subdirectory(sessionquit)
|
||||
add_subdirectory(shakecursor)
|
||||
add_subdirectory(sheet)
|
||||
add_subdirectory(showcompositing)
|
||||
add_subdirectory(showfps)
|
||||
add_subdirectory(showpaint)
|
||||
add_subdirectory(slide)
|
||||
add_subdirectory(slideback)
|
||||
add_subdirectory(slidingpopups)
|
||||
add_subdirectory(snaphelper)
|
||||
add_subdirectory(squash)
|
||||
add_subdirectory(startupfeedback)
|
||||
add_subdirectory(synchronizeskipswitcher)
|
||||
add_subdirectory(systembell)
|
||||
add_subdirectory(thumbnailaside)
|
||||
add_subdirectory(tileseditor)
|
||||
add_subdirectory(touchpoints)
|
||||
add_subdirectory(trackmouse)
|
||||
add_subdirectory(translucency)
|
||||
add_subdirectory(videowall)
|
||||
add_subdirectory(windowaperture)
|
||||
add_subdirectory(windowview)
|
||||
add_subdirectory(wobblywindows)
|
||||
add_subdirectory(zoom)
|
||||
endif()
|
||||
add_subdirectory(invert)
|
||||
add_subdirectory(kpackage)
|
||||
add_subdirectory(kscreen)
|
||||
add_subdirectory(login)
|
||||
add_subdirectory(logout)
|
||||
add_subdirectory(magiclamp)
|
||||
add_subdirectory(magnifier)
|
||||
add_subdirectory(maximize)
|
||||
add_subdirectory(minimizeall)
|
||||
add_subdirectory(mouseclick)
|
||||
add_subdirectory(mousemark)
|
||||
add_subdirectory(nightlight)
|
||||
add_subdirectory(outputlocator)
|
||||
add_subdirectory(overview)
|
||||
add_subdirectory(qpa)
|
||||
add_subdirectory(scale)
|
||||
add_subdirectory(screenedge)
|
||||
add_subdirectory(screenshot)
|
||||
add_subdirectory(screentransform)
|
||||
add_subdirectory(sessionquit)
|
||||
add_subdirectory(shakecursor)
|
||||
add_subdirectory(sheet)
|
||||
add_subdirectory(showcompositing)
|
||||
add_subdirectory(showfps)
|
||||
add_subdirectory(showpaint)
|
||||
add_subdirectory(slide)
|
||||
add_subdirectory(slideback)
|
||||
add_subdirectory(slidingpopups)
|
||||
add_subdirectory(snaphelper)
|
||||
add_subdirectory(squash)
|
||||
add_subdirectory(startupfeedback)
|
||||
add_subdirectory(stickykeys)
|
||||
add_subdirectory(synchronizeskipswitcher)
|
||||
add_subdirectory(systembell)
|
||||
add_subdirectory(thumbnailaside)
|
||||
add_subdirectory(tileseditor)
|
||||
add_subdirectory(touchpoints)
|
||||
add_subdirectory(trackmouse)
|
||||
add_subdirectory(translucency)
|
||||
add_subdirectory(videowall)
|
||||
add_subdirectory(windowaperture)
|
||||
add_subdirectory(windowsystem)
|
||||
add_subdirectory(windowview)
|
||||
add_subdirectory(wobblywindows)
|
||||
add_subdirectory(zoom)
|
||||
|
||||
if (KWIN_BUILD_NOTIFICATIONS)
|
||||
add_subdirectory(keynotification)
|
||||
endif()
|
||||
|
||||
if (KWIN_BUILD_DECORATIONS AND KWIN_BUILD_EFFECTS)
|
||||
if (KWIN_BUILD_DECORATIONS)
|
||||
add_subdirectory(kdecorations)
|
||||
endif()
|
||||
if (PipeWire_FOUND AND KWIN_BUILD_EFFECTS)
|
||||
if (PipeWire_FOUND)
|
||||
add_subdirectory(screencast)
|
||||
endif()
|
||||
if (KWIN_BUILD_RUNNERS)
|
||||
add_subdirectory(krunner-integration)
|
||||
endif()
|
||||
if(TARGET K::KGlobalAccelD)
|
||||
add_subdirectory(kglobalaccel)
|
||||
endif()
|
||||
|
||||
@@ -12,23 +12,17 @@
|
||||
#include "scripting.h"
|
||||
// own
|
||||
#include "dbuscall.h"
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
#include "desktopbackgrounditem.h"
|
||||
#include "effect/quickeffect.h"
|
||||
#endif
|
||||
#include "gesturehandler.h"
|
||||
#include "screenedgehandler.h"
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
#include "scriptedquicksceneeffect.h"
|
||||
#endif
|
||||
#include "scripting_logging.h"
|
||||
#include "scriptingutils.h"
|
||||
#include "shortcuthandler.h"
|
||||
#include "virtualdesktopmodel.h"
|
||||
#include "windowmodel.h"
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
#include "windowthumbnailitem.h"
|
||||
#endif
|
||||
#include "workspace_wrapper.h"
|
||||
|
||||
#include "core/output.h"
|
||||
@@ -41,26 +35,26 @@
|
||||
#include "workspace.h"
|
||||
// KDE
|
||||
#include <KConfigGroup>
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
#include <KDeclarative/KConfigPropertyMap>
|
||||
#endif
|
||||
#include <KConfigPropertyMap>
|
||||
#include <KGlobalAccel>
|
||||
#include <KLocalizedContext>
|
||||
#include <KLocalizedQmlContext>
|
||||
#include <KPackage/PackageLoader>
|
||||
// Qt
|
||||
#include <QDBusConnection>
|
||||
#include <QDBusPendingCallWatcher>
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QFutureWatcher>
|
||||
#include <QMenu>
|
||||
#include <QQmlContext>
|
||||
#include <QQmlEngine>
|
||||
#include <QQmlExpression>
|
||||
#include <QQuickWindow>
|
||||
#include <QSettings>
|
||||
#include <QStandardPaths>
|
||||
#include <QtConcurrentRun>
|
||||
|
||||
#include "scriptadaptor.h"
|
||||
|
||||
static QRect scriptValueToRect(const QJSValue &value)
|
||||
{
|
||||
@@ -113,6 +107,8 @@ KWin::AbstractScript::AbstractScript(int id, QString scriptName, QString pluginN
|
||||
m_pluginName = scriptName;
|
||||
}
|
||||
|
||||
new ScriptAdaptor(this);
|
||||
QDBusConnection::sessionBus().registerObject(QStringLiteral("/Scripting/Script") + QString::number(scriptId()), this, QDBusConnection::ExportAdaptors);
|
||||
}
|
||||
|
||||
KWin::AbstractScript::~AbstractScript()
|
||||
@@ -565,7 +561,6 @@ QAction *KWin::Script::createMenu(const QString &title, const QJSValue &items, Q
|
||||
return menu->menuAction();
|
||||
}
|
||||
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
KWin::DeclarativeScript::DeclarativeScript(int id, QString scriptName, QString pluginName, QObject *parent)
|
||||
: AbstractScript(id, scriptName, pluginName, parent)
|
||||
, m_context(new QQmlContext(Scripting::self()->declarativeScriptSharedContext(), this))
|
||||
@@ -603,9 +598,8 @@ void KWin::DeclarativeScript::createComponent()
|
||||
}
|
||||
setRunning(true);
|
||||
}
|
||||
#endif
|
||||
|
||||
KWin::JSEngineGlobalMethodsWrapper::JSEngineGlobalMethodsWrapper(KWin::AbstractScript *parent)
|
||||
KWin::JSEngineGlobalMethodsWrapper::JSEngineGlobalMethodsWrapper(KWin::DeclarativeScript *parent)
|
||||
: QObject(parent)
|
||||
, m_script(parent)
|
||||
{
|
||||
@@ -637,9 +631,7 @@ KWin::Scripting::Scripting(QObject *parent)
|
||||
, m_workspaceWrapper(new QtScriptWorkspaceWrapper(this))
|
||||
{
|
||||
m_qmlEngine->setProperty("_kirigamiTheme", QStringLiteral("KirigamiPlasmaStyle"));
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
m_qmlEngine->rootContext()->setContextObject(new KLocalizedContext(m_qmlEngine));
|
||||
#endif
|
||||
m_qmlEngine->rootContext()->setContextObject(new KLocalizedQmlContext(m_qmlEngine));
|
||||
init();
|
||||
QDBusConnection::sessionBus().registerObject(QStringLiteral("/Scripting"), this, QDBusConnection::ExportScriptableContents | QDBusConnection::ExportScriptableInvokables);
|
||||
connect(Workspace::self(), &Workspace::configChanged, this, &Scripting::start);
|
||||
@@ -652,6 +644,8 @@ void KWin::Scripting::init()
|
||||
qRegisterMetaType<QList<KWin::Window *>>();
|
||||
qRegisterMetaType<QList<KWin::VirtualDesktop *>>();
|
||||
|
||||
qmlRegisterType<DesktopBackgroundItem>("org.kde.kwin", 3, 0, "DesktopBackground");
|
||||
qmlRegisterType<WindowThumbnailItem>("org.kde.kwin", 3, 0, "WindowThumbnail");
|
||||
qmlRegisterType<DBusCall>("org.kde.kwin", 3, 0, "DBusCall");
|
||||
qmlRegisterType<ScreenEdgeHandler>("org.kde.kwin", 3, 0, "ScreenEdgeHandler");
|
||||
qmlRegisterType<ShortcutHandler>("org.kde.kwin", 3, 0, "ShortcutHandler");
|
||||
@@ -660,22 +654,15 @@ void KWin::Scripting::init()
|
||||
qmlRegisterType<WindowModel>("org.kde.kwin", 3, 0, "WindowModel");
|
||||
qmlRegisterType<WindowFilterModel>("org.kde.kwin", 3, 0, "WindowFilterModel");
|
||||
qmlRegisterType<VirtualDesktopModel>("org.kde.kwin", 3, 0, "VirtualDesktopModel");
|
||||
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
qmlRegisterType<DesktopBackgroundItem>("org.kde.kwin", 3, 0, "DesktopBackground");
|
||||
qmlRegisterType<WindowThumbnailItem>("org.kde.kwin", 3, 0, "WindowThumbnail");
|
||||
qmlRegisterUncreatableType<KWin::QuickSceneView>("org.kde.kwin", 3, 0, "SceneView", QStringLiteral("Can't instantiate an object of type SceneView"));
|
||||
qmlRegisterType<ScriptedQuickSceneEffect>("org.kde.kwin", 3, 0, "SceneEffect");
|
||||
#endif
|
||||
|
||||
qmlRegisterSingletonType<DeclarativeScriptWorkspaceWrapper>("org.kde.kwin", 3, 0, "Workspace", [](QQmlEngine *qmlEngine, QJSEngine *jsEngine) {
|
||||
return new DeclarativeScriptWorkspaceWrapper();
|
||||
});
|
||||
qmlRegisterSingletonInstance("org.kde.kwin", 3, 0, "Options", options);
|
||||
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
qmlRegisterAnonymousType<KConfigPropertyMap>("org.kde.kwin", 3);
|
||||
#endif
|
||||
qmlRegisterAnonymousType<KWin::Output>("org.kde.kwin", 3);
|
||||
qmlRegisterAnonymousType<KWin::Window>("org.kde.kwin", 3);
|
||||
qmlRegisterAnonymousType<KWin::VirtualDesktop>("org.kde.kwin", 3);
|
||||
@@ -702,9 +689,7 @@ void KWin::Scripting::start()
|
||||
if (it->first) {
|
||||
loadScript(it->second.first, it->second.second);
|
||||
} else {
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
loadDeclarativeScript(it->second.first, it->second.second);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -771,9 +756,7 @@ void KWin::Scripting::slotScriptsQueried()
|
||||
if (it->first) {
|
||||
loadScript(it->second.first, it->second.second);
|
||||
} else {
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
loadDeclarativeScript(it->second.first, it->second.second);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -836,7 +819,6 @@ int KWin::Scripting::loadScript(const QString &filePath, const QString &pluginNa
|
||||
return id;
|
||||
}
|
||||
|
||||
#if KWIN_BUILD_QTQUICK
|
||||
int KWin::Scripting::loadDeclarativeScript(const QString &filePath, const QString &pluginName)
|
||||
{
|
||||
QMutexLocker locker(m_scriptsLock.get());
|
||||
@@ -849,7 +831,6 @@ int KWin::Scripting::loadDeclarativeScript(const QString &filePath, const QStrin
|
||||
scripts.append(script);
|
||||
return id;
|
||||
}
|
||||
#endif
|
||||
|
||||
KWin::Scripting::~Scripting()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user