June 8th, 2011

Sticking X windows

I use metacity and I'm trying to write a small "click to stick" program: run the program, click a window, and it gains the "always on visible workspace" property in Metacity's multiple desktop system. However, I can't seem to get it to work: I tried setting _NET_WM_STATE to _NET_WM_STATE_STICKY and the _NET_WM_DESKTOP to 0xFFFFFFFF but it doesn't seem to take effect. The window remains only on a single desktop. Do I need to signal the updated properties to metacity in some way? Is this concept even possible?

I couldn't figure it out by reading the metacity code.