forked from quickshell/quickshell
x11: add XPanelWindow
This commit is contained in:
parent
908ba3eef5
commit
73cfeba61b
15 changed files with 804 additions and 5 deletions
29
src/x11/util.hpp
Normal file
29
src/x11/util.hpp
Normal 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 {};
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue