On Sun, 4 Dec 2005, Dominik Vogt 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.

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?

No.  Every application can set the focus to any window or
subwindow at any time.  The window manager is not involved in this
process at all.  All the fvwm styles affect only applications that
try to cooperate with the window manager by honouring the ICCCM2
rules.

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?

That depends on what type of focus policy matlab requests.  Use
FvwmIdent on the matlab window.  If the focus policy says "locally
active" or "globally active", matlab is allowed to do that.  If it
says "passive" or "no input" matlab is breaking the ICCCM2 rules.

It says Passive.

I've never seen a company fixing a bug reported by someone from
the open source community, so I doubt filing a report would be
useful.
I had the idea that if I report it to the helpdesk at my university, and have them report it further it will be reported from a large customer of them and it would be in their interest to fix it. But you might be right that they won't care about it.

Thanks for your reply.

/Viktor

Reply via email to