View Single Post
rebhana's Avatar
Posts: 579 | Thanked: 471 times | Joined on Jan 2010 @ Austria
#1699
Originally Posted by Critical_Impact View Post
I have a similar problem. It is with the game Tile World. I tried using qobi-wmhint-fix through a shell script to bring focus back to the game but I'm having trouble automating it. I can get it to work manually though.

Would it be possible for anyone to create a program or shell script that will run a program and apply the fix automatically to it after running it?
You could try something analogous to qole's hacks for LXDE in $CHROOT/usr/bin/xephwm5 (but with qobi-wmhint-fix in place of setfocus), to wit,
Code:
#!/bin/sh
##################################
#Change these two variables to the WM of your choice.
WMNAME="$1" ; WMEXEC="$2"
[ "x$WMNAME" != x ] ||  WMNAME="Xephyr"
[ "x$WMEXEC" != x ] ||  WMEXEC="startlxde1"
##################################
export DISPLAY=:0
export TSLIB_TSDEVICE=/dev/input/event3
#export TSLIB_CALIBFILE=/etc/pointercal
export GTK_MODULES=libgtkstylus.so
zenity --display=:0 --info --title="Information" --text="Welcome to Easy Debian LXDE. This window is needed to gain keyboard focus in LXDE. Click OK." &
/usr/bin/Xephyr :1 -screen 800x480 -br -ac &
while [ "x$PARWIN" = "x" ] ; do
  # wait for Xephyr window to appear
  export PARWIN=`wmctrl -l | grep -i $WMNAME | awk '{print $1}'`
  echo "($PARWIN)"
done
DISPLAY=:1 ; habak -mf /usr/share/fonts/truetype/DroidSans-Bold.ttf \
     -ht 'Ctrl-back to return to dashboard.'
DISPLAY=:0 ; wmctrl -i -r $PARWIN -T 'Easy Debian'
wmctrl -i -r $PARWIN -b toggle,fullscreen
while [ "x$TWOWIN" = "x" ] ; do
  # wait for Zenity dialog to pop up...
  export TWOWIN=`wmctrl -l | grep -i Information | awk '{print $1}'`
done
#echo window id: $TWOWIN
wmctrl -i -a $TWOWIN
sudo /sbin/qobi-wmhint-fix $PARWIN
#/usr/bin/set-focus $PARWIN
wmctrl -i -a $PARWIN
/usr/bin/$WMEXEC
killall Xephyr
export DISPLAY=:0
That could perhaps be adapted by replacing WMNAME and WMEXEC according to your needs.

Or have you already tried exactly this?
__________________
Need more apps for the N900? Check out Qole's Easy Debian and read the wiki!
My Easy Debian installation log

Last edited by rebhana; 2010-08-31 at 20:11.
 

The Following User Says Thank You to rebhana For This Useful Post: