[maemo-users] X Server Keyboard not working

From: Jeffrey Mark Siskind qobi at purdue.edu
Date: Mon Dec 14 05:20:45 EET 2009
I can't be certain but my guess is that this is the the X input focus issue.
Apparently, Nokia changed the window manager in maemo5 so that it doesn't set
input focus on windows as they are exposed. So that apps need to call
XSetInputFocus() if they want input focus. Apparently most window managers
don't exhibit this behavior and many apps were written assuming that they did
not need to call XSetInputFocus(). There is some debate as to what the spec
requires. But in any case many apps, such as emacs, and apparently also kmail,
don't work with the maemo5 window manager, even when run remotely.

There have been many threads on this, among them see:


My feeling is that while this may have been technically allowed by the spec (I
don't know, I haven't read the spec) it definitely is the case that many very
long-standing programs are broken by this so it was not a good idea. It is
important to adhere to informal accepted practises as well as formal standards.

Nokia did this for reasonable engineering reasons. It saves power on mobile
devices. And apparently they felt that the majority of users would use apps
specifically designed and compiled for the device. But there is a large
community of users who use this device as a Linux computer, running standard
Linux/Unix apps either ported to run natively in maemo, run in a chroot, or run
remotely over X. And it is not reasonable to modify and recompile the huge
base of Linux/Unix code to be compatible with the N900.

I hope Nokia patches this, at least to make it a user-configurable option. In
the short term, I almost have working a workaround, a shell script that runs
in the background, detecting when windows get exposed and calling
XSetInputFocus() on them. It works but is currently power hungry and specific
to emacs. I'm working on making it more power efficient and more general. I'll
post it when I'm done.

    Jeff (http://www.ece.purdue.edu/~qobi)
More information about the maemo-users mailing list