File tree Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -185,7 +185,25 @@ void XPanelWindow::setFocusable(bool focusable) {
185185 emit this ->focusableChanged ();
186186}
187187
188- void XPanelWindow::xInit () { this ->updateDimensions (); }
188+ void XPanelWindow::xInit () {
189+ if (this ->window == nullptr || this ->window ->handle () == nullptr ) return ;
190+ this ->updateDimensions ();
191+
192+ auto * conn = x11Connection ();
193+
194+ // Stick to every workspace
195+ auto desktop = 0xffffffff ;
196+ xcb_change_property (
197+ conn,
198+ XCB_PROP_MODE_REPLACE,
199+ this ->window ->winId (),
200+ XAtom::_NET_WM_DESKTOP.atom (),
201+ XCB_ATOM_CARDINAL,
202+ 32 ,
203+ 1 ,
204+ &desktop
205+ );
206+ }
189207
190208void XPanelWindow::connectScreen () {
191209 if (this ->mTrackedScreen != nullptr ) {
Original file line number Diff line number Diff line change @@ -23,11 +23,13 @@ xcb_connection_t* x11Connection() {
2323// NOLINTBEGIN
2424XAtom XAtom::_NET_WM_STRUT {};
2525XAtom XAtom::_NET_WM_STRUT_PARTIAL {};
26+ XAtom XAtom::_NET_WM_DESKTOP {};
2627// NOLINTEND
2728
2829void XAtom::initAtoms () {
2930 _NET_WM_STRUT.init (" _NET_WM_STRUT" );
3031 _NET_WM_STRUT_PARTIAL.init (" _NET_WM_STRUT_PARTIAL" );
32+ _NET_WM_DESKTOP.init (" _NET_WM_DESKTOP" );
3133}
3234
3335void XAtom::init (const QByteArray& name) {
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ class XAtom {
1515 // NOLINTBEGIN
1616 static XAtom _NET_WM_STRUT;
1717 static XAtom _NET_WM_STRUT_PARTIAL;
18+ static XAtom _NET_WM_DESKTOP;
1819 // NOLINTEND
1920
2021 static void initAtoms ();
You can’t perform that action at this time.
0 commit comments