Re: Mixer.app + AfterStep : wharf problem
Albert Dorofeev (albert@tigr.net)
Thu, 9 May 2002 15:59:08 +0200 (CEST)
Hi!
Ok, I see the problem. WindowMaker uses the icon of the
applet and AfterStep uses the actual window (main) of
the applet. You will need to change the code in such
a way that Mixer.app uses the main window to draw
instead of the icon. Here is the patch that should
help you to set things straight:
Cheers!
Tigr
diff -ruN Mixer.app-1.7.0/Mixer.cc Mixer.app-1.7.0-AS/Mixer.cc
--- Mixer.app-1.7.0/Mixer.cc Sat Mar 17 23:03:44 2001
+++ Mixer.app-1.7.0-AS/Mixer.cc Thu May 9 15:55:11 2002
@@ -226,13 +226,13 @@
mRoot = RootWindow(mDisplay, DefaultScreen(mDisplay));
// Create windows
- mAppWin = XCreateSimpleWindow(mDisplay, mRoot, 1, 1, 10, 10, 0, 0, 0);
- mIconWin = XCreateSimpleWindow(mDisplay, mAppWin, 0, 0, 10, 10, 0, 0,
0);
+ mIconWin = XCreateSimpleWindow(mDisplay, mRoot, 0, 0, 10, 10, 0, 0,
0);
+ mAppWin = XCreateSimpleWindow(mDisplay, mIconWin, 1, 1, 10, 10, 0, 0,
0);
// Set classhint
classHint.res_name = mInstanceName;
classHint.res_class = CLASSNAME;
- XSetClassHint(mDisplay, mAppWin, &classHint);
+ XSetClassHint(mDisplay, mIconWin, &classHint);
// Create delete atom
deleteWindow = XInternAtom(mDisplay, "WM_DELETE_WINDOW", False);
@@ -240,8 +240,8 @@
XSetWMProtocols(mDisplay, mIconWin, &deleteWindow, 1);
// Set windowname
- XStoreName(mDisplay, mAppWin, APPNAME);
- XSetIconName(mDisplay, mAppWin, APPNAME);
+ XStoreName(mDisplay, mIconWin, APPNAME);
+ XSetIconName(mDisplay, mIconWin, APPNAME);
// Set sizehints
sizeHints.flags= USPosition;
On Sat, 6 Apr 2002, M.-A. DARCHE wrote:
> Hello steppers,
>
> I've got a problem with a WindowMaker applet called Mixer.app.
>
> I discovered Per Lidén's Mixer.app (http://www.fukt.hk-r.se/~per/mixer/)
> when giving a try to a new version of WindowMaker.
>
> Because I was very pleased by Mixer.app I wanted it on my AfterStep
> desktop, but Mixer.app would never show in my wharf :-(
>
> ~/GNUstep/Library/AfterStep/wharf
> ----->
> *Wharf Mixer - Swallow "mixer_app" /usr/local/GNUstep/Apps/Mixer.app/Mixer &
> <-----
>
>
> At first sight the problem seemed to be that Mixer.app had too small an
> initial size.
> So I just changed the initial size in Mixer.cc from 10x10 px to 64x64 px :
>
> //mAppWin = XCreateSimpleWindow(mDisplay, mRoot, 1, 1, 10, 10, 0, 0, 0);
> //mIconWin = XCreateSimpleWindow(mDisplay, mAppWin, 0, 0, 10, 10, 0, 0, 0);
> mAppWin = XCreateSimpleWindow(mDisplay, mRoot, 1, 1, 64, 64, 0, 0, 0);
> mIconWin = XCreateSimpleWindow(mDisplay, mAppWin, 0, 0, 64, 64, 0, 0, 0);
>
> That makes Mixer.app at least run as a usable X application.
> But when run from the Wharf (The AfterStep "Dock") a refresh problem still
> remains : Mixer shows up for a second and then becomes and remains black.
> The process seems to be still running though.
>
> The application is very stable now, and reported as working perfectly in
> WindowMaker. So why doesn't it work with AfterStep ? Anyone any idea ?
>
> Is it a problem from the applet, a problem from AfterStep ?
> Any hints and suggestions are most welcome, even if I don't have any
> knowledge of X programming (Mixer.app code looks clear and clean :-))
> I've already asked the author some time ago, but he doesn't know
> AfterStep and didn't have time to test Mixer.app with it :-(
>
> Cheers,
>
> PS:
> Running AfterStep 1.8.10 on Debian GNU/Linux "Woody"
>
>
Albert Tigr Dorofeev - albert at tigr.net - http://www.tigr.net/
GPG fingerprint = EDF4 CEA9 4CBF 0FAF 02B3 5839 B871 C957 3953 115F
_______________________________________________
The AfterStep Window Manager for X User's Mailing List
http://mail.afterstep.org/mailman/listinfo/as-users