
#include <gtk/gtk.h>
#include <gdk/gdkscreen.h>
#include <cairo.h>

static gboolean
button_press (GtkWidget      *widget,
              GdkEventButton *event,
              GtkWidget      *window)
{
    GdkWindow *gdk_window = gtk_widget_get_window(window);
    gdk_window_begin_move_drag(gdk_window, 1, 0, 0, 0x12345);
    gdk_window_begin_move_drag(gdk_window, 1, 0, 0, 0x12345);
}

int main(int argc, char **argv)
{
    gtk_init(&argc, &argv);

    GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
    gtk_window_set_default_size(GTK_WINDOW(window), 400, 400);
    g_signal_connect(G_OBJECT(window), "delete-event", gtk_main_quit, NULL);

    g_signal_connect(window, "button-press-event", G_CALLBACK(button_press), window);

    gtk_widget_show_all(window);
    gtk_main();

    return 0;
}
