gdk_event_send_client_message causing fatal IO error "resource temporarily unavailable"



Hi,

I'm working on a gtk2 port of my application library (Lgi) and one of the API's it provides is a way to send 
a message to a window. When I was using xlib directly I just used XSendEvent with a client event and that 
worked just fine. Now with Gtk/Gdk I should be using gdk_event_send_client_message. My code is more or less:

    bool SendMsg(GTkWidget *Wnd, ...other params...)
    {
        GdkNativeWindow Hnd = GDK_DRAWABLE_XID(Wnd->window);
        GdkEvent *Ev = gdk_event_new(GDK_CLIENT_EVENT);
        // init payload data part of Ev here
        return gdk_event_send_client_message(Ev, Hnd);
    }

This seems to work ok, but shortly afterwards I get:

    myapp: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.

Which is obviously not what I want... am I getting the wrong GdkNativeWindow? Btw I'm running under ubuntu, 
not sure which version... but maybe a year old or something not tragically ancient.

I havn't hooked something up on the receiving GtkWidget for processing the event yet... does that matter?

Regards
--
Matthew Allen




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