After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 730656 - [PATCH] Support touchscreen gestures
[PATCH] Support touchscreen gestures
Status: RESOLVED FIXED
Product: eog
Classification: Core
Component: gestures
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Carlos Garnacho
EOG Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-05-23 18:20 UTC by Carlos Garnacho
Modified: 2014-08-13 19:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Carlos Garnacho 2014-05-23 18:20:48 UTC
When developing the gestures branch on GTK+, I took eog as an specimen to test it around, now that the gestures branch has been merged in GTK+, it would be great to get this feature in :). The patches are at https://git.gnome.org/browse/eog/?h=gestures , the small branch adds:

- Zooming/Rotating on 2-finger gestures, the latter is done in 90 degree increments, and has a resistance, so switching back doesn't happen accidentally
- Pan to left/right gestures to switch to next/prev image, this only kicks in if the view is not scrollable horizontally, otherwise scrolling happens

This only affects touchscreen devices, mice will behave as usual.
Comment 1 Felix Riemann 2014-06-02 17:03:06 UTC
Interesting, is there a way to "test" these on non-touchscreen devices, e.g. by using a (multi-)touchpad or simulating the input?
Comment 2 Carlos Garnacho 2014-06-02 23:33:49 UTC
There is just limited testing available through setting the GTK_TEST_TOUCHSCREEN envvar, that'll make mice behave as touch events. This could help testing the pan gesture, but won't help much for zoom/rotate gestures... A few weeks ago I took a screencast of this working on evince/eog (at https://people.gnome.org/~carlosg/gtk-gestures.webm), might not be much, but I hope it's enough to get an idea of how this feels.
Comment 3 Felix Riemann 2014-08-12 21:38:39 UTC
Oh, just noticed the rotate gesture transforms the EogImage directly instead of using EogJobTransform. The direct transformation could be unproblematic. The added eog_image_modified in eog_image_real_transform likely is not since this will be called asynchronously by the transformation jobs EogWindow spawns. That could cause some multithreaded X11 calls, which tend to make the X server abort eog.

However, on a second thought even if the gesture would use an EogJob, I think we might miss some pieces. Can you try if the Undo and Save actions are made sensitive in the UI after rotating an image with a gesture? If not, the gesture probably has to callback to EogWindow as does the Next/Prev gesture.

At least until I finally get down to refactor the EogImage and EogWindow monsters. :/
Comment 4 Carlos Garnacho 2014-08-13 11:56:42 UTC
(In reply to comment #3)
> Oh, just noticed the rotate gesture transforms the EogImage directly instead of
> using EogJobTransform. The direct transformation could be unproblematic. The
> added eog_image_modified in eog_image_real_transform likely is not since this
> will be called asynchronously by the transformation jobs EogWindow spawns. That
> could cause some multithreaded X11 calls, which tend to make the X server abort
> eog.
> 
> However, on a second thought even if the gesture would use an EogJob, I think
> we might miss some pieces. Can you try if the Undo and Save actions are made
> sensitive in the UI after rotating an image with a gesture? If not, the gesture
> probably has to callback to EogWindow as does the Next/Prev gesture.

Oops, you're right. I saw closing the window would spawn the "save modified files?" dialog, but missed checking the UI got properly updated too.

I've updated the rotate patches to have EogWindow listen for rotation changes and apply_transformation() there, and removed the eog_image_modified() call.
Comment 5 Felix Riemann 2014-08-13 19:47:25 UTC
Thanks! Should be merged now. :)
---
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.