Ticket #1381 (assigned defect)
clicking at touchscreen borders confuses libSDL's mouse cursor
| Reported by: | thebohemian@… | Owned by: | openmoko-devel |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | Distro | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: | buglog@… | Blocked By: | |
| Blocking: | Estimated Completion (week): | ||
| HasPatchForReview: | no | PatchReviewResult: | |
| Reproducible: |
Description
I have this problem with my GTA01 phase-1 phone but it most likely affects the
GTA02 too since the display has not changed.
The problem can be only seen in SDL application when the use the fullscreen
mode. An app which this affects and which is in OM already is kobodeluxe however
I wrote a small test app which can be placed into an OE tree and provides some
informative output.
With this test app I was able to observe the following (IMHO wrong) behavior:
If you touch the screen with the stylus at the upper border the cursor block
will move quickly towards the left or right end depending on whether you are on
the left or right half of it. If you now move the stylus to the other side the
cursor's movement will turn as well and will soon crash into the other end.
Analogus behavior can be observed with all the other borders.
Without looking at the code my assumption is that the touchscreen driver reports
values which are outside the bounds (smaller than 0 and bigger than
width/height) of what a normal mouse driver would report and the code in SDL is
not able to deal with this.
Attachments
Change History
Changed 5 years ago by thebohemian@…
- Attachment sdltest-bb+src.tar.bz2 added
comment:2 Changed 5 years ago by thebohemian@…
I got confirmation that this also affects GTA02.
A simpler description of the problem may be the following:
- start the test app (or kobodeluxe and start a game)
- take the stylus and touch the upper left corner of the screen (really besides
the case)
- touch the center of the screen
Result:
-> black block (or pointer in kobo) is not painted where you clicked but
somewhere else
Wanted result:
-> black block is painted exactly where I clicked
comment:4 Changed 5 years ago by thebohemian
I just found out that this problem is most likey *not* OpenMoko? specific. I assume it is not a hardware or touchscreen driver issue.
The reason for my assumption is that I installed the OpenEmbeded?-based Mamona distribution on my N770. Apart from a patched xorg-kdrive (omap support) it uses the same version libsdl as OpenMoko? and (surprise!) shows the same issue.
Perhaps things will be better if we could get libsdl 1.2.13 with all the patches Debian applies. Who knows. :)
comment:5 Changed 5 years ago by dolfje
Has somebody already looked into this?
I want to make buttons for gnuboy (gameboy emulator) for the Neo FreeRunner?, but I always get wrong coordinates by using libsdl, so I can't really know where the users presses.

simple SDL test app