Meego Wiki
Views
From MeeGo wiki
(Difference between revisions)
Jump to: navigation, search
(core pointer)
Line 4: Line 4:
During the MeeGo Conference I gave a presentation on multi-point-touch support on MeeGo ([http://conference2010.meego.com/session/multi-touch-meego-hardware-user overview and video] [http://conference2010.meego.com/sites/all/files/sessions/meego-conference-2010-multi-point-touch.odp slides]).  As mentioned during that presentation, to add multi-point-touch to Qt applications running on top of MeeGo 1.1 requires a few changes.   
During the MeeGo Conference I gave a presentation on multi-point-touch support on MeeGo ([http://conference2010.meego.com/session/multi-touch-meego-hardware-user overview and video] [http://conference2010.meego.com/sites/all/files/sessions/meego-conference-2010-multi-point-touch.odp slides]).  As mentioned during that presentation, to add multi-point-touch to Qt applications running on top of MeeGo 1.1 requires a few changes.   
-
The components that need to be changed are:
+
Since that presentation was made, work has continued to enable Qt directly vs. requiring the use of an application plug-in to perform the touch event routing.  As a result, the components that need to be changed in current (as of early January 2011) MeeGo systems are:
 +
 
* Kernel -- You need kernel touch drivers that are in sync with upstream.  As of January 1st 2011, MeeGo Trunk has the correct kernel drivers.
* Kernel -- You need kernel touch drivers that are in sync with upstream.  As of January 1st 2011, MeeGo Trunk has the correct kernel drivers.
* Qt -- You need a version of Qt that has the XInput2.0 patches applied
* Qt -- You need a version of Qt that has the XInput2.0 patches applied
Line 38: Line 39:
During the forced installation it will prompt you to switch to the versions of the various packages provided from the above repository, and may indicate the packages are downgrades (I haven't built Qt in my home project as many times as the version of Qt in Trunk.)  Accept the changes, and reboot.
During the forced installation it will prompt you to switch to the versions of the various packages provided from the above repository, and may indicate the packages are downgrades (I haven't built Qt in my home project as many times as the version of Qt in Trunk.)  Accept the changes, and reboot.
-
==enabling a native application==
+
===enabling a native application===
Prior to having patches to Qt to add XInput2.0 support, applications had to load a plugin that would connect to the X event queue and process the XInput2.0 events.  That is no longer necessary and applications will now just work.
Prior to having patches to Qt to add XInput2.0 support, applications had to load a plugin that would connect to the X event queue and process the XInput2.0 events.  That is no longer necessary and applications will now just work.
-
==enabling a QML application==
+
===enabling a QML application===
For gestures, you should use the qml-gesturearea project from qt-labs to add multi-point touch gestures to your QML applications.
For gestures, you should use the qml-gesturearea project from qt-labs to add multi-point touch gestures to your QML applications.
-
==qml-gesturearea==
+
===qml-gesturearea===
As Frederik Gladhorn indicated during [http://conference2010.meego.com/session/gestures-qt his talk] at the MeeGo Conference in Dublin, the folks over at Qt have been working on an improved QML GestureArea component.   
As Frederik Gladhorn indicated during [http://conference2010.meego.com/session/gestures-qt his talk] at the MeeGo Conference in Dublin, the folks over at Qt have been working on an improved QML GestureArea component.   
Line 56: Line 57:
  make && sudo make install
  make && sudo make install
-
==core pointer==
+
===core pointer===
If you do nothing, X will default to binding the touch device to the Core Pointer.  This means that as you move your finger around, mouse events will be generated, the cursor will move, etc.  If X is already running, you can use the xinput utility to "float" the touch device.  On the Lenovo S10, running 'xinput list' shows something like the following:
If you do nothing, X will default to binding the touch device to the Core Pointer.  This means that as you move your finger around, mouse events will be generated, the cursor will move, etc.  If X is already running, you can use the xinput utility to "float" the touch device.  On the Lenovo S10, running 'xinput list' shows something like the following:
Line 82: Line 83:
  EndSection
  EndSection
-
==meego packages you may need==
+
===meego packages you may need===
To perform the above steps on this wiki, a new MeeGo installation may need a few utilities and packages installed:
To perform the above steps on this wiki, a new MeeGo installation may need a few utilities and packages installed:
  zypper install git patch xorg-x11-utils-xinput
  zypper install git patch xorg-x11-utils-xinput

Revision as of 16:06, 13 January 2011

Random tidbits of information about projects I'm hacking on...

Contents

multi-point-touch

During the MeeGo Conference I gave a presentation on multi-point-touch support on MeeGo (overview and video slides). As mentioned during that presentation, to add multi-point-touch to Qt applications running on top of MeeGo 1.1 requires a few changes.

Since that presentation was made, work has continued to enable Qt directly vs. requiring the use of an application plug-in to perform the touch event routing. As a result, the components that need to be changed in current (as of early January 2011) MeeGo systems are:

  • Kernel -- You need kernel touch drivers that are in sync with upstream. As of January 1st 2011, MeeGo Trunk has the correct kernel drivers.
  • Qt -- You need a version of Qt that has the XInput2.0 patches applied

NOTE: If you had previously install the multipointtouchplugin, you need to remove it via one of these methods:

zypper remove multipointtouchplugin

or

rm /usr/lib/qt4/plugins/libmultipointtouchplugin.so

If you do not remove that plugin, touch will not work correctly with the XInput2.0 enabled version of Qt.

New components:

  • mtdev -- Library to translate kernel protocol A and B to protocol B, adding tracking information
  • xf86-input-mtev -- X input driver that communicates with mtdev to obtain multi-point data from the kernel

To get the above, you can add my home project:

cd /etc/zypp/repos.d
sudo wget http://download.meego.com/live/home:/jketreno/Trunk/home:jketreno.repo
sudo sed -i -e 's,^gpg,#gpg,g' home:jketreno.repo
zypper refresh

Next, force a re-installation of the packages provided from my home project:

zypper install -f --from=home_jketreno mtdev xf86-input-mtev

and then also force update these packages for Qt from my home project:

zypper install -f --from=home_jketreno \
       libqtcore4 libqtdbus4 libqtdeclarative4 libqtdeclarative4-folderlistmodel \
       libqtdeclarative4-gestures libqtdeclarative4-particles libqtdesigner4 \
       libqtgui4 libqthelp4 libqtnetwork4 libqtopengl4 libqtscript4 \
       libqtscripttools4 libqtsql4 libqtsql4-sqlite libqtsvg4 libqttest4 libqtxml4 \
       libqtxmlpatterns4 qt-demos qt-qmake qt-qmlviewer 

On my system I only install libqtgui4, but I don't really know which other Qt packages may depend on the internal X11 changes my patches made, so the above installs all of the Qt packages. If you want to try the minimal set, you can run this:

zypper install -f --from=home_jketreno libqtgui4

During the forced installation it will prompt you to switch to the versions of the various packages provided from the above repository, and may indicate the packages are downgrades (I haven't built Qt in my home project as many times as the version of Qt in Trunk.) Accept the changes, and reboot.

enabling a native application

Prior to having patches to Qt to add XInput2.0 support, applications had to load a plugin that would connect to the X event queue and process the XInput2.0 events. That is no longer necessary and applications will now just work.

enabling a QML application

For gestures, you should use the qml-gesturearea project from qt-labs to add multi-point touch gestures to your QML applications.

qml-gesturearea

As Frederik Gladhorn indicated during his talk at the MeeGo Conference in Dublin, the folks over at Qt have been working on an improved QML GestureArea component.

You can pull and play with what they're cooking as follows:

git clone git://gitorious.org/qt-labs/qml-gesturearea.git
git clone git://gitorious.org/qt-labs/qml-gestures-examples.git

If you are building qml-gesturearea with a version of Qt prior to 4.7.1, you may need to patch it to get it to build:

cd qml-gesturearea
sed -i -e 's,q->timeout(),700,g' qdeclarativegesturerecognizers.cpp
qmake
make && sudo make install

core pointer

If you do nothing, X will default to binding the touch device to the Core Pointer. This means that as you move your finger around, mouse events will be generated, the cursor will move, etc. If X is already running, you can use the xinput utility to "float" the touch device. On the Lenovo S10, running 'xinput list' shows something like the following:

⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Cando Corporation Cando 10.1 Multi Touch Panel with Controller    id=13   [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=16   [slave  pointer  (2)]
...

Looking at the above, you can see the touch device (Cando Corporation...) is device id 13. To float that input device, run:

xinput float 13

and verify that touching the screen no longer moves the mouse pointer.

To perform the following every time you start X, you can add:

Option "SendCoreEvents" "false"

to the InputClass section for the device, for example you can place the following in /usr/share/X11/xorg.conf.d as 60-cando.conf:

Section "InputClass"
        Identifier "Cando Multi Touch Panel"
        MatchVendor "Cando"
        MatchDevicePath "/dev/input/event*"
        Driver "mtev"
        Option "SendCoreEvents" "false"
EndSection

meego packages you may need

To perform the above steps on this wiki, a new MeeGo installation may need a few utilities and packages installed:

zypper install git patch xorg-x11-utils-xinput
Personal tools