! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
No overshoot effect when scrolling in exo-icon-view
Status:
RESOLVED: MOVED

Comments

Description Theo Linkspfeifer editbugs 2020-04-25 15:14:18 CEST
Created attachment 9794 
Add GDK_SMOOTH_SCROLL_MASK to event mask

The overshoot effect is handled by GtkScrolledWindow, but only if GDK_SMOOTH_SCROLL events are enabled. However, simply adding it to the event mask breaks Thunar's list view because exo_icon_view_scroll_event() expects the non-smooth scrolling data.
Comment 1 Theo Linkspfeifer editbugs 2020-04-25 15:37:28 CEST
Relevant: Bug 15936
Comment 2 alexxcons editbugs 2020-04-26 22:53:13 CEST
> However, simply adding it to the event mask breaks Thunar's list view because exo_icon_view_scroll_event() expects the non-smooth scrolling data.
So if I get it right, the attached patch will break Thunar's list view ... so we will need a thunar patch at the same time ?
Comment 3 Theo Linkspfeifer editbugs 2020-04-26 23:04:56 CEST
No, exo_icon_view_scroll_event() needs to be tweaked (see bug 15936).

https://git.xfce.org/xfce/exo/tree/exo/exo-icon-view.c#n2860
Comment 4 Theo Linkspfeifer editbugs 2020-05-07 14:40:44 CEST
Created attachment 9843 
quick diff

Like this.

Note that the overshoot effect is not present in list view (yet).
Comment 5 alexxcons editbugs 2020-05-10 10:42:15 CEST
(In reply to Theo Linkspfeifer from comment #4)
> Created attachment 9843 
> quick diff

Thanks Theo ! Afaik Sean is currently working on dropping all gtk2 dependencies, having gtk3 as requirement. Possibly best to wait until he is finished, so the #if GTK_CHECK_VERSION (3, 0, 0) can be dropped, and possibly the complete method can be simplified
 
> Note that the overshoot effect is not present in list view (yet).
Works for me for icon and detailed view. Only compact view does not have it yet .. (would require overshoot event on the left/right)
Comment 6 Theo Linkspfeifer editbugs 2020-05-10 11:08:12 CEST
> #if GTK_CHECK_VERSION (3, 0, 0)
Not really important, but small mistake here. This second check should check for 3.4.0 also.
Comment 7 Theo Linkspfeifer editbugs 2020-05-10 11:12:35 CEST
Interestingly, the effect is missing in Nemo's compact (list) view too.
Comment 8 Theo Linkspfeifer editbugs 2020-05-15 14:45:17 CEST
> Afaik Sean is currently working on dropping all gtk2 dependencies, having gtk3 as requirement.
https://gitlab.xfce.org/xfce/exo/-/commit/a978d108f49b7b0f232183473335aca33d1cc550
Comment 9 Theo Linkspfeifer editbugs 2020-05-16 12:12:21 CEST
> Only compact view does not have it yet .. (would require overshoot event on the left/right)
It works in Caja which manipulates the event attributes, see:
https://github.com/mate-desktop/caja/blob/master/src/file-manager/fm-icon-view.c#L2538

Should exo-icon-view copy that approach?
Comment 10 alexxcons editbugs 2020-05-17 21:59:44 CEST
(In reply to Theo Linkspfeifer from comment #9)
> > Only compact view does not have it yet .. (would require overshoot event on the left/right)
> It works in Caja which manipulates the event attributes, see:
> https://github.com/mate-desktop/caja/blob/master/src/file-manager/fm-icon-
> view.c#L2538
> 
> Should exo-icon-view copy that approach?
Makes sense to me to do it like that .. so from my POV, we can copy that approach.
Comment 11 Theo Linkspfeifer editbugs 2020-05-18 15:24:06 CEST
Created attachment 9875 
patch
Comment 12 alexxcons editbugs 2020-05-20 12:04:10 CEST
(In reply to Theo Linkspfeifer from comment #11)
> Created attachment 9875 
> patch

argh, seems like I have to update  my gtk version:
>exo-icon-view.c: In function ‘exo_icon_view_realize’:
>exo-icon-view.c:1717:27: error: ‘GDK_SMOOTH_SCROLL_MASK’ undeclared (first use in this function); did you mean >‘GDK_SCROLL_MASK’?
> 1717 |                         | GDK_SMOOTH_SCROLL_MASK
>      |                           ^~~~~~~~~~~~~~~~~~~~~~
>      |                           GDK_SCROLL_MASK
> exo-icon-view.c:1717:27: note: each undeclared identifier is reported only once for each function it appears in
> exo-icon-view.c: In function ‘exo_icon_view_scroll_event’:
> exo-icon-view.c:2883:32: error: ‘GDK_SCROLL_SMOOTH’ undeclared (first use in this function); did you mean ‘GTK_SCROLL_START’?
> 2883 |   else if (event->direction == GDK_SCROLL_SMOOTH)
>      |                                ^~~~~~~~~~~~~~~~~
>      |                                GTK_SCROLL_START

In any case, you need to bump the minimum gtk version to 3.4 in configure.ac.in (or use the old enums ... I guess best to ask Sean what is prefered)
Comment 13 alexxcons editbugs 2020-05-20 23:43:15 CEST
Sorry, your patch compiles fine with exo master, I just forgot to pull exo master before applying the patch.

Patch works fine here, scrolling still seems to work as before, so IMO good to push it.
Comment 14 Git Bot editbugs 2020-05-25 22:57:13 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/exo/-/issues/25.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #16759

Reported by:
Theo Linkspfeifer
Reported on: 2020-04-25
Last modified on: 2020-05-25

People

Assignee:
Xfce Bug Triage
CC List:
1 user

Version

Version:
0.12.11

Attachments

Add GDK_SMOOTH_SCROLL_MASK to event mask (911 bytes, application/octet-stream)
2020-04-25 15:14 CEST , Theo Linkspfeifer
no flags
quick diff (2.67 KB, patch)
2020-05-07 14:40 CEST , Theo Linkspfeifer
no flags
patch (2.75 KB, patch)
2020-05-18 15:24 CEST , Theo Linkspfeifer
no flags

Additional information