On Sat, 3 Dec 2005, Tavis Ormandy wrote:

On Sat, Dec 03, 2005 at 11:28:47PM +0100, Viktor Griph wrote:
I've encounted a strange, and undesired, behaviour with matlab 7.x
(maybe eralier versions too), and I've tried all fvwm options available
and I still can't get it to work right. My conclution is that matlab must
break some rule. I write this in hope that someone knows of a way to go
around that behaviour.

I've had a similar problem with a different proprietary application, it
used XSetInputFocus() whenever it wanted my attention, very annoying :)

If this is what it's doing, afaik there is no way around it. I solved
it with a preload library, for example, try this:

$ cat libmatlab.c
#include <X11/Xlib.h>
int XSetInputFocus(Display *d, Window w, int i, Time t) { return 0;}
$ gcc -shared -fPIC libmatlab.c -o libmatlab.so
$ LD_PRELOAD=`pwd`/libmatlab.so matlab -nodesktop

If it works, you could create a wrapper script to set LD_PRELOAD before
starting matlab (dont have matlab here to test).

Hope this helps, Tavis.

Thank you! It works perfectly. Of course it would be best not to have to do rappers, so I would still want to know what standard matlab breaks. (I guess it's ICCCM, but if anyone that knows more precise where matlab does wrong it would hale me write a good bug report.

/Viktor

Reply via email to