It turns out that it is not that hard to patch the unity
package for totally disabling its handling of multi-touches and gestures. Here are step by step instructions for patching unity-4.24.0
.
In a command line, enter:
sudo apt-get build-dep unity
cd /tmp #It can be done somewhere else, feel free to change the base location.
mkdir unity
cd unity
apt-get source unity
At this point, comment out the following 2 lines in the file
/tmp/unity/unity-4.24.0/plugins/unityshell/src/unityshell.cpp
:
GeisAdapter::Default()->Run();
gestureEngine = new GestureEngine(screen);
and the following 4 lines in the file /tmp/unity/unity-4.24.0/plugins/unityshell/src/Launcher.cpp
:
GeisAdapter& adapter = *(GeisAdapter::Default());
adapter.drag_start.connect(sigc::mem_fun(this, &Launcher::OnDragStart));
adapter.drag_update.connect(sigc::mem_fun(this, &Launcher::OnDragUpdate));
adapter.drag_finish.connect(sigc::mem_fun(this, &Launcher::OnDragFinish));
The source code is in C++
, so commenting a line is done by adding //
at the beginning of the line. For instance, the line
GeisAdapter::Default()->Run();
becomes
//GeisAdapter::Default()->Run(); .
Back to the command line, enter:
cd unity-4.24.0
dpkg-buildpackage -us -uc -nc
cd ..
sudo dpkg -i *deb
Et voila!
Now if you logout and log back in, gestures should function normally. Triple tap works on my system as a middle click by default, without a need for touchegg. But both touchegg and ginn now work well to define custom gestures for your applications.