← Back to team overview

multi-touch-dev team mailing list archive

Re: ginn doesn't recognize rotated screen

 

Hi Paul,

These issues were discussed about screen rotation were already discussed.
And each device needs a special script like yours (there still no standard
way to detect tablet mode in X)


I will start looking in a solution in ginn for such problem, but in a new
version.
But, as for now, you still can prepare a special wishes file for each
rotated mode and load it.
(and this can be put in your script, when a rotation is detected, kill ginn
and load it with another wishes file)


i



On Tue, Feb 1, 2011 at 8:09 PM, Paul S <paulatgm@xxxxxxxxx> wrote:

> I'm playing with ginn on maverick on a 2-touch condo driver lenovo s10-3t
> netbook.  I have my screen rotated and am using evince.
>
> When I run 2 fingers in the left / right direction, the page is moving down
> / up.  And fingers up / down tries to scroll left / right.  In other words,
> ginn still thinks the screen is in the original position.
>
> I use the rotator script below.  Is there something missing that will make
> the rotated screen behave properly?
>
> rotator.sh:
> #!/bin/bash
>
> # Change device number to the correct one listed in xinput --list --short.
> Each time the script is run from the
> # terminal, it should flip the screen.
>
> # this script will 1) determine current orientation 2) rotate to the right
> 90 deg
>
>
>
> syntax_error=0
>
> orientation=0
>
>
>
>
> current_orientation="$(xrandr -q --verbose | grep 'connected' | egrep -o
>  '\) (normal|left|inverted|right) \(' | egrep -o
> '(normal|left|inverted|right)')"
> #echo "cur_orie is $current_orientation at start"
>
> case $current_orientation in
>
>        normal)
>
>                current_orientation=0
>
>        ;;
>
>        left)
>
>                current_orientation=1
>
>        ;;
>
>        inverted)
>
>                current_orientation=2
>
>        ;;
>
>        right)
>
>                current_orientation=3
>
>        ;;
>
> esac
>
> #echo "cur_orient is $current_orientation set by case"
>
> # make it go in a round robin to the right
>
> if [ $current_orientation -eq 0 ]; then
>
>        orientation=3
>
> fi
>
> if [ $current_orientation -eq 1 ]; then
>
>        orientation=0
> fi
> if [ $current_orientation -eq 2 ]; then
>        orientation=1
> fi
> if [ $current_orientation -eq 3 ]; then
>        orientation=2
> fi
> #echo "orientation set to $orientation"
>
> method=evdev
>
> # LENOVO S10-3t CHANGE ==> Hard Coded my device number to 11!!!!!!!!
>
> device=11
>
> swap=0
> invert_x=0
> invert_y=0
> real_topx=0
> real_topy=0
> real_bottomx=4020
> real_bottomy=4020
>
> case $orientation in
>        0)
>                swap=0
>                invert_x=0
>                invert_y=0
>                topx=$real_topx
>                topy=$real_topy
>                bottomx=$real_bottomx
>                bottomy=$real_bottomy
>        ;;
>        1)
>                swap=1
>                invert_x=1
>                invert_y=0
>                topx=$real_topx
>                topy=$real_topy
>                bottomx=$real_bottomy
>                bottomy=$real_bottomx
>        ;;
>        2 )
>                swap=0
>                invert_x=1
>                invert_y=1
>                topx=$real_topx
>                topy=$real_topy
>                bottomx=$real_bottomx
>                bottomy=$real_bottomy
>        ;;
>        3 )
>                swap=1
>                invert_x=0
>                invert_y=1
>                topx=$real_topx
>                topy=$real_topy
>                bottomx=$real_bottomy
>                bottomy=$real_bottomx
>        ;;
> esac
>
> if [ $method = "evdev" ]; then
>        xinput set-prop "$device" "Evdev Axes Swap" $swap
>        xinput set-prop "$device" "Evdev Axes Swap" $swap
>        xinput set-prop "$device" "Evdev Axis Inversion" $invert_x $invert_y
>        xinput set-prop "$device" "Evdev Axis Calibration" $topx $bottomx
> $topy $bottomy
>        if [ $orientation = 1 ]; then
>                xrandr -o left
>        fi
>        if [ $orientation = 3 ]; then
>                xrandr -o right
>        fi
>        if [ $orientation = 2 ]; then
>                xrandr -o inverted
>        fi
>        if [ $orientation = 0 ]; then
>                xrandr -o normal
>        fi
> fi
>
>

Follow ups

References