imageView: Deny DragSource for touchscreens
Before, the DragSource gesture was claimed on touchscreens, while no dnd was available there anyways. This caused swiping through images to only work unreliably. Issue #176 Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/264>
This commit is contained in:
parent
c4d8145dd3
commit
d13acea38a
1 changed files with 5 additions and 2 deletions
|
|
@ -174,8 +174,11 @@ mod imp {
|
|||
.current_page()
|
||||
.map(|p| p.image().is_hscrollable() || p.image().is_vscrollable());
|
||||
|
||||
// do scrolling if scrollable
|
||||
if is_scrollable == Some(true) {
|
||||
if is_scrollable == Some(true)
|
||||
|| gesture.device().map(|x| x.source())
|
||||
== Some(gdk::InputSource::Touchscreen)
|
||||
{
|
||||
// Do scrolling if scrollable and no drag and drop on touchscreen
|
||||
gesture.set_state(gtk::EventSequenceState::Denied);
|
||||
None
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue