Subject: FVWM: taskbar

From: [email-masked] (Danny Dulai)
Date: 3 Jul 1999 18:36:52 -0000

Any way to get the taskbar to possibly use a different color for the titles
if the window is iconified? I know the iconmanager can do this, but I want
the fucntionality of the taskbar that keeps it stretched across the screen
and just shrinks the buttons.

Also, my task bar comes up, and its 8 pixels short of being 1600. Is there
any way to get it to stretch fully across the screen?

___________________________________________________________________________
Danny Dulai                                           Feet. Pumice. Lotion.
http://www.ishiboo.com/~nirva/                            [email-masked]
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
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: Dominik Vogt <[email-masked]>
Date: Sun, 4 Jul 1999 16:59:13 +0200

> and just shrinks the buttons.

But IconMan can do that too. Try this:

  *FvwmIconMan*ButtonGeometry 1592x24
  *FvwmIconMan*ManagerGeometry 1x1

Bye

Dominik ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
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: [email-masked] (Danny Dulai)
Date: 4 Jul 1999 16:04:41 -0000

>  *FvwmIconMan*ManagerGeometry 1x1

bah!  just a bit too late.. I'll try that out, but i just spent last half
hour messing with FvwmTaskBar and attached along with this mail is a very
small patch to FvwmTaskBar that allows you to specify

*FvwmTaskBarIconFore color

in the config file and it will draw the iconified window names in that
color.

Could this patch be added to the repository?

___________________________________________________________________________
Danny Dulai                                           Feet. Pumice. Lotion.
http://www.ishiboo.com/~nirva/                            [email-masked]
--- fvwm-2.2.2-orig/extras/FvwmTaskBar/ButtonArray.c	Fri Mar 12 02:24:17 1999
+++ fvwm-2.2.2/extras/FvwmTaskBar/ButtonArray.c	Sun Jul  4 11:35:24 1999
@@ -26,7 +26,7 @@
 extern XFontStruct *ButtonFont, *SelButtonFont;
 extern Display *dpy;
 extern Window win;
-extern GC shadow, hilite, graph, whitegc, blackgc, checkered;
+extern GC shadow, hilite, graph, whitegc, blackgc, checkered, icongraph;
 extern button_width;
 
 extern Button *StartButton;
@@ -97,6 +97,7 @@
   new->state = state;
   new->next  = NULL;
   new->needsupdate = 1;
+  new->iconified = 0;
 
   return new;
 }
@@ -112,11 +113,16 @@
   XFontStruct *font;
   XGCValues gcv;
   unsigned long gcm;
+  GC *drawgc;
 
   if (button == NULL) return;
   button->needsupdate = 0;
   state = button->state;
   Draw3dRect(win, x, y, w, h, state);
+  if (button->iconified)
+    drawgc = &icongraph;
+  else
+    drawgc = &graph;
 
   if (state != BUTTON_UP) { x++; y++; }
 
@@ -127,7 +133,7 @@
 
   gcm = GCFont;
   gcv.font = font->fid;
-  XChangeGC(dpy, graph, gcm, &gcv);
+  XChangeGC(dpy, *drawgc, gcm, &gcv);
 
   newx = 4;
 
@@ -166,13 +172,13 @@
 
     /* It seems a little bogus that we don't see if the "..." _itself_
        will fit on the button; what if it won't?  Oh well.  */
-    XDrawString(dpy, win, graph, x + x3p, y+ButtonFont->ascent+4, t3p, 3);
+    XDrawString(dpy, win, *drawgc, x + x3p, y+ButtonFont->ascent+4, t3p, 3);
     button->truncate = True;
   }
 
   /* Only print as much of the title as will fit.  */
   if (search_len)
-    XDrawString(dpy, win, graph,
+    XDrawString(dpy, win, *drawgc,
 		x+newx, y+font->ascent+4,
 		button->title, search_len);
 }
--- fvwm-2.2.2-orig/extras/FvwmTaskBar/ButtonArray.h	Fri Jan  8 17:08:23 1999
+++ fvwm-2.2.2/extras/FvwmTaskBar/ButtonArray.h	Sun Jul  4 11:31:41 1999
@@ -26,7 +26,7 @@
 
 typedef struct button {
   char   *title;
-  int    state, needsupdate, truncate;
+  int    state, needsupdate, truncate, iconified;
   struct button *next;
   Picture p;
 } Button;
--- fvwm-2.2.2-orig/extras/FvwmTaskBar/FvwmTaskBar.1	Wed Dec  2 14:09:37 1998
+++ fvwm-2.2.2/extras/FvwmTaskBar/FvwmTaskBar.1	Sun Jul  4 11:53:27 1999
@@ -75,6 +75,9 @@
 .IP "*FvwmTaskBarFore \fIcolor\fP"
 Specifies the color to use for the button names.
 
+.IP "*FvwmTaskBarIconFore \fIcolor\fP"
+Specifies the color to use for the button names which represent iconified windows.
+
 .IP "*FvwmTaskBarBack \fIcolor\fP"
 Specifies the background color for the bar and buttons.
 
