Bug 354012 - Wish: change page by swiping on touchscreen during presentation mode
Summary: Wish: change page by swiping on touchscreen during presentation mode
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-17 18:37 UTC by Oliver Sander
Modified: 2017-03-19 23:35 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Sander 2015-10-17 18:37:06 UTC
I have a thinkpad yoga which has a touchpad, a touchscreen, and a pen.  All three are separate input devices.  The keyboard and touchpad can fold away completely, which leaves you with a tablet-like device.  I use this to do presentations.  I cannot leave the keyboard there while presenting because I draw on my slides with the pen, and the keyboard gets in the way of my drawing hand.

However, in presentation mode, left mouse click goes to the next page, and right mouse click goes to the previous one.  However, using the touchpad buttons is not an option as the keyboard is folded away.  A finger tap on the touchscreen is interpreted as left click, so I can go forward in the presentation, but not backward.

My wish: please make okular let me get to the next/previous page of a presentation when I do a left-to-right/right-to-left swiping gesture on the touchscreen.

The make things a bit more complicated: [I am not sure whether the following is a separate wish or not]  When I'm presenting, I have one of the drawing tools activated basically all of the time.  I can draw okay with the pen.  However, my finger (remember: that's not the same input device as the pen) is also wired to 'drawing'.  Consequences:  a) I cannot change the page at all anymore. b) I cannot rest my palm on the touchscreen for writing, because okular interprets my palm as an attempt to draw something.

I know of related wishes such as https://bugs.kde.org/show_bug.cgi?id=346979
In contrast to others, I try here to focus on a single issue only, so it is not a duplicate.

Reproducible: Always
Comment 1 Oliver Sander 2015-10-25 21:12:37 UTC
I wrote a patch for this.  Albert, do you want this for the master branch or the frameworks branch?
Comment 2 Albert Astals Cid 2015-10-26 18:38:41 UTC
master
Comment 3 Oliver Sander 2015-10-26 21:16:23 UTC
I was afraid you were going to say this... :-)

I just spent the last two hours unsuccessfully trying to port the patch from the frameworks branch to master.  Qt4 replaces the touch events (from the touchpad) with mouse events, which then of course do not allow gestures.  In Qt5 there is 

QCoreApplication::setAttribute(Qt::AA_SynthesizeMouseForUnhandledTouchEvents,false);

which disables this behavior, but I have no clue how to do the same in Qt4.  Does anybody have an idea?
Comment 4 Albert Astals Cid 2015-10-26 22:32:14 UTC
Well, the more things you put in frameworks the harder it is for me to decide to look into it since people keep developing and using it without even caring the tests in it pass.

If you want you can create a merge request against frameworks but it immediately moves its priority down.
Comment 5 Oliver Sander 2015-10-28 20:14:54 UTC
Fair enough.  I have now posted my patch against the 'frameworks' branch:

https://git.reviewboard.kde.org/r/125847/

Maybe somebody finds it useful, or knows what to do to get it to work on master.
Comment 6 Albert Astals Cid 2017-03-19 23:35:33 UTC
Git commit 618072f8a2ea77ba7ad1241abac088487dee04b3 by Albert Astals Cid, on behalf of Oliver Sander.
Committed on 19/03/2017 at 23:32.
Pushed by aacid into branch 'master'.

Change pages in presentation mode by swiping on touch screen

REVIEW: 130012

M  +37   -3    ui/presentationwidget.cpp
M  +2    -0    ui/presentationwidget.h

https://commits.kde.org/okular/618072f8a2ea77ba7ad1241abac088487dee04b3