Pardon, forgot to include the attachment.
#include <gtk/gtk.h>

static int state_cb (GtkWidget * window, GdkEventWindowState * event, void *
 unused)
{
    if (event->changed_mask & GDK_WINDOW_STATE_STICKY)
    {
        printf ("Sticky? %s.\n", event->new_window_state &
         GDK_WINDOW_STATE_STICKY ? "Yes" : "No");
    }

    return TRUE;
}

int main (void)
{
    static GtkWidget * window;
    
    gtk_init (NULL, NULL);

    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    gtk_widget_show (window);

    g_signal_connect ((GObject *) window, "window-state-event", (GCallback)
     state_cb, NULL);
    
    gtk_main ();
    
    return 0;
}

Reply via email to