[xmonad] Issue 408 in xmonad: WM_TAKE_FOCUS problem when using matlab gui for Xmonad 0.9.1, cpu amd64, Ubuntu 10.04 LTS system

codesite-noreply at google.com codesite-noreply at google.com
Mon Sep 27 05:00:42 EDT 2010

Status: New
Owner: ----

New issue 408 by lingyu.ma.fu: WM_TAKE_FOCUS problem when using matlab gui  
for Xmonad 0.9.1, cpu amd64, Ubuntu 10.04 LTS system

What steps will reproduce the problem?
1.Use "guide" command in matlab to generate a new gui.
2.Put a "edit text" component into the field.
3.Run the gui.

What is the expected output? What do you see instead?
The expected output should be that:
Man can choose (or focus on) the "edit text" component and change the  
However the output I got was that:
The "edit text" component can not be focused at all, the focus is only on  
the tui window, so I can not change the content inside the "edit text"  

What version of the product are you using? On what operating system?
The related version of the products are:
   CPU : amd64
   System : Ubuntu 10.04 LTS
   Xmonad : 0.9.1
   Matlab : R2010a
   Java : jre1.6.0_23

Are you using an xmonad.hs?  Please attach it and the output of "xmonad
I have two monitors, and I use the "gnomeConfig" instead  
of "defaultConfig", also the "wmname" has been set to "LG3D".
My "xmonad.hs" file can be found in the attachment.
By the way, it can compile and work fine, I just have this WM_TAKE_FOCUS  

Please provide any additional information below.
1. I'm aware that there was an issue 177 befoe, which can be found here:
And it seems the "comment 33" has already resolved this problem.
However I'm pretty new for using Xmonad. The words there are totally  
unreadble for me.
Also I install Xmonad with "sudo aptitude install xmonad", and I cannot  
find the "Core.hs" mentioned in issue 177.
In addition, issue 177 was published in 2009, I don't konw whether it still  
work with Ubuntu 10.04 built-in xmonad or not.
Can anyone give me a step by step instruction please?
For example, go to which file and paste or change which part or which line.
Can I only change the "xmonad.hs" file to sovle this problem?

2. I don't have any java "gray box" problem, just the gui subcomponent can  
not be focused on.

3. I'm looking for the solution for a long time.
There is a solution to change jre "motif21" into "motif12" and then set the  
enviorment variable "AWT_TOOLKIT=MToolkit".
I have tested it, this solution only works for not amd64 pcs.
For amd64 pc, it does NOT work at all.

4. This is the most suprising part.
When starting the matlab with desktop, man can choose which jre they want  
to use. For me I choose "jre1.6.0_23", which means I start matlab in bash  
with command "export MATLAB_JAVA=~/jre1.6.0_23 && matlab".
I use jre1.6.0_23 because matlab built-in java will give a grey box under  
With "jre1.6.0_23" the gui shows up, the gui "button" also works fine, only  
the "edit text" componet can no be focused.
And here comes the most suprising part :
If I use command "export MATLAB_JAVA=~/aaaaaaaaaa && matlab" to start  
matlab, where "~/aaaaaaaaaa" is a nonexisting directory, of course I cannot  
get a desktop because it cannot find any java.
But the gui now works perfectly.
It means although matlab lab hasn't been given any particular java path, it  
can still open gui and this time, the "edit text" component can be focused  
on and so changing the text inside is possible.
I don't understand why, but it happens.
Could anyone tell me why?

4. I also tried new "jdk 7", it cannot solve the problem.
Under "jdk 7", the gui is a "grey box", cannot show any components, also it  
makes matlab very very slow.

5. In addition, I tried "openjdk-6" instead of "jdk-6", again it doesn't  

6. Of course, the "wmname" has already been set to "LG3D" in  
the "xmonad.hs" file.

Hope to get replys soon.
Thanks in advance!!

	xmonad.hs  1.5 KB

More information about the xmonad mailing list