Subject: FVWM: FvwmTaskBar doesn't quite work (Solaris)

From: Andrew Jaffe <[email-masked]>
Date: Thu, 28 Aug 1997 17:15:08 -0700

Hi-

I tried to compile FvwmTaskBar (w/ Fvwm2.0.46) for solaris, and it all
appears to work fine, but when it runs, it doesn't set the X resource
and class correctly, so none of the "Style" setups take hold. 

Any ideas?

Andrew
-- 
Andrew Jaffe___________________________________________________________ 
Center for Particle Astrophysics             [email-masked]
University of California, 301 LeConte Hall               (510) 642-7570
Berkeley, CA 94720                                        FAX    2-1756
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Richard Lister <[email-masked]>
Date: Thu, 28 Aug 1997 22:46:24 -0400

On Thu, 28 Aug 1997 17:15:08 -0700
Andrew Jaffe <[email-masked]> 
> and class correctly, so none of the "Style" setups take hold. 

You're correct that Class and Resource aren't set, but

   Style "FvwmTaskBar"	NoTitle, HandleWidth 0

still worked for me (2.0.46/Linux/X11R6).

Style checks window name if class and resource aren't matched.

Nevertheless, the below patch to FvwmTaskBar.c should set the class and
resource. Not properly tested ... caveat patcher!

Ric

Richard J Lister, Georgetown Institute for Cognitive and Computational Sciences
Georgetown University Medical Center, Washington, DC 20007, USA
Phone: +1 202-687 2878
Email: [email-masked] 
Web: http://www.giccs.georgetown.edu/~ric/

----------------------------------cut here--------------------------------
*** FvwmTaskBar.c.orig	Thu Aug 28 22:25:35 1997
--- FvwmTaskBar.c	Thu Aug 28 22:40:19 1997
***************
*** 1015,1020 ****
--- 1015,1021 ----
     unsigned int dummy1,dummy2;
     int x,y,ret,count;
     Window dummyroot,dummychild;
+    XClassHint *class_hints;
  
     if (!(dpy = XOpenDisplay(""))) {
        fprintf(stderr,"%s: can't open display %s", Module,
***************
*** 1100,1105 ****
--- 1101,1113 ----
     
     XSetWMNormalHints(dpy,win,&hints);
     
+    /* Set some class hints like a good little X client */
+    /* Module + 1 gets module name without leading '*' */
+    class_hints = XAllocClassHint();
+    class_hints->res_name = Module + 1; 
+    class_hints->res_class = Module + 1;
+    XSetClassHint(dpy, win, class_hints);
+ 
     XGrabButton(dpy,1,AnyModifier,win,True,GRAB_EVENTS,GrabModeAsync,
  	       GrabModeAsync,None,None);
     XGrabButton(dpy,2,AnyModifier,win,True,GRAB_EVENTS,GrabModeAsync,