#1 Possible to vertically mirror XInput?


Xournal is a nifty package - every bit as good as Microsoft Journal, and then some.

But I'm having a problem that might be a simple fix I have overlooked. I'm using a Samsung Q1 UMPC with Ubuntu Feisty, along with the Xournal 0.3.3 package from the Ubuntu repositories. I have the evtouch driver installed from here: http://stz-softwaretechnik.com/~ke/touchscreen/evtouch.html

If I have "SwapY" and "SendCoreEvents" enabled in xorg.conf, all of my interactions with the UI in Gnome and Xournal are correct, right-side-up, but any attempt to write onto a Xournal page is upside-down, mirrored about the centerline of the screen. I can provide a screenshot if desired.

If I disable "SendCoreEvents" (or "Use XInput" in Xournal), writing is correctly right-side-up but at lower resolution, as expected.

If I disable "SwapY" in xorg.conf, the UI turns upside-down as expected, and Xournal writing is STILL upside-down, which is not what I expected.

If there a setting I can change to fix this, or something relatively simple to fix in the source? I'd be happy to try any suggestion, or compile from source if necessary.



  • Denis Auroux

    Denis Auroux - 2007-06-17

    Logged In: YES
    Originator: NO

    I'm afraid I don't know how to make it work for your special setup without breaking things for everyone else, but it's easy enough to patch the source to mirror the Y coordinates at which xournal reads all xinput events.

    - just in case, the first thing you should try is, at the top of main.c, changing the first line
    ... just in case it helps (I'm not sure why it should, but one never knows). If it doesn't help, better to set it back to 1.

    - otherwise, things happen at line 340 of xo-misc.c:
    *py = (axes[1]/axis_width)*ui.screen_height + sy - wy;
    Try changing this to
    *py = (1.0-axes[1]/axis_width)*ui.screen_height + sy - wy;
    (if I misunderstood which axis you want to flip, do a similar modification to line 336 instead)

    - in case I misunderstood the exact symptoms and this ends up drawing in the wrong place when
    you're not in fullscreen mode (shifted Y positions), then you should try instead switching
    line 340 back to what it was originally, and instead add another line just after it, containing
    *py = ui.screen_height-*py;

    (of course after each modification of the source code you need to recompile, and make sure that
    you run the executable in the src directory, and not the one installed in /usr/local/bin).

    Good luck!

  • Clarke Wixon

    Clarke Wixon - 2007-06-19

    Logged In: YES
    Originator: YES

    Beautiful. Thank you VERY MUCH for the detailed information. The minor change to line 340 of xo-misc.c fixed it for me. Now the writing tracks the stylus perfectly and smoothly, regardless of the size or position of the program window. And all else continues to work as expected.

    I wonder whether other UMPCs suffer from this. It may be worth adding an entry in the runtime .xournal/config file in the next revision.

    Again, thanks, and nice work.

  • Clarke Wixon

    Clarke Wixon - 2007-06-19
    • status: open --> closed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks