From 1972d3e378a1035dc3241eda2cb4285170dc01a2 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Mon, 14 Oct 2019 14:34:56 -0600 Subject: [PATCH] dtfile: Add scroll wheel support This patch was manually added via a diff supplied from a user on the CDE mailing list: Michele Ghisolfo --- cde/programs/dtfile/IconWindow.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cde/programs/dtfile/IconWindow.c b/cde/programs/dtfile/IconWindow.c index 3892448e..a4bbeaf6 100644 --- a/cde/programs/dtfile/IconWindow.c +++ b/cde/programs/dtfile/IconWindow.c @@ -300,7 +300,6 @@ FileWindowInputCallback( Modifiers modif; int offset; Boolean found; - /* Do nothing if a Button 2 drag is already ramping up */ if (B2DragPossible) return; @@ -835,7 +834,15 @@ FileWindowInputCallback( } else { - event = (XButtonPressedEvent *)new_event; + event = (XButtonPressedEvent *)new_event; /* %%% */ + if(event->button == Button4 || event->button == Button5) { + String p = event->button == Button4 ? "up" : "down"; + String q = event->button == Button4 ? "IncrementUpOrLeft" : "IncrementDownOrRight"; + if( VerticalScrollbarIsVisible( + file_mgr_rec->vertical_scroll_bar, + file_mgr_rec->scroll_window)) + XtCallActionProc( file_mgr_rec->vertical_scroll_bar, q, new_event, &p, 1 ); + } if(event->button != Button1) return; } -- 2.25.1