#include <stdio.h>

#define WNCK_I_KNOW_THIS_IS_UNSTABLE
#include <libwnck/libwnck.h>
#include <gtk/gtk.h>
#include <X11/Xlib.h>

int
main(int argc, char **argv)
{
    WnckScreen *scr;
    WnckWindow *win;
    int x, y, width, height;
    Display *disp = NULL;

    gtk_init(&argc, &argv);

    scr = wnck_screen_get_default();
    while(gtk_events_pending()) gtk_main_iteration();
    win = wnck_screen_get_active_window(scr);
    wnck_window_get_geometry(win, &x, &y, &width, &height);

    printf("Current geometry: %d,%d %dx%d\n", x, y, width, height);

    wnck_window_set_geometry(win,
        WNCK_WINDOW_GRAVITY_CURRENT,
        WNCK_WINDOW_CHANGE_X | WNCK_WINDOW_CHANGE_Y | WNCK_WINDOW_CHANGE_WIDTH | WNCK_WINDOW_CHANGE_HEIGHT,
        x + 10, y + 10, width - 5, height - 5);
    while(gtk_events_pending()) gtk_main_iteration();

    return(0);
}
