Geis with GLFW and X11

Asked by Amit Nayar

I'm using GLFW and X11 as a window manager running on an Arm (Nvidia Tegra TK1).
Also using Geis with Grail backend.

Seems to hang on geis_subscription_activate() after the touch device has been detected by geis (so after geis posts a GEIS_EVENT_DEVICE_AVAILABLE).
If I activate the subscription first (on GEIS_EVENT_INIT_COMPLETE), the subscription activates and the program continues, but all touch screen touches come through as X left mouse clicks.

Digging a bit further into the hang, it looks like Geis calls all the way down to
    |> geis_grail_window_grab_store_grab()
         |> XIGrabTouchBegin()

Which takes the X window ID and display ID and XIAllMasterDevices.
I'm a bit stuck at this point!

The window ID is taken from GLFW library: glfwGetX11Display()

Does Geis support GLFW running on top of X11?
It all seems to work fine when running EGL on X11.

Any help would be much appreciated.

Question information

English Edit question
Geis Edit question
No assignee Edit question
Solved by:
Amit Nayar
Last query:
Last reply:
Revision history for this message
Stephen M. Webb (bregma) said :

I'm unaware of any reason it shouldn't work.

I suspect that if it's hanging trying to grab a touch device, it's because there's already an outstanding grab on the device. Could be GLFW itself maybe?

Revision history for this message
Amit Nayar (amit-nyr) said :

Not sure. I would think it should only be X11 that would need to access the device.
Geis does manage to successfully find the device and report the correct attributes of it. Just seems to be when subscribing after this happens, the XIGrabTouchBegin() call fails.
I would think that GLFW with GL and X11 would be the standard for most linux development which is why it seems strange.

Revision history for this message
Amit Nayar (amit-nyr) said :

Stephen, I've changed the window manager back to EGL with X11 and I'm getting the same results. So the only difference is that it works on X86 and doesn't on ARM.
Do you know of any issues with using multitouch on an ARM? Do you have an idea of which library / area of code could be the issue?
Thanks for your help

Revision history for this message
Amit Nayar (amit-nyr) said :

Problem solved for EGL on ARM (still no solution for GLFW)

I just needed to activate the subscriptions after the geis device connected event.