Ticket #1381 (assigned defect)

Opened 5 years ago

Last modified 4 years ago

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

sdltest-bb+src.tar.bz2 (78.4 KB) - added by thebohemian@… 5 years ago.
simple SDL test app

Change History

Changed 5 years ago by thebohemian@…

simple SDL test app

comment:1 Changed 5 years ago by sean_chiang@…

  • Status changed from new to assigned

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:3 Changed 5 years ago by roh

  • Owner changed from sean_chiang@… to sean_chiang

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.

comment:6 Changed 5 years ago by john_lee

  • Owner changed from sean_chiang to openmoko-devel
  • HasPatchForReview unset
  • Component changed from Screen to Distro

comment:7 Changed 4 years ago by ipse

I also experience problems with ScummVM (with SDL backend) - cursor often jumps to some random position when I click on the screen.

Note: See TracTickets for help on using tickets.