From: Jon Trulson Date: Mon, 14 Oct 2019 20:34:56 +0000 (-0600) Subject: dtfile: Add scroll wheel support X-Git-Tag: 2.3.1~21 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1972d3e378a1035dc3241eda2cb4285170dc01a2;p=oweals%2Fcde.git dtfile: Add scroll wheel support This patch was manually added via a diff supplied from a user on the CDE mailing list: Michele Ghisolfo --- 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; }