@@ -237,4 +240,9 @@
 Autohide turned on.
 
 .SH AUTHOR
-David Barth ([email-masked])
+.IP "\fIDavid Barth\fP <[email-masked]>"
+
+.SH ACKNOWLEDGMENTS
+These people have contributed to \fBFvwmTaskBar\fP:
+
+.IP "\fIDanny Dulai\fP <[email-masked]>"
--- fvwm-2.2.2-orig/extras/FvwmTaskBar/FvwmTaskBar.c	Wed Jan 13 19:37:37 1999
+++ fvwm-2.2.2/extras/FvwmTaskBar/FvwmTaskBar.c	Sun Jul  4 11:42:44 1999
@@ -87,8 +87,8 @@
 Display *dpy;
 Window  Root, win;
 int     screen, d_depth;
-Pixel   back, fore;
-GC      graph, shadow, hilite, blackgc, whitegc;
+Pixel   back, fore, iconfore;
+GC      icongraph, graph, shadow, hilite, blackgc, whitegc;
 XFontStruct *ButtonFont, *SelButtonFont;
 int fontheight;
 static Atom wm_del_win;
@@ -120,6 +120,7 @@
      *EnterAction,
      *BackColor      = "white",
      *ForeColor      = "black",
+     *IconForeColor  = "black",
      *geometry       = NULL,
      *font_string    = "fixed",
      *selfont_string = NULL;
@@ -422,6 +423,13 @@
       redraw = 0;
     }
     UpdateItemFlags(&windows, body[0], flags);
+    {
+	Button *temp = find_n(&buttons, i);
+	if (temp) {
+	    temp->needsupdate = 1;
+	    temp->iconified = flags & ICONIFIED ? 1 : 0;
+	}
+    }
     break;
 
   case M_END_WINDOWLIST:
@@ -588,9 +596,11 @@
     CopyString(&font_string,&tline[Clength+4]);
   else if(strncasecmp(tline, CatString3(Module, "SelFont",""),Clength+7)==0)
     CopyString(&selfont_string,&tline[Clength+7]);
-  else if(strncasecmp(tline,CatString3(Module,"Fore",""), Clength+4)==0) {
+  else if(strncasecmp(tline,CatString3(Module,"Fore",""), Clength+4)==0)
     CopyString(&ForeColor,&tline[Clength+4]);
-  } else if(strncasecmp(tline,CatString3(Module, "Geometry",""), Clength+8)==0) {
+  else if(strncasecmp(tline,CatString3(Module,"IconFore",""), Clength+8)==0)
+    CopyString(&IconForeColor,&tline[Clength+8]);
+  else if(strncasecmp(tline,CatString3(Module, "Geometry",""), Clength+8)==0) {
     str = &tline[Clength+9];
     while(((isspace(*str))&&(*str != '\n'))&&(*str != 0))	str++;
     str[strlen(str)-1] = 0;
@@ -1078,9 +1088,11 @@
    if(d_depth < 2) {
      back = GetColor("white");
      fore = GetColor("black");
+     iconfore = GetColor("black");
    } else {
      back = GetColor(BackColor);
      fore = GetColor(ForeColor);
+     iconfore = GetColor(IconForeColor);
    }
 
    win=XCreateSimpleWindow(dpy,Root,hints.x,hints.y,
@@ -1109,6 +1121,8 @@
    gcval.font = SelButtonFont->fid;
    gcval.graphics_exposures = False;
    graph = XCreateGC(dpy,Root,gcmask,&gcval);
+   gcval.foreground = iconfore;
+   icongraph = XCreateGC(dpy,Root,gcmask,&gcval);
 
    if(d_depth < 2)
      gcval.foreground = GetShadow(fore);
@@ -1158,6 +1172,7 @@
   FreeList(&windows);
   FreeAllButtons(&buttons);
   XFreeGC(dpy,graph);
+  XFreeGC(dpy,icongraph);
   XDestroyWindow(dpy, win);
   XCloseDisplay(dpy);
   exit(exitstat);

---

From: [email-masked] (Danny Dulai)
Date: 4 Jul 1999 16:23:15 -0000

>  *FvwmIconMan*ManagerGeometry 1x1

ok, that sorta works. you can't specify the max button size, and you also
don't get any nice shading if the background color is black.

It's got a few other features, but I'm going to stick with the taskbar for
now.

Also, why did you pick 1592? I'm trying to get my FvwmTaskBar to be 1600
and its not obeying.. it keeps going to 1592 :(

---

From: Dominik Vogt <[email-masked]>
Date: Sun, 4 Jul 1999 21:30:48 +0200

> and its not obeying.. it keeps going to 1592 :(

Because I use a border width of 4 (1600 - 2 * 4 = 1592).

Bye

Dominik ^_^

---

From: Dominik Vogt <[email-masked]>
Date: Fri, 9 Jul 1999 04:54:44 +0200

> Could this patch be added to the repository?

I have added it to the development code. Will be in 2.4.

Bye

Dominik ^_^