Talk:Necessitas/TODO

From KDE Community Wiki

Subject: Mouse move events from Android to Qt:

@Bogdan & Co

Just to confirm, in android-lighthouse repository, in android-lighthouse/src/plugins/platforms/android/common/sw/androidjnimain.cpp

I noticed wrapper functions for Qt mouse-event handlers on C++ side, which are called upon via Android SurfaceView on android side. In this mouseMove(...) function, the event that is passed to Qt event queue via QWindowSystemInterface is QEvent::MouseButtonPress. Shouldn't it be QEvent::MouseMove?

The given function is pasted here as follows,


static void mouseMove(JNIEnv */*env*/, jobject /*thiz*/, jint /*winId*/, jint x, jint y) {

   QWindowSystemInterface::handleMouseEvent(0,
                                                    QEvent::MouseButtonPress,QPoint(x,y),QPoint(x,y),
                                            Qt::MouseButtons(Qt::LeftButton));

}