Re: [QtMoko] landscape mode under QX

2011-09-18 Thread fdvjoif

For scummvm I would like to use the AUX button to access the in game

It would be needed to disable qtmoko's AUX handling - it switches between
application first. Then there will probably be no easy way to switch back from
QX.


Just to try, I added

> xmodmap -e "keycode 177 = F5"

to the script. Using ScummVM when you press the AUX button of course you 
turn back to qtmoko but when you push the "resume" button you come back 
to scummvm with the game menu opened. It's uncomfortable but it works.
But it brings to another problem: when you press AUX or receive a 
call/sms you come back to qtmoko but the screen is all messed up and it 
is difficult to take actions.
This happens only when the screen is somehow rotated. I thought that, 
because qtmoko uses framebuffer, set a rotation directly in framebuffer


> echo 1 > /sys/class/graphics/fb0/rotate

could solve the problem but instead it produces exactly the same 
problem. So, if you rotate the screen using Xorg or framebuffer the 
QtMoko GUI becomes all messed up. I also tryed to first rotate the GUI 
(Settings-->Rotation) and then rotate the screen or to set new virtual 
size both in framebuffer and Xorg (with no success) but the result is 
the same.

I'm stuck here... :(

Joif

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QtMoko] landscape mode under QX

2011-09-16 Thread Radek Polak
On Pá 16. září 2011 13:02:33 fdvj...@vodafone.it wrote:

> Found the problem with xorg, maybe it just needs to load :)
> 
> this script works quite well and without matchbox:
>  > #!/bin/sh
>  > sleep 5
>  > xrandr -o 1
>  > xinput set-int-prop "Touchscreen" "Evdev Axis Inversion" 8 0 1
>  > xinput set-int-prop "Touchscreen" "Evdev Axes Swap" 8 0
>  > xinput set-int-prop "Touchscreen" "Evdev Axis Calibration" 32 98 911
> 
> 918 107
> 
>  > APP_NAME_HERE
> 
> Now remains only the issue with the refresh frequence when the screen is
> rotated, but for now it is noticeable mainly with OpenTTD. I tryed with
> ScummVM and NumptyPhysics and (it seems to me) it is not a problem.
> Is it possible to implement this script as a launcher in the Qx menu? How?

I can take a look at QX sources and implement it, then i can send you new 
recompiled binary.

> For scummvm I would like to use the AUX button to access the in game

It would be needed to disable qtmoko's AUX handling - it switches between 
application first. Then there will probably be no easy way to switch back from 
QX. Maybe it would be better to remap POWER?

I played with keys remaping - on desktop it worked for me somehow so it should 
be possible to make it working on neo too. I hope i will have some time during 
this weekend to play with this.

Regards

Radek

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QtMoko] landscape mode under QX

2011-09-16 Thread fdvjoif

Found the problem with xorg, maybe it just needs to load :)
this script works quite well and without matchbox:

> #!/bin/sh
> sleep 5
> xrandr -o 1
> xinput set-int-prop "Touchscreen" "Evdev Axis Inversion" 8 0 1
> xinput set-int-prop "Touchscreen" "Evdev Axes Swap" 8 0
> xinput set-int-prop "Touchscreen" "Evdev Axis Calibration" 32 98 911 
918 107

> APP_NAME_HERE

Now remains only the issue with the refresh frequence when the screen is 
rotated, but for now it is noticeable mainly with OpenTTD. I tryed with 
ScummVM and NumptyPhysics and (it seems to me) it is not a problem.

Is it possible to implement this script as a launcher in the Qx menu? How?

For scummvm I would like to use the AUX button to access the in game 
menus, the GameRunner guys use this script:


> #!/bin/sh
>
> # Save current AUX Key mapping
> SAVE_KEY="$(xmodmap -pke | grep 'keycode 177')"
>
> # Remove the Enlightenment binding for AUX
> enlightenment_remote -binding-key-del ANY "Keycode-177" NONE 1 
"simple_lock" ""

>
> # Map AUX Key to F5
> xmodmap -e "keycode 177 = F5"
[...]
> # Restore the AUX Key mapping
> xmodmap -e "$SAVE_KEY"
>
> # Restore Enlightenment mapping
> enlightenment_remote -binding-key-add ANY "Keycode-177" NONE 1 
"simple_lock" ""


any idea on how to adapt it to QtMoko? Thank you!

Joif

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QtMoko] landscape mode under QX

2011-09-14 Thread Guilhem Bonnefille
2011/9/14 Francesco De Vita :
> Hi!
> I found a workaround to use apps under qx and in a usable landscape mode.
> You have to make a simple script but:
> - you have to launch it within xterm with matchbox (+ virtual keyboard);
> - the screen flickers a little (very little, it is usable), I think I have
> to set a proper screen refresh rate but I didn't manage to get it yet;
>
> example:
>
>> #!/bin/sh
>> killall matchbox-keyboard
>> xrandr -o 1
>> xinput set-int-prop "Touchscreen" "Evdev Axis Inversion" 8 0 1
>> xinput set-int-prop "Touchscreen" "Evdev Axes Swap" 8 0
>> xinput set-int-prop "Touchscreen" "Evdev Axis Calibration" 32 98 911 918
>> 107
>>
>> YOUR_APP_HERE
>>
>> xrandr -o normal
>> xinput set-int-prop "Touchscreen" "Evdev Axis Inversion" 8 0 0
>> xinput set-int-prop "Touchscreen" "Evdev Axes Swap" 8 1
>> xinput set-int-prop "Touchscreen" "Evdev Axis Calibration" 32 107 918 911
>> 98
>
> change YOUR_APP_HERE with for example:
> openttd
> numptyphysics -geometry 640x480
> scummvm

