View Single Post
Old 09-02-2013, 07:31 AM   #1049
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
To "Forward" things - and additionally to rename the windows

https://www.mobileread.com/forums/sho...d.php?t=194270

to get the current "window name" use

xwininfo -tree -root

if you are unsure of what your thing is called.

To rename / reorder the layers use xdotool (The following assumes you created a false extensions folder called xdotool to install the files to in /mnt/us/extensions/xdotool/bin and the libs are placed in /mnt/us/extensions/xdotool/lib, adjust this to your reality )

Here's the general script to force things frontwards.

Code:
#!/bin/sh
# arg sanity check
if [ -z "$1" ]; then
echo fail, enter search
exit
fi

#adjust to your reality
export LD_LIBRARY_PATH=/mnt/us/extensions/xdotool/lib:$LD_LIBRARY_PATH
export PATH=/mnt/us/extensions/xdotool/bin:$PATH

wids=`xdotool search "$1"`
#wids=`xdotool search "$1" | tac` # optionally reverse the order
# reversing the order is often desirable to get multi layered windows to 
# display their chronologically last child as the front window.
echo "----------------------------"
echo "searching on $1"

# make it space free
INNER=`echo -ne $1 | sed 's/ //g'`
echo tidied name value is: $INNER
echo "----------------------------"

for wid in $wids; do
echo "window being processed --- $wid"

#rename them
#Portrait
#xdotool set_window --name "L:A_N:application_ID:com.""$INNER""_PC:N" $wid
#Landscape
xdotool set_window --name "L:A_N:application_ID:com.""$INNER""_O:R_PC:N" $wid

#stick them at the very top of the stack.
# this order of iteration may not be the right one for all cases.
xdotool windowreparent $wid `xwininfo -root | awk ' /xwininfo: Window id:/  {print $4}'`

done


and call that like ./fronter.sh app_window_name

I'm not suggesting this is a good solution.
Just throwing around a few tricks for your testing.

Last edited by twobob; 09-02-2013 at 12:30 PM. Reason: spaces unknown operands
twobob is offline   Reply With Quote