santigimeno / node-ewmh

Implementation of the Extended Window Manager Hints (EWMH)
ISC License
18 stars 1 forks source link

More functions #22

Open RossComputerGuy opened 6 years ago

RossComputerGuy commented 6 years ago

There should be a way to set _NET_WM_STRUT. It's an array of 4 CARDINALs.

RossComputerGuy commented 6 years ago

Having functions for setting _NET_WM_STRUT and _NET_WM_STRUT_PARTIAL should also be added.

sidorares commented 6 years ago

As @santigimeno mentioned original intent for this library was to assist window managers authors. We need to rethink API in order to help WM-side and client programs authors

RossComputerGuy commented 6 years ago

I can't figure out how to calculate _NET_WM_STRUT_PARTIAL so can someone please tell me how to calculate that from my panel's x, y, width, and height? This is my code:

                this.win._change_property("_NET_WM_STRUT_PARTIAL",this.app.getXClient().atoms.CARDINAL,32,[
                    0,0,0,this.win.height,
                    0,0,0,0,
                    0,0,this.win.x,this.win.x+this.win.width
                ],err => {
                    if(err) throw err;
                });