Which API to use?

Asked by Joe Warren-Meeks

Hi there,

I have written an extension to wmctrl to do some sane-ish auto-tiling of windows. It's in C and uses Xlib.

I would like to re-implement it as a new keyboard shortcut in Gala written in Vala. I'm not sure which is the best API to use though. I need to get the list of all windows on the current desktop, determine which screen they are on and then move and resize them, ideally understanding the true geometry of them, including window decorations etc.

Any pointers to where to start looking? I've trawled through the GTK3.0 docs, but can't find what I'm looking for..

Thanks,

 -- joe.

Question information

Language:
English Edit question
Status:
Solved
For:
Gala Edit question
Assignee:
No assignee Edit question
Solved by:
Joe Warren-Meeks
Solved:
Last query:
Last reply:
Revision history for this message
Tom Beckmann (tombeckmann) said :
#1

If you can be patient, you'll be able to write plugins for gala once Isis is released. You'll get access to the entire libmutter API at that point. Otherwise you may want to try wnck, which is pretty much standard for wm interactions with gobject I'd say.

Revision history for this message
Joe Warren-Meeks (joe-warren-meeks) said :
#2

Hey Tom,

Thanks for that. I actually wrote itin C using wmctrl, so I might try to port it into mutter and see if that works.

If not, I'l pick up this.

Thanks!