From ee7dab99e199af9aef09224d261f2055b10a0f86 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Mon, 22 Jun 2009 20:57:32 +0000 Subject: xserver-common, zaurusd: Use native xserver orientation for spitz, akita and borzoi, updated X11/Xinit.d/11zaurus. --- .../files/avoid-rotated-server.patch | 72 ++++++++++++++++++++++ recipes/xserver-common/xserver-common_1.25.bb | 3 +- recipes/zaurusd/files/avoid-rotated-server.patch | 12 ++-- 3 files changed, 80 insertions(+), 7 deletions(-) create mode 100644 recipes/xserver-common/files/avoid-rotated-server.patch (limited to 'recipes') diff --git a/recipes/xserver-common/files/avoid-rotated-server.patch b/recipes/xserver-common/files/avoid-rotated-server.patch new file mode 100644 index 0000000000..7511ed9acd --- /dev/null +++ b/recipes/xserver-common/files/avoid-rotated-server.patch @@ -0,0 +1,72 @@ +Index: xserver-common-1.25/X11/Xserver +=================================================================== +--- xserver-common-1.25.orig/X11/Xserver 2009-06-18 20:48:31.000000000 +0000 ++++ xserver-common-1.25/X11/Xserver 2009-06-18 20:49:36.000000000 +0000 +@@ -48,6 +48,7 @@ + + SCREEN_SIZE=`fallback_screen_arg` + export USER=root ++export XSERVER_DEFAULT_ORIENTATION=normal + + ARGS="-br -pn $INPUT_EXTRA_ARGS" + +@@ -88,7 +89,9 @@ + "SHARP Shepherd" | "SHARP Husky" | "SHARP Corgi") + ARGS="$ARGS -dpi 200 -rgba rgb" ;; + "SHARP Spitz" | "SHARP Akita" | "SHARP Borzoi") +- ARGS="$ARGS -dpi 200 -rgba rgb -screen 480x640@270" ;; ++ ARGS="$ARGS -dpi 200 -rgba rgb -screen 480x640" ++ export XSERVER_DEFAULT_ORIENTATION=normal ++ ;; + "Simpad") + ARGS="$ARGS -dpi 100 -rgba rgb" ;; + "Generic OMAP1510/1610/1710") +Index: xserver-common-1.25/X11/Xinit.d/11zaurus +=================================================================== +--- xserver-common-1.25.orig/X11/Xinit.d/11zaurus 2009-06-18 20:48:31.000000000 +0000 ++++ xserver-common-1.25/X11/Xinit.d/11zaurus 2009-06-18 21:07:14.000000000 +0000 +@@ -1,23 +1,35 @@ + #!/bin/sh + +-if [ -z "`which chkhinge`" ]; then +- # probably not a clamshell zaurus +- exit 0 ++if [ -z "`which chkhinge 2>/dev/null`" ]; then ++ # not a clamshell zaurus or we have kernel 2.6 ++ # no rotation status check available ++ CHCK=true ++else ++ CHCK=chkhinge + fi + + module_id() { + # Get model name +- echo `grep "^Hardware" /proc/cpuinfo | sed -e "s/.*: *//" | tr a-z A-Z` ++ echo `grep "^Hardware" /proc/cpuinfo | sed -e "s/.*: *//"` + } + +-chkhinge -e ++$CHCK -e + if [ $? = 12 ]; then + case `module_id` in +- *SPITZ | *AKITA | *BORZOI) +- DIRECTION="left" ;; +- default) ++ *Spitz | *Akita | *Borzoi) ++ DIRECTION="normal" ;; ++ *) + DIRECTION="right" ;; + esac +- xrandr -o $DIRECTION ++else ++ case `module_id` in ++ *Spitz | *Akita | *Borzoi) ++ # Xfbdev needs to settle ++ sleep 2 ++ DIRECTION="right" ;; ++ *) ++ DIRECTION="normal" ;; ++ esac + fi + ++xrandr -o $DIRECTION diff --git a/recipes/xserver-common/xserver-common_1.25.bb b/recipes/xserver-common/xserver-common_1.25.bb index e0a12319b8..9db0c2a8d2 100644 --- a/recipes/xserver-common/xserver-common_1.25.bb +++ b/recipes/xserver-common/xserver-common_1.25.bb @@ -2,7 +2,7 @@ DESCRIPTION = "Common X11 scripts and support files" LICENSE = "GPL" SECTION = "x11" RDEPENDS_${PN} = "xmodmap xrandr xdpyinfo" -PR = "r0" +PR = "r1" PACKAGE_ARCH = "all" @@ -11,6 +11,7 @@ inherit gpe SRC_URI_append = " file://setDPI.sh \ file://89xdgautostart.sh \ + file://avoid-rotated-server.patch;patch=1 \ " do_install_append() { diff --git a/recipes/zaurusd/files/avoid-rotated-server.patch b/recipes/zaurusd/files/avoid-rotated-server.patch index be1005f70e..0ee601222e 100644 --- a/recipes/zaurusd/files/avoid-rotated-server.patch +++ b/recipes/zaurusd/files/avoid-rotated-server.patch @@ -10,8 +10,8 @@ Index: zaurusd/config/mach-config/mach-akita-vars.in \ No newline at end of file +ALSA_MIXER_INIT=@appconfdir@/alsa/cxx00-default.state + -+export XRANDR_LANDSCAPE=normal -+export XRANDR_PORTRAIT=left ++export XRANDR_LANDSCAPE=right ++export XRANDR_PORTRAIT=normal Index: zaurusd/config/mach-config/mach-borzoi-vars.in =================================================================== --- zaurusd.orig/config/mach-config/mach-borzoi-vars.in 2009-03-07 11:04:43.000000000 +0000 @@ -27,8 +27,8 @@ Index: zaurusd/config/mach-config/mach-borzoi-vars.in \ No newline at end of file +ALSA_MIXER_INIT=@appconfdir@/alsa/cxx00-default.state + -+export XRANDR_LANDSCAPE=normal -+export XRANDR_PORTRAIT=left ++export XRANDR_LANDSCAPE=right ++export XRANDR_PORTRAIT=normal Index: zaurusd/config/mach-config/mach-corgi-vars.in =================================================================== --- zaurusd.orig/config/mach-config/mach-corgi-vars.in 2009-03-07 11:04:43.000000000 +0000 @@ -108,8 +108,8 @@ Index: zaurusd/config/mach-config/mach-spitz-vars.in \ No newline at end of file +ALSA_MIXER_INIT=@appconfdir@/alsa/cxx00-default.state + -+export XRANDR_LANDSCAPE=normal -+export XRANDR_PORTRAIT=left ++export XRANDR_LANDSCAPE=right ++export XRANDR_PORTRAIT=normal Index: zaurusd/config/mach-config/mach-tosa-vars.in =================================================================== --- zaurusd.orig/config/mach-config/mach-tosa-vars.in 2009-03-07 11:04:43.000000000 +0000 -- cgit 1.2.3-korg