Files
RedBear-OS/local/patches/kwin/P0-disable-qml-quick.patch
T
vasilito 741f144c79 feat: VirtIO GPU driver, libdrm DRM ioctls, KWin/KF6 build fixes, display stack additions
- Add full VirtIO GPU driver with command submission, resource management,
  VirtQueue implementation, and transport layer; includes diagnostic probes
  for resource_create_2d ERR_INVALID_RESOURCE_ID investigation
- Expand libdrm Redox support with DRM ioctl wrappers (ADDFB, RMFB,
  CREATE_DUMB, MAP_DUMB, DESTROY_DUMB, GET_RESOURCES, GET_CONNECTOR,
  GET_CRTC, SET_CRTC, MODE_OBJ_GET_PROPERTIES, etc.) and xf86drm_redox.h
- Add redox-drm scheme handlers for VirtIO GPU-specific DRM ioctls
  (VIRTGPU_RESOURCE_CREATE, VIRTGPU_MAP, VIRTGPU_WAIT, VIRTGPU_INFO, etc.)
- Add display stack recipes: freetype2, lcms2, libdisplay-info, libepoxy,
  libxcvt
- Fix KWin build (recipe.toml expanded, kf6-ksvg added)
- Fix KF6 CMakeLists for cross-compilation (attica, kcmutils, kcolorscheme,
  kcompletion, kconfigwidgets, kdeclarative, kiconthemes, kitemmodels,
  kitemviews, kjobwidgets, ktextwidgets, kwayland, kxmlgui, kpty, solid)
- Add Qt6 futex support patch
- Add relibc patches: P3 strtold, P3 ld-so search path, P5 DRM ioctl removal
- Add base P4 pcid config scheme patch
- Update driver-manager hotplug/config, PCI config in redox-driver-sys
- Update greeter compositor and KDE session scripts
- Update AGENTS.md with zero-tolerance stubs policy and project knowledge
2026-05-14 10:31:13 +01:00

