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.
Now to a description of the problem: I always run matlab in a terminal
(-nodesktop), and I want that terminal to stay focused, even If you issue
a command like "figure(1)". The problem is that, despite that I have
FocusStyle * !GrabFocus, OverrideGrabFocus, !FocusByProgram
in my config, matlap gives the focus to figure 1 if I isseu the command.
If a figure already is active it will focus and raise. Otherwise it will
start up focused. Even if I do 'Style "Figure *" NeverFocus' the figure
will be focused on the command figure(1) (or when clicking on the window
(but I use EnterToFocus, !LeaveToUnfocus, and not ClickToFocus, so it's
matlab doing that focusing too). I tried to look at the focus code myself
to see if there was anything I could do to force matlab not to focus it's
figures on itself, but wasn't able to make out how the code worked.
I did however find that when starting matlab with -nojvm it does not steal
the focus at all. However I sometimes need the jvm, so it's not a good
solution.
I need some help by someone who know the specification, and more of the
X-protocol than I do. I have two major questions:
1. Is it possible to make fvwm not allow the said focus change to happen?
2. Is matlab breaking any standard (and in that case what), and do you
think it's worth submitting a bug report to MathWorks about it?
/Viktor