x11: add XPanelWindow

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

29
src/x11/util.hpp Normal file
View file

@ -0,0 +1,29 @@
#pragma once
#include <qbytearray.h>
#include <qtclasshelpermacros.h>
#include <xcb/xcb.h>
#include <xcb/xproto.h>
xcb_connection_t* x11Connection();
class XAtom {
public:
[[nodiscard]] bool isValid();
[[nodiscard]] const xcb_atom_t& atom();
// NOLINTBEGIN
static XAtom _NET_WM_STRUT;
static XAtom _NET_WM_STRUT_PARTIAL;
// NOLINTEND
static void initAtoms();
private:
void init(const QByteArray& name);
void resolve();
bool resolved = false;
xcb_atom_t mAtom = XCB_ATOM_NONE;
xcb_intern_atom_cookie_t cookie {};
};