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:
@@ -0,0 +1 @@
|
||||
build
|
||||
@@ -0,0 +1,36 @@
|
||||
# SPDX-FileCopyrightText: None
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
project(quick-effect)
|
||||
|
||||
set(KF6_MIN_VERSION "6.0.0")
|
||||
|
||||
find_package(ECM ${KF6_MIN_VERSION} REQUIRED NO_MODULE)
|
||||
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
|
||||
|
||||
include(FeatureSummary)
|
||||
include(KDEInstallDirs)
|
||||
include(KDECMakeSettings)
|
||||
include(KDECompilerSettings NO_POLICY_SCOPE)
|
||||
|
||||
find_package(Qt6 CONFIG REQUIRED COMPONENTS
|
||||
Core
|
||||
Widgets
|
||||
)
|
||||
|
||||
find_package(KWin REQUIRED COMPONENTS
|
||||
kwin
|
||||
)
|
||||
|
||||
kcoreaddons_add_plugin(eventlistener INSTALL_NAMESPACE "kwin/plugins")
|
||||
target_sources(eventlistener PRIVATE
|
||||
main.cpp
|
||||
eventlistener.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(eventlistener PRIVATE
|
||||
KWin::kwin
|
||||
)
|
||||
|
||||
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
SPDX-FileCopyrightText: 2024 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
*/
|
||||
|
||||
#include "eventlistener.h"
|
||||
#include "kwin/input.h"
|
||||
#include "kwin/input_event.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
||||
EventListener::EventListener()
|
||||
{
|
||||
qDebug() << "Loaded demo event listener plugin";
|
||||
input()->installInputEventSpy(this);
|
||||
}
|
||||
|
||||
void EventListener::keyEvent(KeyEvent *event)
|
||||
{
|
||||
qDebug() << event;
|
||||
}
|
||||
|
||||
void EventListener::pointerEvent(MouseEvent *event)
|
||||
{
|
||||
qDebug() << event;
|
||||
}
|
||||
|
||||
} // namespace KWin
|
||||
|
||||
#include "moc_eventlistener.cpp"
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
SPDX-FileCopyrightText: 2024 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "kwin/plugin.h"
|
||||
#include "kwin/input_event_spy.h"
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
||||
class EventListener : public Plugin, public InputEventSpy
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EventListener();
|
||||
|
||||
void keyEvent(KeyEvent *event) override;
|
||||
void pointerEvent(MouseEvent *event) override;
|
||||
};
|
||||
|
||||
} // namespace KWin
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
SPDX-FileCopyrightText: 2024 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
||||
|
||||
SPDX-License-Identifier: LGPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#include "eventlistener.h"
|
||||
|
||||
#include <KPluginFactory>
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
||||
class KWIN_EXPORT EventListenerFactory : public PluginFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID PluginFactory_iid FILE "metadata.json")
|
||||
Q_INTERFACES(KWin::PluginFactory)
|
||||
|
||||
public:
|
||||
explicit EventListenerFactory() = default;
|
||||
|
||||
std::unique_ptr<Plugin> create() const override
|
||||
{
|
||||
return std::make_unique<EventListener>();
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace KWin
|
||||
|
||||
#include "main.moc"
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"KPlugin": {
|
||||
"EnabledByDefault": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
SPDX-FileCopyrightText: None
|
||||
SPDX-License-Identifier: CC0-1.0
|
||||
Reference in New Issue
Block a user