This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

synth framebuffer and touchscreen emulation


Good afternoon list,

our board will have a TFT screen with touchscreen. I want to develop higher-level software using the synthetic target, and I succeeded in drawing images on the synthetic frame buffer window. So far so good.

However, I also want to add touchscreen emulation: the mouse should generate synthetic touchscreen events. Two questions:

 1) When I try to enable mouse awareness in the synthetic target by
    adding ButtonPressMask to the call to XSelectInput() in
    devs/framebuf/synth/current/host/framebuf.c, in handle_mapped()
    around line 1175, I get a runtime error from X during startup:

X Error of failed request: BadAccess (attempt to access private resource denied)
Major opcode of failed request: 2 (X_ChangeWindowAttributes)
Serial number of failed request: 10
Current serial number in output stream: 12


    The return value from XSelectInput() is 1, BadRequest.
    Surprisingly, the return value is also 1 when I don't enable
    ButtonPressMask, although drawing and refreshing works fine.

    How should I proceed to get mouse events from X11? Is there some
    magic going on in the Tcl/Tk X stuff that already forbids mouse
    events? I am not fluent in Tcl/Tk although I can read manuals.

    Useless aside: I can get keyboard events, the same as refresh
    events.

 2) What is the preferred way to create a synthetic touchscreen
    driver? It must necessarily be integrated into the framebuffer
    driver, because that one owns the X stuff. I wonder about
    integration in the synthetic communication between target,
    framebuffer and auxiliary.

Rutger Hofman
VU Amsterdam
http://www.rfidguardian.org

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]