From a3de3e6ad1aae1f7bb2c718eebd1d635e6717916 Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Mon, 19 Nov 2012 15:54:24 +0000 Subject: Run xephyr in a custom window Xephyr doesn't work very well with multiple outputs. This should allow us to customize our behavior in that case. --- (limited to 'commands/run') diff --git a/commands/run b/commands/run index 70f9611..875d2a7 100755 --- a/commands/run +++ b/commands/run @@ -32,13 +32,17 @@ else screen_dpi=`$helpersdir/get-screen-dpi` xephyr_options="-dpi $screen_dpi" - if [ -z $RUN_IN_WINDOW ]; then - xephyr_options="$xephyr_options -fullscreen" - fi + xidfile=`mktemp -t sugar-xephyr-xid-XXXXXX` + $helpersdir/xephyr-window $RESOLUTION > $xidfile & + xephyrwindowpid=$! - if [ ! -z $RESOLUTION ]; then - xephyr_options="$xephyr_options -screen $RESOLUTION" - fi + while [ ! -s $xidfile ] + do + sleep 1 + done + xephyr_options="$xephyr_options -parent `cat $xidfile`" xinit $helpersdir/xinitrc -- /usr/bin/Xephyr $display $xephyr_options + + kill $xephyrwindowpid fi -- cgit v0.9.1