Closed GoogleCodeExporter closed 8 years ago
Hi Vinícius,
1 and 2) You can find the implementation of the actions in
src/touchegg/actions/implementation, you can try to adjust the speed easily
adjusting the lines 52 and 53:
http://code.google.com/p/touchegg/source/browse/touchegg/src/touchegg/actions/im
plementation/Scroll.cpp
The speed of the scrolls changes in every Ubuntu versions and is difficult to
find a good value
3) Check executeFinish method in:
http://code.google.com/p/touchegg/source/browse/touchegg/src/touchegg/actions/im
plementation/DragAndDrop.cpp
It's very easy to add a QTimer in this method and perform the
"XTestFakeButtonEvent(QX11Info::display(), this->button, false, 0);" line on
the timer fire
Greetings
PS - I'm from spain, not brazil ;)
Original comment by jose.exposito89@gmail.com
on 5 Oct 2012 at 1:48
All the code is documented with doxygen, check this file:
http://code.google.com/p/touchegg/source/browse/touchegg/HACKING
Original comment by jose.exposito89@gmail.com
on 5 Oct 2012 at 1:49
Oh I tought you were brazilian... Sorry! I will try these solutions and post
here the results...
If scroll speed changes, is it possible soft code this parameter, in
touchegg.conf?
Original comment by vinicius...@gmail.com
on 5 Oct 2012 at 2:18
Yes, you can select speed between 1 and 10, and adjust this params in code
Original comment by jose.exposito89@gmail.com
on 5 Oct 2012 at 2:19
Issues 2 and 3 solved:
in
http://code.google.com/p/touchegg/source/browse/touchegg/src/touchegg/actions/im
plementation/Scroll.cpp
I changed lines 52 and 53 from
this->verticalSpeed = 40 - 2 * configSpeed;
this->horizontalSpeed = 40 - 2 * configSpeed;
to
this->verticalSpeed = 1000 - 100 * configSpeed;
this->horizontalSpeed = 1000 - 100 * configSpeed;
In
http://code.google.com/p/touchegg/source/browse/touchegg/src/touchegg/actions/im
plementation/DragAndDrop.cpp
I changed line 61 from
QCursor::setPos(QCursor::pos().x() + attrs.value(GEIS_GESTURE_ATTRIBUTE_DELTA_X).toFloat(),
QCursor::pos().y() + attrs.value(GEIS_GESTURE_ATTRIBUTE_DELTA_Y).toFloat());
to
QCursor::setPos(QCursor::pos().x() +
(attrs.value(GEIS_GESTURE_ATTRIBUTE_DELTA_X).toFloat())/10.0,
QCursor::pos().y() + (attrs.value(GEIS_GESTURE_ATTRIBUTE_DELTA_Y).toFloat())/10.0);
I'm thinking how to solve 3rd issue... and I have another thing: is it possible
implementate inertial scrolling?
Original comment by vinicius...@gmail.com
on 5 Oct 2012 at 5:15
Issue 1 and 2 solved (correcting =S )
Original comment by vinicius...@gmail.com
on 5 Oct 2012 at 5:45
Thanks, I'll try this features in Quantal and I'll add then, thanks!!
Original comment by jose.exposito89@gmail.com
on 7 Oct 2012 at 9:38
After some testing in 12.10 looks like the default mouse speed is ok
Original comment by jose.exposito89@gmail.com
on 21 Oct 2012 at 8:05
Hello Jose,
Sorry for posting in an old issue, but as the behaviour I want to replicate is
explained here I thought it would be a good place to post this.
I am trying to tweak the DragAndDrop.cpp file in order to add a delay as the OP
explained as 3er issue.
I tried to follow your tip about adding a QTimer in the executeFinish method
like so:
QTimer::singleShot(500,this,SLOT(XTestFakeButtonEvent(QX11Info::display(),
this->button, false, 0)));
But I get the following error when compiling:
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_XML_LIB
-DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64
-I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml
-I/usr/include/qt4 -I. -o DragAndDrop.o
src/touchegg/actions/implementation/DragAndDrop.cpp
src/touchegg/actions/implementation/DragAndDrop.cpp: In member function
‘virtual void DragAndDrop::executeFinish(const QHash<QString, QVariant>&)’:
src/touchegg/actions/implementation/DragAndDrop.cpp:67:104: error: no matching
function for call to ‘QTimer::singleShot(int, DragAndDrop* const, const char
[67])’
QTimer::singleShot(500,this,SLOT(XTestFakeButtonEvent(QX11Info::display(), this->button, false, 0)));
^
src/touchegg/actions/implementation/DragAndDrop.cpp:67:104: note: candidate is:
In file included from /usr/include/qt4/QtCore/QtCore:78:0,
from ./src/touchegg/util/Include.h:24,
from src/touchegg/actions/implementation/DragAndDrop.h:24,
from src/touchegg/actions/implementation/DragAndDrop.cpp:21:
/usr/include/qt4/QtCore/qtimer.h:78:17: note: static void
QTimer::singleShot(int, QObject*, const char*)
static void singleShot(int msec, QObject *receiver, const char *member);
^
/usr/include/qt4/QtCore/qtimer.h:78:17: note: no known conversion for
argument 2 from ‘DragAndDrop* const’ to ‘QObject*’
make: *** [DragAndDrop.o] Error 1
Please note that I obviously have no clue about using Qt and just gave it a
shot based on a few examples I found.
Could you please post how that line should be modified in order to make it work?
Thank you in advance and congrats for this great piece of software :)
Original comment by antoniog...@gmail.com
on 1 Mar 2015 at 12:45
Original issue reported on code.google.com by
vinicius...@gmail.com
on 5 Oct 2012 at 12:11