Discussion:
FVWM: Focus Policy Issue with Java Application
Joe Riel
2011-02-02 15:49:16 UTC
Permalink
A particular java-based application I use frequently (Maple)
does not work well in fvwm. I use focus-follows-mouse, but
when I move the mouse into the application it does not
get the focus (the window is selected, but keystrokes do nothing).
The java application has (from fvwm-ident):

Focus Policy: Globally Active
- Input Field: False
- WM_TAKE_FOCUS: Present

To get the application to respond to the keyboard, I have to select a
menu item.

Is there a way to fix this? Is this an fvwm-specific issue?
The focus works fine if I use the application in Gnome desktop
(configured with focus-follows-mouse).
--
Joe Riel
Thomas Adam
2011-02-02 15:52:06 UTC
Permalink
Post by Joe Riel
A particular java-based application I use frequently (Maple)
does not work well in fvwm. I use focus-follows-mouse, but
when I move the mouse into the application it does not
get the focus (the window is selected, but keystrokes do nothing).
Focus Policy: Globally Active
- Input Field: False
- WM_TAKE_FOCUS: Present
To get the application to respond to the keyboard, I have to select a
menu item.
See the "Leniene" style option.

-- Thomas Adam
Thomas Adam
2011-02-02 15:55:08 UTC
Permalink
Post by Thomas Adam
Post by Joe Riel
A particular java-based application I use frequently (Maple)
does not work well in fvwm. I use focus-follows-mouse, but
when I move the mouse into the application it does not
get the focus (the window is selected, but keystrokes do nothing).
Focus Policy: Globally Active
- Input Field: False
- WM_TAKE_FOCUS: Present
To get the application to respond to the keyboard, I have to select a
menu item.
See the "Leniene" style option.
s/Leniene/Lenience/

-- Thomas Adam
Joe Riel
2011-02-02 17:13:44 UTC
Permalink
On Wed, 2 Feb 2011 16:52:50 +0000
On Wed, 2 Feb 2011 15:55:08 +0000
Post by Thomas Adam
Post by Thomas Adam
Post by Joe Riel
A particular java-based application I use frequently (Maple)
does not work well in fvwm. I use focus-follows-mouse, but
when I move the mouse into the application it does not
get the focus (the window is selected, but keystrokes do
Focus Policy: Globally Active
- Input Field: False
- WM_TAKE_FOCUS: Present
To get the application to respond to the keyboard, I have to
select a menu item.
See the "Leniene" style option.
s/Leniene/Lenience/
-- Thomas Adam
Thanks. I have tried Lenience (FPLenient), with little success.
From reading the fvwm manual page, I tried
It's not guaranteed to work. Not FVWM's problem if it doesn't.
We've long since told the Java guys about this.
Style "Maple" NeverFocus, FPLenient
Just use Lenience here.
Forgot to include fvwm users in my previous reply. Including.

Style "com-maplesoft*" Lenience

seems to fix the problem. Thanks.
and
Style "com-maplesoft*" NeverFocus, FPLenient
The latter because, from fvwm-ident, the "Class" of the application
is "com-maplesoft-util-WmiLauncher".
OK.
I can see no difference. However, how can I determine whether
this change in the fvwm config file is is actually being seen
by the application?
Style foo Lenience, InitialMapCommand Echo "Applied Lenience to foo"
I didn't get InitialMapCommand to do anything. Echo is supposed to
print to stderr, but I don't see the message when launching the
application from the command line.
from the command line
But that's not your problem. The other problem might be modifier
related, of course. See FVWM FAQ #0.1 on fvwm.org -- but this is
unlikely.
-- Thomas Adam
--
Joe Riel
Thomas Adam
2011-02-02 21:26:47 UTC
Permalink
Post by Joe Riel
I didn't get InitialMapCommand to do anything. Echo is supposed to
print to stderr, but I don't see the message when launching the
application from the command line.
Well, that would typically be in ~/.xsession-errors if X redirects there.
Or somewhere else if you've explicitly sent STDERR from FVWM somewhere else
(doubtful).

But really, just because there might have been a typo on a given line, or
you wanted to see if something had worked, the suggestion of using
InitialMapCommand from me was a bit of a red herring, because the options to
the style command are tokenised and run or skipped depending if something's
wrong. Hence it's perfectly possible for you to do this:

Style foo opfdkjfd, fdjkjlk, Sticky, l, InitialMapCommand Beep

And still hear a beep for window "foo", regardless of the obvious errors on
that line. That then doesn't guarantee that "opfdkjfd" worked, or was
supposed to.

But note that the question was meaningless anyway; you would have gotten an
error to STDERR (heh -- see above as to where that might get logged). No
news from FVWM is typically good news for things like style parsing --
beyond that, there's other ways of tracking down problems where you think
things should be working but aren't.

-- Thomas Adam
--
"It was the cruelest game I've ever played and it's played inside my head."
-- "Hush The Warmth", Gorky's Zygotic Mynci.
Loading...