x11: add XPanelWindow

This commit is contained in:
outfoxxed 2024-05-20 02:16:44 -07:00
parent 908ba3eef5
commit 73cfeba61b
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
15 changed files with 804 additions and 5 deletions

29
src/x11/init.cpp Normal file
View file

@ -0,0 +1,29 @@
#include <qguiapplication.h>
#include <qqml.h>
#include "../core/plugin.hpp"
#include "panel_window.hpp"
#include "util.hpp"
namespace {
class X11Plugin: public QuickshellPlugin {
bool applies() override { return QGuiApplication::platformName() == "xcb"; }
void init() override { XAtom::initAtoms(); }
void registerTypes() override {
qmlRegisterType<XPanelInterface>("Quickshell._X11Overlay", 1, 0, "PanelWindow");
qmlRegisterModuleImport(
"Quickshell",
QQmlModuleImportModuleAny,
"Quickshell._X11Overlay",
QQmlModuleImportLatest
);
}
};
QS_REGISTER_PLUGIN(X11Plugin);
} // namespace