I’ve gotten a report that TuxPaint doesn’t behave well in WindowMaker
(I forget the exact symptoms, unfortunately).
The exact symptoms are:
-
you don’t get an application icon, so the application is not “dockable”
-
all “Attributes” set on the application get associated with all SDL
apps, not just the one you are trying to change the Attributes for
Today I got a screenshot of some ‘inspector’ wmaker app showing the
window specifications. Instead of showing up as “TuxPaint”, it lists
the app as “SDL_App.SDL_App”. (The WM_CLASS, I think)
This is the way all SDL apps seem to get labelled in Window Maker, yeah.
Which comes down to this:
./video/x11/SDL_x11video.c:353: classhints->res_name = “SDL_App”;
./video/x11/SDL_x11video.c:354: classhints->res_class = “SDL_App”;
In context, the code is:
/* Set the class hints so we can get an icon (AfterStep) */
{
XClassHint *classhints;
classhints = XAllocClassHint();
if(classhints != NULL) {
classhints->res_name = "SDL_App";
classhints->res_class = "SDL_App";
XSetClassHint(SDL_Display, WMwindow, classhints);
XFree(classhints);
}
}
Interestingly, WindowMaker was originally a fork from AfterStep, if memory
serves me. They both, therefore, are similar in that they both examine
WM_CLASS, which XSetClassHint manipulates. Unfortunately, the above
code is only a partial solution due to the hardwired value.
Is there any way to fix this so something more reasonable is used instead?
WindowMaker rightly doesn’t rely on the title or icon name for associating
application settings, as those can be changed willy-nilly (take the classic
case of a web browser, which will manipulate both to reflect the title of
the currently viewed page).
Unfortunately, I can’t see anything in the 1.2 API that would help.
SDL_WM_SetCaption is not an appropriate place to set the class because
neither the title nor the icon labels need to bear any relation whatsoever
to WM_CLASS, and in some cases it is desirable for them not to match.
(Also, consider an application with multiple windows, each with a different
name. What then?) It seems the API needs to be extended here, perhaps with
a companion to SDL_GetWMInfo called SDL_SetWMInfo where some platform
dependent window manager info can be set.
He also included a dump from “xwininfo” which showed the window
as being labelled “Tux Paint” (what shows up in the titlebar for me
under KDE and sawfish)
The titlebar is okay – it’s the actual window specification that’s
SDL_App.SDL_App. This makes it hard to tell a specific SDL game to always
open on a given desktop, etc.
Exactly. And it is therefore not specific to WindowMaker. SDL applications
running under any window manager that makes use of WM_CLASS will have
similar problems.
BenOn Sat, Aug 03, 2002 at 01:12:00PM +0000, Matthew Miller wrote:
On Sat, Aug 03, 2002 at 02:09:09AM -0700, nbs wrote:
–
nSLUG http://www.nslug.ns.ca @Ben_Armstrong
Debian http://www.debian.org synrg at debian.org
[ pgp key fingerprint = 7F DA 09 4B BA 2C 0D E0 1B B1 31 ED C6 A9 39 4F ]
[ gpg key fingerprint = 395C F3A4 35D3 D247 1387 2D9E 5A94 F3CA 0B27 13C8 ]