Reply
Thread Tools
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#31
Strange. The first utility qobi posted only works when the window that you want to fix is not the active window. That complicates things.

I'll try the second version, I guess...
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
Posts: 77 | Thanked: 63 times | Joined on Sep 2009
#32
Originally Posted by rcs1000 View Post
Could you post that as a binary please, as I don't have the SDK setup here.

Thanks
I don't have the SDK setup either. I compiled it under a Debian chroot. I presume this binary might run native in maemo but I'm not sure.
Attached Files
File Type: tar set-focus.tar (10.0 KB, 165 views)
 

The Following User Says Thank You to qobi For This Useful Post:
javispedro's Avatar
Posts: 2,351 | Thanked: 5,243 times | Joined on Jan 2009 @ Barcelona
#33
Originally Posted by qole View Post
Strange. The first utility qobi posted only works when the window that you want to fix is not the active window. That complicates things.
You need to unfocus/refocus the window. That's what I wanted to do that on a PRELOAD'd library before the window is even mapped. Though I don't have much free time now...
 
Posts: 77 | Thanked: 63 times | Joined on Sep 2009
#34
Originally Posted by javispedro View Post
That's what I wanted to do that on a PRELOAD'd library before the window is even mapped.
Local LD_PRELOAD won't work for windows created by remote apps.
 
javispedro's Avatar
Posts: 2,351 | Thanked: 5,243 times | Joined on Jan 2009 @ Barcelona
#35
I don't see that as a problem. I am already doing something similar to support right clicking on a certain binary only app.

As for issue with emacs-lucid, do you have any other app failing in a similar way? it may be useful to isolate the issue.

Last edited by javispedro; 2009-12-16 at 00:55.
 
Posts: 77 | Thanked: 63 times | Joined on Sep 2009
#36
Originally Posted by javispedro View Post
I don't see that as a problem. I am already doing something similar to support right clicking on a certain binary only app.
It can be tedious if you need to setup LD_PRELOAD on a lot of different machines. I run remote emacs on numerous machines spanning i686, amd64, armv, several different Linux distros, Solaris, and AIX. It is a barrier to simply sshing into a new machine and running emacs.

Originally Posted by javispedro View Post
As for issue with emacs-lucid, do you have any other app failing in a similar way? it may be useful to isolate the issue.
I haven't found one. But last night I tried xterm, xcalc, gv, xpdf, acroread, matlab, and xmaple. Some handled input focus correctly out of the box. The rest worked correctly with set-input-hint. But many (at least xcalc, xmaple, and others but I don't recall which, but not matlab) incorrectly handled the keyboard. They did not allow typing blue-shifted characters, either as a prefix key or as a shift key, and treated the blue-shifted characters as the underlying alphabetic character. It is sort of hard to use xcalc and xmaple if you can't type numbers, +, *, (, ), etc.
 
debernardis's Avatar
Posts: 2,142 | Thanked: 2,054 times | Joined on Dec 2006 @ Sicily
#37
I can't seem to make them work, neither qobi's utility. I've got the Xephyr window id by wmctr -l, then given the hex id as an input to the binary. Then I go back to Xephyr window but no keys get accepted. Where is the point I am missing?

EDIT: well it works when I open a Xephyr window, then apply the hack, then open a gui app inside like abiword. Don't work when I merely call Debian Lxde and after I try to apply the hack to it.

Last edited by debernardis; 2009-12-19 at 17:36.
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#38
I have found that the key seems to be that you have to run the hack when the window to be hacked does not have focus. For me, this means running a script that uses Zenity to pop up a dialog box, then applying the hack to the window in the background. If the window is in the foreground when the hack is applied, it doesn't work to unfocus and refocus the window.

Here's my hackish script...

Code:
zenity --display=:0 --info --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 the Xephyr window to appear
  export PARWIN=`wmctrl -l | grep -i Xephyr | awk '{print $1}'`
done
wmctrl -i -r $PARWIN -b toggle,fullscreen
while [ "x$TWOWIN" = "x" ] ; do
  # wait for the Information dialog to appear
  export TWOWIN=`wmctrl -l | grep -i Information | awk '{print $1}'`
done
wmctrl -i -a $TWOWIN
/usr/bin/set-focus $PARWIN
wmctrl -i -a $PARWIN
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!

Last edited by qole; 2009-12-19 at 18:51. Reason: Added the script
 

The Following User Says Thank You to qole For This Useful Post:
debernardis's Avatar
Posts: 2,142 | Thanked: 2,054 times | Joined on Dec 2006 @ Sicily
#39
Had problems with your latest script, because chars don't get to the window and open the contacts app instead. By hand it works. In the pic, jwm
Attached Images
 
__________________
Ernesto de Bernardis

 
VDVsx's Avatar
Posts: 1,070 | Thanked: 1,604 times | Joined on Sep 2008 @ Helsinki
#40
Someone found a workaround for the hardware keyboard bug in canola, same bug affecting BlueMaemo: https://bugs.maemo.org/show_bug.cgi?id=6511#c4

Maybe it also works for your apps.
__________________
Valério Valério
www.valeriovalerio.org
 

The Following 2 Users Say Thank You to VDVsx For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 06:35.