Catching client events



I'm trying to catch a client event on a GtkWindow.

        static gboolean MyClientEvent(GtkWidget *widget, GdkEventClient *ev, MyWnd *Wnd)
        {
                // breakpoint here...
                return TRUE;
        }

        GtkWidget *Wnd = gtk_window_new(GTK_WINDOW_TOPLEVEL);
        g_signal_connect(       G_OBJECT(Wnd),
                                "client-event",
                                G_CALLBACK(MyClientEvent),
                                this);
        gtk_widget_add_events(Wnd, GDK_ALL_EVENTS_MASK);


Sending code:

        GtkWidget *Wnd;
        GdkNativeWindow Hnd =
        #ifdef WIN32
                GDK_WINDOW_HWND(Wnd->window);
        #else
                GDK_WINDOW_XWINDOW(Wnd->window);
        #endif
        GdkEvent *Event = gdk_event_new(GDK_CLIENT_EVENT);
        // fill out Event params
        gdk_event_send_client_message(Event, Hnd);

This is on windows at the moment and I see the client message get sent using Spy++, but nothing at the 
receiving end catches it. Both sender and receiver are in the same application.

What am I missing here?
--
Matthew Allen




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]