Closed cblc closed 1 year ago
My bad: it does compile, it was a wrong semicolon. But it does nothing.
I think Xt doesn't support specific translations for Btn 6/7 (https://gitlab.freedesktop.org/xorg/lib/libxt/-/blob/master/src/TMparse.c#L250).
Maybe using BtnDown and checking the button number in XButtonEvent works. I can't test it, I don't have btn 6/7.
In the OpenGL views that I create in Motif (with the GLw widget) in my apps, I'm able to detect both vertical and horizontal panning in the input callback, when event->type is equal to ButtonPress and when event->xbutton.button is equal to Button4, Button5, Button5+1, and Button5+2 (I don't use Button6/7, just add 1 and 2 to Button5, I don't remember if it's because it's not defined, or because in some X11 versions it's not available).
Is there any input callback for the TextArea, in which I could try this? Or would it interfere with the translations? (I never used translations -or I don't remember- so that's why I ask)
For testing, you can add something like "<BtnDown>,<BtnUp>: test()\n"
at the beginning of the translation table.
Another way is using XtAddEventHandler. I tested it with a lapdop touchpad and I can detect button 6/7 events. Looks like a very useful feature, I will add this to XNEdit.
That will be great, thank you!
Horizontal scrolling is now implemented. Can you test if it works correctly on your system?
Thank you very much!! I'll build it now and I'll report back!!
I con confirm it works great with the Magic Trackpad on MacOS. What a great addition!! Thanks a lot for implementing it!!!
I tried to modify text.c adding a couple translations for Btn6Down/Up and Btn7Down/Up with the hope of getting horizontal scrolling with the Trackpad, but it doesn't compile because they are undefined. I searched about horizontal scrolling with NEdit, and saw several people saying that it doesn't work. This question has an interesting comment pointing to this xdvi doc that says that they had to implement their own translations manager in xdvi for getting the horizontal scroll working.
But maybe you, knowing the NEdit internals much more than me, can have any idea of any possible workaround for getting it working?