forked from quickshell/quickshell
x11/panelwindow: set _NET_WM_DESKTOP to stay on all desktops
This commit is contained in:
parent
683d92a05f
commit
23cd6cd9e1
3 changed files with 22 additions and 1 deletions
|
@ -185,7 +185,25 @@ void XPanelWindow::setFocusable(bool focusable) {
|
|||
emit this->focusableChanged();
|
||||
}
|
||||
|
||||
void XPanelWindow::xInit() { this->updateDimensions(); }
|
||||
void XPanelWindow::xInit() {
|
||||
if (this->window == nullptr || this->window->handle() == nullptr) return;
|
||||
this->updateDimensions();
|
||||
|
||||
auto* conn = x11Connection();
|
||||
|
||||
// Stick to every workspace
|
||||
auto desktop = 0xffffffff;
|
||||
xcb_change_property(
|
||||
conn,
|
||||
XCB_PROP_MODE_REPLACE,
|
||||
this->window->winId(),
|
||||
XAtom::_NET_WM_DESKTOP.atom(),
|
||||
XCB_ATOM_CARDINAL,
|
||||
32,
|
||||
1,
|
||||
&desktop
|
||||
);
|
||||
}
|
||||
|
||||
void XPanelWindow::connectScreen() {
|
||||
if (this->mTrackedScreen != nullptr) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue