View Single Post
Posts: 915 | Thanked: 3,209 times | Joined on Jan 2011 @ Germany
#2387
Originally Posted by Estel View Post
Thanks for info. Ho ever, it was first thing I've tried, and terminal reply is:

Code:
line 122: gdb: command not found
gdb is a debugger. There's a Debian package called gdb. Please install it and try again! Maybe then you'll get a useful message. Either version, Lenny or Squeeze should be fine, whatever comes with fewer dependency trouble.

Originally Posted by Estel View Post
I'm glad You've practically solved you problem with keyboard!
Well, as long as I can't sort out the set-focus issue I don't think a Squeeze-only ED will be very useful. I'll keep on searching.

Originally Posted by Estel View Post
As for testing scenario, well, it involves LibreOffice, so You probably won't be interested
Not really.


Edit:
I think I've found the set-focus problem but unfortunately I don't know how to solve it yet.

In the ED image there is the script /usr/bin/xephwm5:
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 --text="Welcome to Easy Debian LXDE. This window is needed to gain keyboard focus in LXDE. Click OK." &trl -l
/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}'`
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
#/sbin/qobi-wmhint-fix $PARWIN
/usr/bin/set-focus $PARWIN
wmctrl -i -a $PARWIN
/usr/bin/$WMEXEC
killall Xephyr
export DISPLAY=:0
Towards the end there is this line:
Code:
/usr/bin/set-focus $PARWIN
$PARWIN contains a hexadecimal number, the identifier of the ED window in Maemo.
In my case this number is 0x04000002:
Code:
~ $ debbie wmctrl -l
[..]
0x03800059  0 Nokia-N900-02-8 Fotos
0x0380005c  0 Nokia-N900-02-8 Fotos
0x01800cd3  0 Nokia-N900-02-8 hildon-home
0x01800de0  0 Nokia-N900-02-8 hildon-home
0x01800f9f  0 Nokia-N900-02-8 hildon-home
0x018013ba  0 Nokia-N900-02-8 hildon-home
0x03217172  0 Nokia-N900-02-8 m5v3e
0x04000002  0             N/A Easy Debian
So I called set-focus manually from within the Squeeze image but got the following error message:
Code:
sh-4.1$ set-focus 0x04000002
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  42 (X_SetInputFocus)
  Resource id in failed request:  0x4000002
  Serial number of failed request:  7
  Current serial number in output stream:  7
The same thing worked fine with the image that I didn't dist-upgrade.
Does anybody have an idea? The easiest thing I can think of right now is that due to the upgrade of some C libraries set-focus doesn't work properly anymore. Unfortunately without the source code I can't even recompile it to verify that theory.

Edit:
This bug report might be helpful for understanding the general nature of the problem:
http://web.archiveorange.com/archive...DYQzZS9uVf9WRU
Right now I don't see how to adress the problem without debugging the set-focus source code.

Another edit:
Argh! Yes, there is a problem but it's less grave than I thought. The problem when switching from ED via Ctrl + Backspace is that somehow the Ctrl key gets stuck. Therefore if I return to ED pressing F in Leafpad doesn't write an "f" but opens the find dialogue. Even after closing this dialogue Ctrl is still stuck. And Ctrl + clicking window close X doesn't close windows (at least not in openbox). If I press (and release) Ctrl once after returning to ED everything is back to normal.
I guess the easiest solution would be to change the Ctrl + Backspace window switch action from key press events to release events. I'll try that, but first I need to get some sleep.
Good night everyone!

Last edited by sulu; 2011-09-01 at 23:14.
 

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