You can have a generic wrapper if you replace YOUR_APP_HERE with (I think):
"$@"


-- 
Guilhem BONNEFILLE
-=- JID: gu...@im.apinc.org MSN: guilhem_bonnefi...@hotmail.com
-=- mailto:guilhem.bonnefi...@gmail.com
-=- http://nathguil.free.fr/

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QtMoko] landscape mode under QX

2011-09-14 Thread Francesco De Vita
Hi!
I found a workaround to use apps under qx and in a usable landscape mode.
You have to make a simple script but:
- you have to launch it within xterm with matchbox (+ virtual keyboard);
- the screen flickers a little (very little, it is usable), I think I have
to set a proper screen refresh rate but I didn't manage to get it yet;

example:

> #!/bin/sh
> killall matchbox-keyboard
> xrandr -o 1
> xinput set-int-prop "Touchscreen" "Evdev Axis Inversion" 8 0 1
> xinput set-int-prop "Touchscreen" "Evdev Axes Swap" 8 0
> xinput set-int-prop "Touchscreen" "Evdev Axis Calibration" 32 98 911 918
107
>
> YOUR_APP_HERE
>
> xrandr -o normal
> xinput set-int-prop "Touchscreen" "Evdev Axis Inversion" 8 0 0
> xinput set-int-prop "Touchscreen" "Evdev Axes Swap" 8 1
> xinput set-int-prop "Touchscreen" "Evdev Axis Calibration" 32 107 918 911
98

change YOUR_APP_HERE with for example:
openttd
numptyphysics -geometry 640x480
scummvm

enjoy ;)

Joif
___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QtMoko] landscape mode under QX

2011-09-13 Thread Francesco De Vita
Il 12/09/2011 16:01, Radek Polak ha scritto:
> Hi,
> you can try:
>
> xinput set-int-prop "S3C24XX TouchScreen" "Evdev Axis Calibration" 32 107 918
> 911 98
> xinput set-int-prop "S3C24XX TouchScreen" "Evdev Axes Swap" 8 1

Hi Radek
Thanks for the suggestions.
To correctly rotate the screen this works:
xrandr -o 1
xinput set-int-prop "Touchscreen" "Evdev Axis Inversion" 8 0 1
xinput set-int-prop "Touchscreen" "Evdev Axes Swap" 8 0

and to bring back the screen in the original position:
xrandr -o normal
xinput set-int-prop "Touchscreen" "Evdev Axis Inversion" 8 0 0
xinput set-int-prop "Touchscreen" "Evdev Axes Swap" 8 1

So with two simple scripts it is possible to switch the screen between
normal and landscape mode.
But there are some issues:
- when the screen is in landscape mode there is a little offset between
the cursor and the stylus (the cursor is a little below the area
effectively touched on the screen, is not very precise, I wonder why..);
- the screen flickers a little, maybe is it necessary to set a proper
refresh frequence?
- the scripts must be launched within xterm otherwise they do not work;
- for better result xterm must be launched using machbox otherwise, when
the screen is rotated, there is a black box on the right side (and it
seems to me that it has the same dimensions of the "docked keyboard" but
I don't know why xorg draws it), see screenshots below.

for example, if I want to run openttd, first I have to run xterm with
matchbox and then launch this script:
#!/bin/sh
killall matchbox-keyboard
xrandr -o 1
xinput set-int-prop "Touchscreen" "Evdev Axis Inversion" 8 0 1
xinput set-int-prop "Touchscreen" "Evdev Axes Swap" 8 0
openttd

screenshots:
openttd launched in xterm:
http://img195.imageshack.us/img195/8881/openttd.jpg
openttd launched in xterm with matchbox:
http://img843.imageshack.us/img843/5232/openttdmatchbox.jpg

Regards
Joif

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QtMoko] landscape mode under QX

2011-09-12 Thread Radek Polak
On Monday 12 September 2011 14:45:02 Francesco De Vita wrote:

> So, I would like to know:
> - how to have under QX a correctly rotated screen in landscape mode, maybe
> in fullscreen without matchbox;
> - how to correct the rotation of the touchscreen axes;
> Thank you!

Hi,
you can try:

http://lists.linuxtogo.org/pipermail/smartphones-userland/2011-
August/003037.html

or

xinput set-int-prop "S3C24XX TouchScreen" "Evdev Axis Calibration" 32 107 918
911 98
xinput set-int-prop "S3C24XX TouchScreen" "Evdev Axes Swap" 8 1

I havent worked on this for some time, but i think i somehow got it working in 
the end...

Regards

Radek

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [QtMoko] landscape mode under QX

2011-09-12 Thread Radek Polak
On Monday 12 September 2011 14:45:02 Francesco De Vita wrote:

> So, I would like to know:
> - how to have under QX a correctly rotated screen in landscape mode, maybe
> in fullscreen without matchbox;
> - how to correct the rotation of the touchscreen axes;

You can try:

http://lists.linuxtogo.org/pipermail/smartphones-userland/2011-
August/003037.html

or

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community