I am trying to get Wayland events in a program’s event handler. I need to use gdk_window_add_filter () to do this because that’s what the program’s existing event handler uses.
Is it possible to get the Wayland events and the objects associated with them from inside a GdkFilterFunc?
static GdkFilterReturn filter_func (GdkXEvent *xevent, GdkEvent *event, gpointer data)
//process my Wayland event here
int main ()
gdk_window_add_filter (NULL, filter_func, data);
I’m using https://github.com/sardemff7/libgwater/blob/master/wayland/libgwater-wayland.c , I believe that this should provide the necessary GSources to integrate the Wayland loop into the GMainLoop.