I want to make Qt 5.1.1 touch example application work with qtwayland module.
I get the window on display, and also I get the touch traces from Weston. I see qtwayland is also getting triggered with the callback function that is registered for touch-up, touch-down, touch-motion.
But, QT doesn't invoke the QPushButton handler in QT application.
Connect API I am using as below: connect(ui->b_audio, SIGNAL(pressed()), this, SLOT(on_b_audio_clicked()));
Any clue why this could happen? Please suggest probable problems so that I can explore and debug.
Thanks in Advance. Bhushan.
In QtWayland, QWaylandInputDevice::touch_frame() passes the touch points to Qt internal window system through QWindowSystemInterface::handleTouchEvent(). Weston does not send WL_TOUCH_FRAME event at all, so the buttons or the QML MouseArea never receive touch event. You can add the following line to the end of evdev_flush_motion() in weston/src/evdev.c:
And rewrite the notify_touch() in weston/src/input.c:
Meanwhile, I find that weston does not handle multi-touch properly because its mt structure (below) uses an int value 'slot' which can only track the current slot number.
In multi-touch protocol type B, each slot associates with a finger contact and you get multiple slot events in a touch frame, for example, a touch_down frame;
weston handles events from first slot event to the EV_SYN event, and it call notify_touch() if EV_SYN is encountered. Therefore, weston cannot send the two touch down events sequentially via notify_touch() with different slot number parameter.
In my reimplementation, I change the mt structure: