Discussion:
FVWM: style doesn't work with the xzoom program
Pierre Frenkiel
2013-01-15 10:32:23 UTC
Permalink
hi everynody,
I have a lot of "style" settings, and up to now all worked perfwctly.
Today, I added a line for xzoom

Style "xzoom" NoTitle, NoHandles, Sticky

but these settings are ignored for all xzoom windows.

Any idea?

best regards,
--
Pierre Frenkiel
Thomas Adam
2013-01-15 18:19:03 UTC
Permalink
Post by Pierre Frenkiel
hi everynody,
I have a lot of "style" settings, and up to now all worked perfwctly.
Today, I added a line for xzoom
Style "xzoom" NoTitle, NoHandles, Sticky
but these settings are ignored for all xzoom windows.
Any idea?
What does FvwmIdent tell you about the name/class/resource of such a window?

-- Thomas Adam
Dan Espen
2013-01-15 18:41:21 UTC
Permalink
Post by Thomas Adam
Post by Pierre Frenkiel
hi everynody,
I have a lot of "style" settings, and up to now all worked perfwctly.
Today, I added a line for xzoom
Style "xzoom" NoTitle, NoHandles, Sticky
but these settings are ignored for all xzoom windows.
Any idea?
What does FvwmIdent tell you about the name/class/resource of such a window?
If I recall, 2 things can cause a bad style match,
first, as you suggest, the windows may not have an intuitive name/class/resource.
That we can see with FvwmIdent.

The other is that the window is created with some other name and then
gets it's name/class/resource later. I forget how we diagnose that,
is it FvwmDebug?

Oddly, can't find Fedora package for xzoom.
--
Dan Espen
Thomas Adam
2013-01-15 19:04:42 UTC
Permalink
Post by Dan Espen
Post by Thomas Adam
Post by Pierre Frenkiel
hi everynody,
I have a lot of "style" settings, and up to now all worked perfwctly.
Today, I added a line for xzoom
Style "xzoom" NoTitle, NoHandles, Sticky
but these settings are ignored for all xzoom windows.
Any idea?
What does FvwmIdent tell you about the name/class/resource of such a window?
If I recall, 2 things can cause a bad style match,
Three; you missed one. :P
Post by Dan Espen
first, as you suggest, the windows may not have an intuitive name/class/resource.
That we can see with FvwmIdent.
The other is that the window is created with some other name and then
gets it's name/class/resource later. I forget how we diagnose that,
is it FvwmDebug?
BugOpts DisplayNewWindowNames

Note that a window's class cannot be changed once the window is
mapped; only in the WithDrawn state. I've mentioned this a few times
before on this list; only one or two GTK apps that I know of decide to
change their title after the window has been mapped; transitioning
from FVWM's default of "NoName" to something else -- but that won't be
what's happening with XZoom.

The third one is that style line ordering matters a great deal in the
config file.

-- Thomas Adam
Dan Espen
2013-01-15 19:13:19 UTC
Permalink
Post by Thomas Adam
Post by Dan Espen
Post by Thomas Adam
Post by Pierre Frenkiel
hi everynody,
I have a lot of "style" settings, and up to now all worked perfwctly.
Today, I added a line for xzoom
Style "xzoom" NoTitle, NoHandles, Sticky
but these settings are ignored for all xzoom windows.
Any idea?
What does FvwmIdent tell you about the name/class/resource of such a window?
If I recall, 2 things can cause a bad style match,
Three; you missed one. :P
Post by Dan Espen
first, as you suggest, the windows may not have an intuitive name/class/resource.
That we can see with FvwmIdent.
The other is that the window is created with some other name and then
gets it's name/class/resource later. I forget how we diagnose that,
is it FvwmDebug?
BugOpts DisplayNewWindowNames
Duh.

Looked at BugOpts twice, and here it says:

"This can help in finding the correct strings to use in the Style
command."

Talk about needing a page magnifier.
Post by Thomas Adam
Note that a window's class cannot be changed once the window is
mapped; only in the WithDrawn state. I've mentioned this a few times
before on this list; only one or two GTK apps that I know of decide to
change their title after the window has been mapped; transitioning
from FVWM's default of "NoName" to something else -- but that won't be
what's happening with XZoom.
The third one is that style line ordering matters a great deal in the
config file.
Well, yeah, but...
--
Dan Espen
Pierre Frenkiel
2013-01-20 10:57:01 UTC
Permalink
Post by Dan Espen
. . .
The other is that the window is created with some other name and then
gets it's name/class/resource later. I forget how we diagnose that,
. . .
you were (almost) right:
My 1st tries were with "xzoom*" and "xzoom x2", according the name displayed
in the title bar, and confirmed by FvwmIdent and xprop, but that didn't work.
I then discovered that the style worked if I did a FvwmRestart AFTER
launching xzoom.
So, I decided to find what was the original name, trying "a*", "b*", ...
by dichotomy. My patience was rewarded, as I at last found the name
which worked: "Untitled" !!!

It looks like a bug in xzoom, don't you agree?

best regards,
--
Pierre Frenkiel
Thomas Adam
2013-01-20 12:25:40 UTC
Permalink
Post by Pierre Frenkiel
So, I decided to find what was the original name, trying "a*", "b*", ...
by dichotomy. My patience was rewarded, as I at last found the name
which worked: "Untitled" !!!
It looks like a bug in xzoom, don't you agree?
Not necessarily, no. It's somewhat unusual, but programs as old as
the hill such as XZoom probably didn't set XA_WM_NAME -- and as I said
to you before -- the value of "Untitled" is FVWM's default in the case
when the program doesn't set the WM_NAME.

Looking at the source code for xzoom-0.3 (which I'm using on FreeBSD)
I note the following:

/*
XChangeProperty(dpy, win, XA_WM_NAME, XA_STRING, 8,
PropModeReplace,
(unsigned char *)progname, strlen(progname));
*/

So it's anyone's guess why XZoom doesn't do this.

But this program may well not be maintained any more.

-- Thomas Adam
Pierre Frenkiel
2013-01-20 14:08:44 UTC
Permalink
Post by Thomas Adam
the hill such as XZoom probably didn't set XA_WM_NAME -- and as I said
to you before -- the value of "Untitled" is FVWM's default in the case
actually, you said "Noname", and I then tried with "style Noname"
as this didn't work, I started the search which led me to "Untitled"
Post by Thomas Adam
Looking at the source code for xzoom-0.3 (which I'm using on FreeBSD)
/*
XChangeProperty(dpy, win, XA_WM_NAME, XA_STRING, 8,
PropModeReplace,
(unsigned char *)progname, strlen(progname));
*/
this is a comment. I'll try to recompile after removing the /* */

best regards,
--
Pierre Frenkiel
Pierre Frenkiel
2013-01-20 16:35:38 UTC
Permalink
Post by Pierre Frenkiel
Post by Thomas Adam
/*
XChangeProperty(dpy, win, XA_WM_NAME, XA_STRING, 8,
PropModeReplace,
(unsigned char *)progname, strlen(progname));
*/
this is a comment. I'll try to recompile after removing the /* */
I did it, with the source provided by the debian repository,
and it works ( with "style xzoom* )

thanks a lot to everybody for your useful help.

best regards,
--
Pierre Frenkiel
Thomas Adam
2013-01-15 19:08:59 UTC
Permalink
Post by Pierre Frenkiel
hi everynody,
I have a lot of "style" settings, and up to now all worked perfwctly.
Today, I added a line for xzoom
Style "xzoom" NoTitle, NoHandles, Sticky
but these settings are ignored for all xzoom windows.
Any idea?
On FreeBSD:

[~] » xprop
WM_NAME(STRING) = "xzoom x2"
_NET_WM_DESKTOP(CARDINAL) = 2
WM_ICON_NAME(STRING) = "xzoom"
[~] »

So there you go:

Style xzoom* whatever

It's a bit naughty this window doesn't have a Class or resource value,
mind. But that's OK.

-- Thomas Adam
Loading...