416 lines
12 KiB
Diff

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,20 +34,29 @@
include(KDEClangFormat)
include(KDEGitCommitHooks)
+if(KWIN_BUILD_QML_UI)
include(ECMFindQmlModule)
+endif()
include(ECMInstallIcons)
include(ECMOptionalAddSubdirectory)
include(ECMConfiguredInstall)
include(ECMQtDeclareLoggingCategory)
include(ECMSetupQtPluginMacroNames)
include(ECMSetupVersion)
+if(KWIN_BUILD_QML_UI)
include(ECMQmlModule)
+endif()
+if(KWIN_BUILD_QML_UI)
include(ECMGenerateQmlTypes)
+endif()
include(ECMDeprecationSettings)
option(KWIN_BUILD_DECORATIONS "Enable building of KWin decorations." ON)
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_QML_UI "Enable building of KWin QML UI components." 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" ON)
@@ -55,17 +64,21 @@
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)
-find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
+set(KWIN_QT6_REQUIRED_COMPONENTS
Concurrent
Core
Core5Compat
DBus
- Quick
- UiTools
WaylandClient
Widgets
- Sensors
Svg
+)
+if(KWIN_BUILD_QML_UI)
+ list(APPEND KWIN_QT6_REQUIRED_COMPONENTS Quick UiTools Sensors)
+endif()
+
+find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
+ ${KWIN_QT6_REQUIRED_COMPONENTS}
)
find_package(Qt6Test ${QT_MIN_VERSION} CONFIG QUIET)
@@ -103,6 +116,7 @@
)
# required frameworks by config modules
if(KWIN_BUILD_KCMS)
+if(KWIN_BUILD_KCMS AND KWIN_BUILD_QML_UI)
find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS
Declarative
KCMUtils
@@ -111,6 +125,7 @@
XmlGui
)
endif()
+endif()
if(KWIN_BUILD_TABBOX AND KWIN_BUILD_KCMS)
find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS
@@ -131,11 +146,13 @@
)
# optional frameworks
+if(KWIN_BUILD_QML_UI)
find_package(PlasmaActivities ${PROJECT_DEP_VERSION} CONFIG)
set_package_properties(PlasmaActivities PROPERTIES
PURPOSE "Enable building of KWin with kactivities support"
TYPE OPTIONAL
)
+endif()
add_feature_info("PlasmaActivities" PlasmaActivities_FOUND "Enable building of KWin with kactivities support")
find_package(KF6DocTools ${KF6_MIN_VERSION} CONFIG)
@@ -145,18 +162,22 @@
)
add_feature_info("KF6DocTools" KF6DocTools_FOUND "Enable building documentation")
+if(KWIN_BUILD_QML_UI)
find_package(KF6Kirigami ${KF6_MIN_VERSION} CONFIG)
set_package_properties(KF6Kirigami PROPERTIES
DESCRIPTION "A QtQuick based components set"
PURPOSE "Required at runtime for several QML effects"
TYPE RUNTIME
)
+endif()
+if(KWIN_BUILD_QML_UI)
find_package(Plasma ${PROJECT_DEP_VERSION} CONFIG)
set_package_properties(Plasma PROPERTIES
DESCRIPTION "A QtQuick based components set"
PURPOSE "Required at runtime for several QML effects"
TYPE RUNTIME
)
+endif()
find_package(KDecoration3 ${PROJECT_DEP_VERSION} CONFIG REQUIRED)
@@ -221,12 +242,15 @@
URL "https://gitlab.freedesktop.org/wayland/wayland-protocols/"
)
+if(KWIN_BUILD_QML_UI)
find_package(PlasmaWaylandProtocols 1.14.0 CONFIG)
set_package_properties(PlasmaWaylandProtocols PROPERTIES
TYPE REQUIRED
PURPOSE "Collection of Plasma-specific Wayland protocols"
URL "https://invent.kde.org/libraries/plasma-wayland-protocols/"
)
+endif()
+
find_package(XKB 0.7.0)
set_package_properties(XKB PROPERTIES
@@ -239,7 +263,7 @@
set(HAVE_XKBCOMMON_NO_SECURE_GETENV 0)
endif()
-find_package(Canberra REQUIRED)
+find_package(Canberra)
if (KWIN_BUILD_X11)
pkg_check_modules(XKBX11 IMPORTED_TARGET xkbcommon-x11 REQUIRED)
@@ -418,6 +442,7 @@
)
endif()
+if(KWIN_BUILD_QML_UI)
ecm_find_qmlmodule(QtQuick 2.3)
ecm_find_qmlmodule(QtQuick.Controls 2.15)
ecm_find_qmlmodule(QtQuick.Layouts 1.3)
@@ -426,6 +451,7 @@
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()
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)
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -16,7 +16,9 @@
target_link_libraries(KWinEffectsInterface Qt::DBus)
add_subdirectory(helpers)
+if(KWIN_BUILD_QML_UI)
add_subdirectory(qml)
+endif()
if (KWIN_BUILD_KCMS)
add_subdirectory(kcms)
@@ -89,12 +91,12 @@
effect/effect.cpp
effect/effectframe.cpp
effect/effecthandler.cpp
- effect/effectloader.cpp
+ $<$<BOOL:${KWIN_BUILD_QML_UI}>:effect/effectloader.cpp>
effect/effecttogglablestate.cpp
effect/effectwindow.cpp
effect/logging.cpp
effect/offscreeneffect.cpp
- effect/offscreenquickview.cpp
+ $<$<BOOL:${KWIN_BUILD_QML_UI}>:effect/offscreenquickview.cpp>
effect/quickeffect.cpp
effect/timeline.cpp
focuschain.cpp
@@ -147,7 +149,7 @@
options.cpp
osd.cpp
outline.cpp
- outputconfigurationstore.cpp
+ $<$<BOOL:${KWIN_BUILD_QML_UI}>:outputconfigurationstore.cpp>
placeholderinputeventfilter.cpp
placeholderoutput.cpp
placement.cpp
@@ -187,7 +189,7 @@
scripting/gesturehandler.cpp
scripting/screenedgehandler.cpp
scripting/scriptedeffect.cpp
- scripting/scriptedquicksceneeffect.cpp
+ $<$<BOOL:${KWIN_BUILD_QML_UI}>:scripting/scriptedquicksceneeffect.cpp>
scripting/scripting.cpp
scripting/scripting_logging.cpp
scripting/scriptingutils.cpp
@@ -227,7 +229,7 @@
target_link_libraries(kwin
PUBLIC
Qt::DBus
- Qt::Quick
+ $<$<BOOL:${KWIN_BUILD_QML_UI}>:Qt::Quick>
Qt::Widgets
Wayland::Server
KF6::ConfigCore
@@ -238,16 +240,16 @@
PRIVATE
Qt::Concurrent
Qt::GuiPrivate
- Qt::Sensors
+ $<$<BOOL:${KWIN_BUILD_QML_UI}>:Qt::Sensors>
Qt::Svg
KF6::ColorScheme
KF6::ConfigGui
- KF6::ConfigQml
+ $<$<BOOL:${KWIN_BUILD_QML_UI}>:KF6::ConfigQml>
KF6::Crash
KF6::GlobalAccel
KF6::I18n
- KF6::I18nQml
+ $<$<BOOL:${KWIN_BUILD_QML_UI}>:KF6::I18nQml>
KF6::Package
KF6::Service
@@ -596,7 +598,7 @@
utils/filedescriptor.h
utils/kernel.h
utils/memorymap.h
- utils/orientationsensor.h
+ $<$<BOOL:${KWIN_BUILD_QML_UI}>:utils/orientationsensor.h>
utils/ramfile.h
utils/realtime.h
utils/resource.h
@@ -617,7 +619,7 @@
effect/effectwindow.h
effect/globals.h
effect/offscreeneffect.h
- effect/offscreenquickview.h
+ $<$<BOOL:${KWIN_BUILD_QML_UI}>:effect/offscreenquickview.h>
effect/quickeffect.h
effect/timeline.h
effect/xcb.h
--- a/src/plugins/CMakeLists.txt
+++ b/src/plugins/CMakeLists.txt
@@ -45,7 +45,9 @@
file(COPY ${source}/contents ${source}/metadata.json DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/scripts/${name})
endfunction()
+if(KWIN_BUILD_QML_UI)
add_subdirectory(private)
+endif()
add_subdirectory(backgroundcontrast)
add_subdirectory(blendchanges)
@@ -54,7 +56,9 @@
add_subdirectory(buttonrebinds)
add_subdirectory(colorblindnesscorrection)
add_subdirectory(colorpicker)
+if(KWIN_BUILD_QML_UI)
add_subdirectory(desktopchangeosd)
+endif()
add_subdirectory(dialogparent)
add_subdirectory(diminactive)
add_subdirectory(dimscreen)
@@ -81,18 +85,28 @@
add_subdirectory(mouseclick)
add_subdirectory(mousemark)
add_subdirectory(nightlight)
+if(KWIN_BUILD_QML_UI)
add_subdirectory(outputlocator)
+endif()
+if(KWIN_BUILD_QML_UI)
add_subdirectory(overview)
+endif()
add_subdirectory(qpa)
add_subdirectory(scale)
+if(KWIN_BUILD_QML_UI)
add_subdirectory(screenedge)
+endif()
add_subdirectory(screenshot)
add_subdirectory(screentransform)
add_subdirectory(sessionquit)
add_subdirectory(shakecursor)
add_subdirectory(sheet)
+if(KWIN_BUILD_QML_UI)
add_subdirectory(showcompositing)
+endif()
+if(KWIN_BUILD_QML_UI)
add_subdirectory(showfps)
+endif()
add_subdirectory(showpaint)
add_subdirectory(slide)
add_subdirectory(slideback)
@@ -104,14 +118,18 @@
add_subdirectory(synchronizeskipswitcher)
add_subdirectory(systembell)
add_subdirectory(thumbnailaside)
+if(KWIN_BUILD_QML_UI)
add_subdirectory(tileseditor)
+endif()
add_subdirectory(touchpoints)
add_subdirectory(trackmouse)
add_subdirectory(translucency)
add_subdirectory(videowall)
add_subdirectory(windowaperture)
add_subdirectory(windowsystem)
+if(KWIN_BUILD_QML_UI)
add_subdirectory(windowview)
+endif()
add_subdirectory(wobblywindows)
add_subdirectory(zoom)
@@ -120,7 +138,9 @@
endif()
if (KWIN_BUILD_DECORATIONS)
+if(KWIN_BUILD_QML_UI)
add_subdirectory(kdecorations)
+endif()
endif()
if (PipeWire_FOUND)
add_subdirectory(screencast)
--- a/src/helpers/CMakeLists.txt
+++ b/src/helpers/CMakeLists.txt
@@ -1,2 +1,5 @@
+if(KWIN_BUILD_X11)
add_subdirectory(killer)
+endif()
+
add_subdirectory(wayland_wrapper)
--- a/src/helpers/wayland_wrapper/wl-socket.c
+++ b/src/helpers/wayland_wrapper/wl-socket.c
@@ -19,6 +19,11 @@
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/un.h>
+
+#ifndef SUN_LEN
+#define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) + strlen((ptr)->sun_path))
+#endif
+
#include <unistd.h>
/* This is the size of the char array in struct sock_addr_un.
--- a/src/cursor.cpp
+++ b/src/cursor.cpp
@@ -30,7 +30,9 @@
#include <QScreen>
#include <QTimer>
+#if KWIN_BUILD_X11
#include <xcb/xcb_cursor.h>
+#endif
namespace KWin
{
--- a/src/scripting/scripting.cpp
+++ b/src/scripting/scripting.cpp
@@ -16,7 +16,9 @@
#include "effect/quickeffect.h"
#include "gesturehandler.h"
#include "screenedgehandler.h"
+#if KWIN_BUILD_QML_UI
#include "scriptedquicksceneeffect.h"
+#endif
#include "scripting_logging.h"
#include "scriptingutils.h"
#include "shortcuthandler.h"
@@ -35,7 +37,9 @@
#include "workspace.h"
// KDE
#include <KConfigGroup>
+#if KWIN_BUILD_QML_UI
#include <KConfigPropertyMap>
+#endif
#include <KGlobalAccel>
#include <KLocalizedContext>
#include <KLocalizedQmlContext>
@@ -655,6 +659,7 @@
qmlRegisterType<WindowFilterModel>("org.kde.kwin", 3, 0, "WindowFilterModel");
qmlRegisterType<VirtualDesktopModel>("org.kde.kwin", 3, 0, "VirtualDesktopModel");
qmlRegisterUncreatableType<KWin::QuickSceneView>("org.kde.kwin", 3, 0, "SceneView", QStringLiteral("Can't instantiate an object of type SceneView"));
+#if KWIN_BUILD_QML_UI
qmlRegisterType<ScriptedQuickSceneEffect>("org.kde.kwin", 3, 0, "SceneEffect");
qmlRegisterSingletonType<DeclarativeScriptWorkspaceWrapper>("org.kde.kwin", 3, 0, "Workspace", [](QQmlEngine *qmlEngine, QJSEngine *jsEngine) {
@@ -667,6 +672,7 @@
qmlRegisterAnonymousType<KWin::Window>("org.kde.kwin", 3);
qmlRegisterAnonymousType<KWin::VirtualDesktop>("org.kde.kwin", 3);
qmlRegisterAnonymousType<QAbstractItemModel>("org.kde.kwin", 3);
+#endif
qmlRegisterAnonymousType<KWin::TileManager>("org.kde.kwin", 3);
// TODO: call the qml types as the C++ types?
qmlRegisterUncreatableType<KWin::CustomTile>("org.kde.kwin", 3, 0, "CustomTile", QStringLiteral("Cannot create objects of type Tile"));
--- a/src/utils/CMakeLists.txt
+++ b/src/utils/CMakeLists.txt
@@ -4,7 +4,7 @@
drm_format_helper.cpp
edid.cpp
filedescriptor.cpp
- orientationsensor.cpp
+ $<$<BOOL:${KWIN_BUILD_QML_UI}>:orientationsensor.cpp>
ramfile.cpp
realtime.cpp
softwarevsyncmonitor.cpp