Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: "Eric Bénard" <eric@eukrea.com>
To: openembedded-devel@lists.openembedded.org
Subject: [PATCH 2/2] qt-demo-init: correctly handle qtdemo for qt4-x11
Date: Fri, 26 Nov 2010 11:22:53 +0100	[thread overview]
Message-ID: <1290766973-11967-2-git-send-email-eric@eukrea.com> (raw)
In-Reply-To: <1290766973-11967-1-git-send-email-eric@eukrea.com>

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 recipes/qt4/qt-demo-init/qtdemo-init |   21 ++++++++++++++++++---
 recipes/qt4/qt-demo-init_0.1.bb      |    2 +-
 2 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/recipes/qt4/qt-demo-init/qtdemo-init b/recipes/qt4/qt-demo-init/qtdemo-init
index 8eb8771..ee84be2 100644
--- a/recipes/qt4/qt-demo-init/qtdemo-init
+++ b/recipes/qt4/qt-demo-init/qtdemo-init
@@ -3,7 +3,7 @@
 set -e
 
 if [ -f /usr/bin/qtdemo ]; then
-	QTDEMO=qtdemo
+	QTDEMO="qtdemo > /var/log/Xsession.log 2>&1"
 else
 	QTDEMO="qtdemoE -qws"
 fi
@@ -18,14 +18,29 @@ case "$1" in
 		if [ ! -f /etc/pointercal ]; then
 			/usr/bin/ts_calibrate
 		fi
-		QWS_MOUSE_PROTO=tslib:$TSLIB_TSDEVICE $QTDEMO &
+		if [ $QTDEMO == qtdemo ]; then
+			Xorg &
+			export DISPLAY=:0
+			$QTDEMO &
+		else
+			QWS_MOUSE_PROTO=tslib:$TSLIB_TSDEVICE $QTDEMO &
+		fi
 	else
+		if [ $QTDEMO == qtdemo ]; then
+			Xorg &
+			export DISPLAY=:0
+		fi
 		$QTDEMO &
 	fi
 	;;
   stop)
 	echo "Stopping qtdemo"
-	killall qtdemoE
+	if [ $QTDEMO == qtdemo ]; then
+		killall Xorg
+		killall qtdemo
+	else
+		killall qtdemoE
+	fi
 	;;
   restart)
 	$0 stop
diff --git a/recipes/qt4/qt-demo-init_0.1.bb b/recipes/qt4/qt-demo-init_0.1.bb
index 223ea7e..89eec6c 100644
--- a/recipes/qt4/qt-demo-init_0.1.bb
+++ b/recipes/qt4/qt-demo-init_0.1.bb
@@ -1,7 +1,7 @@
 DESCRIPTION = "Init script for qtdemo"
 LICENSE = "MIT"
 SRC_URI = "file://qtdemo-init"
-PR = "r0"
+PR = "r1"
 
 PACKAGE_ARCH = "all"
 
-- 
1.6.3.3




  reply	other threads:[~2010-11-26 10:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-26 10:22 [PATCH 1/2] add qt4-x11-base and demo images Eric Bénard
2010-11-26 10:22 ` Eric Bénard [this message]
2010-11-26 11:19 ` Koen Kooi
2010-11-28 14:00   ` [PATCH] add task-qt4-x11 and qt4-x11 base & " Eric Bénard
2010-11-29 10:01     ` Koen Kooi
2010-11-29 21:25       ` Khem Raj
2010-11-30  6:31         ` Eric Bénard
2010-11-30 18:06           ` Khem Raj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1290766973-11967-2-git-send-email-eric@eukrea.com \
    --to=eric@eukrea.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox