summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2016-11-04 14:15:47 -0400
committerlukefromdc <[email protected]>2016-11-04 14:56:08 -0400
commitae053dbf2cc26ae74df5e782261c3a3bc7126763 (patch)
tree217796cbb0e21a2b59f881595ec56c598438c454 /src
parentf34590dd7a71251515b90cd9812878b7d26d30b6 (diff)
downloadcaja-ae053dbf2cc26ae74df5e782261c3a3bc7126763.tar.bz2
caja-ae053dbf2cc26ae74df5e782261c3a3bc7126763.tar.xz
Compact view: ensure horizontal mouse wheel works both directions
Apply patch by ZenWalker for horizontal scrollwheel mice, without it scrolling left or right scrolls right only
Diffstat (limited to 'src')
-rw-r--r--src/file-manager/fm-icon-view.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/file-manager/fm-icon-view.c b/src/file-manager/fm-icon-view.c
index fe6148e2..d5980511 100644
--- a/src/file-manager/fm-icon-view.c
+++ b/src/file-manager/fm-icon-view.c
@@ -2507,16 +2507,15 @@ fm_icon_view_scroll_event (GtkWidget *widget,
scroll_event_copy = (GdkEventScroll *) event_copy;
- /* transform vertical integer smooth scroll events into horizontal events */
- if (scroll_event_copy->direction == GDK_SCROLL_SMOOTH &&
- scroll_event_copy->delta_x == 0) {
- if (scroll_event_copy->delta_y == 1.0) {
- scroll_event_copy->direction = GDK_SCROLL_DOWN;
- } else if (scroll_event_copy->delta_y == -1.0) {
- scroll_event_copy->direction = GDK_SCROLL_UP;
- }
- }
- if (scroll_event_copy->direction == GDK_SCROLL_UP)
+ /* transform vertical integer smooth scroll events into horizontal events */
+ if (scroll_event_copy->direction == GDK_SCROLL_SMOOTH && scroll_event_copy->delta_x == 0) {
+ if (scroll_event_copy->delta_y == 1.0) {
+ scroll_event_copy->direction = GDK_SCROLL_DOWN;
+ } else if (scroll_event_copy->delta_y == -1.0) {
+ scroll_event_copy->direction = GDK_SCROLL_UP;
+ }
+ }
+ if ((scroll_event_copy->direction == GDK_SCROLL_UP) || (scroll_event_copy->delta_x == -1.0))
{
scroll_event_copy->direction = GDK_SCROLL_LEFT;
}