Advance Wayland and KDE package bring-up

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-04-14 10:51:06 +01:00
parent 51f3c21121
commit cf12defd28
15214 changed files with 20594243 additions and 269 deletions
@@ -0,0 +1,6 @@
ecm_add_qml_module(KWindowSystem URI "org.kde.kwindowsystem" VERSION 1.0 GENERATE_PLUGIN_SOURCE)
target_sources(KWindowSystem PRIVATE types.h)
target_link_libraries(KWindowSystem PRIVATE Qt::Qml KF6::WindowSystem)
ecm_finalize_qml_module(KWindowSystem DESTINATION ${KDE_INSTALL_QMLDIR})
@@ -0,0 +1,18 @@
/*
SPDX-FileCopyrightText: 2023 Nicolas Fella <nicolas.fella@gmx.de>
SPDX-License-Identifier: LGPL-2.1-or-later
*/
import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15 as QQC2
import org.kde.kwindowsystem 1.0
Item {
QQC2.Label {
anchors.centerIn: parent
text: "Compositing active: " + KX11Extras.compositingActive
}
}
@@ -0,0 +1,21 @@
/*
SPDX-FileCopyrightText: 2023 Nicolas Fella <nicolas.fella@gmx.de>
SPDX-License-Identifier: LGPL-2.1-or-later
*/
import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15 as QQC2
import org.kde.kwindowsystem 1.0
Item {
QQC2.Button {
anchors.centerIn: parent
text: "Force"
// Forcing the current window to be active it a bit silly, but it illustrates how to use the API
onClicked: KX11Extras.forceActiveWindow(Window.window)
}
}
@@ -0,0 +1,26 @@
/*
SPDX-FileCopyrightText: 2023 Nicolas Fella <nicolas.fella@gmx.de>
SPDX-License-Identifier: LGPL-2.1-or-later
*/
import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15 as QQC2
import org.kde.kwindowsystem 1.0
Item {
Column {
anchors.centerIn: parent
QQC2.Label {
text: "Is X11: " + KWindowSystem.isPlatformX11
}
QQC2.Label {
text: "Is Wayland: " + KWindowSystem.isPlatformWayland
}
}
}
@@ -0,0 +1,35 @@
/*
SPDX-FileCopyrightText: 2023 Nicolas Fella <nicolas.fella@gmx.de>
SPDX-License-Identifier: LGPL-2.1-or-later
*/
import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15 as QQC2
import org.kde.kwindowsystem 1.0
Item {
Connections {
target: KWindowSystem
function onShowingDesktopChanged() {
console.log("Showing desktop changed to " + KWindowSystem.showingDesktop)
}
}
Column {
anchors.centerIn: parent
QQC2.Label {
text: "Showing desktop: " + KWindowSystem.showingDesktop
}
QQC2.Button {
text: "Show"
onClicked: KWindowSystem.showingDesktop = true
}
}
}
@@ -0,0 +1,49 @@
/*
SPDX-FileCopyrightText: 2024 Nicolas Fella <nicolas.fella@gmx.de>
SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef KWINDOWSYSTEM_QML_TYPES_H
#define KWINDOWSYSTEM_QML_TYPES_H
#include <QQmlEngine>
#include <KWindowSystem>
#include <config-kwindowsystem.h>
#if KWINDOWSYSTEM_HAVE_X11
#include <KX11Extras>
#endif
struct KWindowSystemForeign {
Q_GADGET
QML_NAMED_ELEMENT(KWindowSystem)
QML_SINGLETON
QML_FOREIGN(KWindowSystem)
public:
static KWindowSystem *create(QQmlEngine *, QJSEngine *)
{
QQmlEngine::setObjectOwnership(KWindowSystem::self(), QQmlEngine::CppOwnership);
return KWindowSystem::self();
}
};
#if KWINDOWSYSTEM_HAVE_X11
struct KX11ExtrasForeign {
Q_GADGET
QML_NAMED_ELEMENT(KX11Extras)
QML_SINGLETON
QML_FOREIGN(KX11Extras)
public:
static KX11Extras *create(QQmlEngine *, QJSEngine *)
{
QQmlEngine::setObjectOwnership(KX11Extras::self(), QQmlEngine::CppOwnership);
return KX11Extras::self();
}
};
#endif
#endif