sidorares / node-x11

X11 node.js network protocol client
MIT License
518 stars 72 forks source link

RaiseWindow doesn't raise a window #175

Open RossComputerGuy opened 5 years ago

RossComputerGuy commented 5 years ago

In RDE Panel's source code the windows item type runs this.panel.app.getXClient().RaiseWindow(window.id); when you left click on a window title that's rendered but the window doesn't get raised. I've already checked that the function is being called because there's a console.log before it.

santigimeno commented 5 years ago

This one is tricky. I guess it depends on the WM it's running on the system. To accomplish this what I would usually do is use some tools like wmctrl or xdotool and see which command would work for me. Then would call the command with xtrace to find out what x11 requests use. For example to set a window on top of everything I would use this sequence:

1 - Add the _NET_WM_STATE_ABOVE value to the _NET_WM_STATE property. 2 - One you know is set, send a _NET_ACTIVE_WINDOW client message to request the WM to set the focus on the window.