Menu

#600 Make mouse wheel scrolling compatible with lesstif

open-accepted
nobody
Program (402)
5
2014-08-13
2007-09-21
Duane Clark
No

In the various dialogs (and in particular the file selection dialog is where I came across this), nedit implements mouse wheel scrolling by overriding the translations for various forms of <Btn4Down>,<Btn4Up>. Lesstif apparently decided to add builtin support for mouse wheel scrolling, but they did it by adding the translations to the variations of <Btn4Down>. The effect is that using the scroll wheel causes the list to scroll by the number of lines defined by lesstif, plus the number of lines defined by nedit. Since lesstif by default scrolls by a page minus one line, this makes it impossible to use the mouse wheel.

Changing nedit to use just the variations of <Btn4Down> causes nedit to completely override the lesstif defaults, returning normal operation.

I am running this on Fedora 7, with lesstif 0.95.0-20, which actually seems to work pretty good with nedit.

Index: util/misc.c

RCS file: /cvsroot/nedit/nedit/util/misc.c,v
retrieving revision 1.86
diff -u -r1.86 misc.c
--- util/misc.c 20 Jul 2007 16:09:19 -0000 1.86
+++ util/misc.c 21 Sep 2007 19:28:21 -0000
@@ -2070,12 +2070,12 @@
if (XmIsScrolledWindow(XtParent(w)))
{
static const char scrollTranslations[] =
- "Shift<Btn4Down>,<Btn4Up>: scrolled-window-scroll-up(1)\n"
- "Shift<Btn5Down>,<Btn5Up>: scrolled-window-scroll-down(1)\n"
- "Ctrl<Btn4Down>,<Btn4Up>: scrolled-window-page-up()\n"
- "Ctrl<Btn5Down>,<Btn5Up>: scrolled-window-page-down()\n"
- "<Btn4Down>,<Btn4Up>: scrolled-window-scroll-up(3)\n"
- "<Btn5Down>,<Btn5Up>: scrolled-window-scroll-down(3)\n";
+ "Shift<Btn4Down>: scrolled-window-scroll-up(1)\n"
+ "Shift<Btn5Down>: scrolled-window-scroll-down(1)\n"
+ "Ctrl<Btn4Down>: scrolled-window-page-up()\n"
+ "Ctrl<Btn5Down>: scrolled-window-page-down()\n"
+ "<Btn4Down>: scrolled-window-scroll-up(3)\n"
+ "<Btn5Down>: scrolled-window-scroll-down(3)\n";
static XtTranslations trans_table = NULL;

if (trans_table == NULL)

Discussion

  • Thorsten Haude

    Thorsten Haude - 2007-12-28
     
  • Thorsten Haude

    Thorsten Haude - 2007-12-28
    • labels: --> Program
    • status: open --> open-accepted
     
  • Thorsten Haude

    Thorsten Haude - 2007-12-28

    Logged In: YES
    user_id=119143
    Originator: NO

    Firstly, your patch did not survive Sourceforge.

    Secondly, I think this is a bug.

    Thirdly, your fix works on my Open Motif 2.2.3 and Lesstif 0.93.94. Please everyone, check whether this works for your Motif!
    File Added: mouse-translations.2007-12-29.1.diff

     
  • Duane Clark

    Duane Clark - 2007-12-28

    Logged In: YES
    user_id=750500
    Originator: YES

    Well, I guess whether it is a bug or not depends on your point of view ;) Anyway, I see it as just an incompatibility with Lesstif. The change should be harmless on other Motifs.

    For what it is worth, I believe this change is already incorporated into Fedora's nedit package.

     
  • Thorsten Haude

    Thorsten Haude - 2007-12-29

    Logged In: YES
    user_id=119143
    Originator: NO

    (What a stupid website these Fedora people build. All I want is a search field.)

    Do you know where I can Fedora's NEdit? Better still would be a description of the changes they did, I don't want to miss any more good stuff.

     
  • Duane Clark

    Duane Clark - 2007-12-29

    Logged In: YES
    user_id=750500
    Originator: YES

    I submitted this as a bug to Fedora:
    https://bugzilla.redhat.com/show_bug.cgi?id=354591
    As far as I know, they did the change I suggested.

    Yea, the Fedora website is a pain. I'll have to play around for awhile and see if I can figure out where to find nedit. I think I once saw that there was a page for each "component" in Fedora, but I can't figure out where that was.

     
  • Thorsten Haude

    Thorsten Haude - 2007-12-29

    Logged In: YES
    user_id=119143
    Originator: NO

    The list looks fine. I hope these guys would talk to us more often, but that's more their problem than ours.

    Thanks for your help!

     

Log in to post a comment.