2 diff -u ./afterstep.c /home/malda/code/AfterStep-1.0/afterstep/afterstep.c
3 --- ./afterstep.c Wed May 14 17:38:24 1997
4 +++ /home/malda/code/AfterStep-1.0/afterstep/afterstep.c Sun May 4 11:19:57 1997
7 Bool option_error = FALSE;
11 - Scr.TitleTextType=0;
15 /* Set the defaults for m4 processing */
17 diff -u ./borders.c /home/malda/code/AfterStep-1.0/afterstep/borders.c
18 --- ./borders.c Thu May 15 01:18:03 1997
19 +++ /home/malda/code/AfterStep-1.0/afterstep/borders.c Thu Mar 20 19:09:21 1997
26 GC HReliefGC,HShadowGC;
27 Pixel BorderColor,BackColor;
29 (expose_win==t->right_w[i]) ||
30 (expose_win == None)) {
32 - if(Scr.ButtonType==0){ RelieveWindow(t,t->right_w[i],0,0,t->button_height,
34 - (PressedW==t->right_w[i]?ShadowGC:ReliefGC),
35 - (PressedW==t->right_w[i]?ReliefGC:ShadowGC),
36 - BOTTOM_HILITE|RIGHT_HILITE); z=2; }
39 + RelieveWindow(t,t->right_w[i],0,0,t->button_height,
41 + (PressedW==t->right_w[i]?ShadowGC:ReliefGC),
42 + (PressedW==t->right_w[i]?ReliefGC:ShadowGC),
43 + BOTTOM_HILITE|RIGHT_HILITE);
44 switch (Scr.button_style[(i*2+2)%10]) {
45 case XPM_BUTTON_STYLE:
46 - if((PressedW==t->right_w[i])&&(Scr.ButtonType==1))
48 - XShapeCombineMask(dpy, t->right_w[i], ShapeBounding, 0, 0,
49 - Scr.dbutton_pixmap_mask[(i*2+2)%10], ShapeSet);
50 - XCopyArea(dpy, Scr.dbutton_pixmap[(i*2+2)%10], t->right_w[i],
51 - Scr.MaskGC, 0, 0, Scr.button_width[(i*2+2)%10],
52 - Scr.button_height[(i*2+2)%10], z, z);
55 - else /* Not Pressed */
57 - if(Scr.ButtonType==1) XShapeCombineMask(dpy, t->right_w[i], ShapeBounding, 0, 0,
58 - Scr.button_pixmap_mask[(i*2+2)%10], ShapeSet);
59 - XCopyArea(dpy, Scr.button_pixmap[(i*2+2)%10], t->right_w[i],
60 - Scr.MaskGC, 0, 0, Scr.button_width[(i*2+2)%10],
61 - Scr.button_height[(i*2+2)%10], z, z);
64 + XCopyArea(dpy, Scr.button_pixmap[(i*2+2)%10], t->right_w[i],
65 + Scr.LineGC, 0, 0, Scr.button_width[(i*2+2)%10],
66 + Scr.button_height[(i*2+2)%10], 2, 2);
69 afterstep_err( "old button styles should not be used\n",NULL,NULL,NULL);
71 if(t->flags & BORDER )
73 /* draw relief lines */
76 - rgc = onoroff?Scr.HiReliefGC:Scr.StdReliefGC;
77 - sgc = onoroff?Scr.HiShadowGC:Scr.StdShadowGC;
79 - y = t->frame_height - 2*t->corner_width;
80 - x = t->frame_width - 2*t->corner_width +t->bw;
81 - SetBottomBackground(t, onoroff);
83 - RelieveWindow(t,t->side,0,0,x,t->boundary_height,
85 + y = t->frame_height - 2*t->corner_width;
86 + x = t->frame_width - 2*t->corner_width +t->bw;
87 + SetBottomBackground(t, onoroff);
89 + if((flush_expose (t->side))||(expose_win == t->side)||
90 + (expose_win == None)) {*/
92 + RelieveWindow(t,t->side,0,0,x,t->boundary_height,
93 + HReliefGC, HShadowGC, 0x0004);
97 - RelieveWindow(t,t->corners[i],0,0,t->corner_width,
99 + if((flush_expose(t->corners[i]))||(expose_win==t->corners[i])||
100 + (expose_win == None))
107 + RelieveWindow(t,t->corners[i],0,0,t->corner_width,
108 t->corner_width+t->bw,
109 rgc,sgc, corners[i]);
111 if(t->boundary_height > 1)
112 - RelieveParts(t,i,rgc,sgc);
113 + RelieveParts(t,i,rgc,i?rgc:sgc);
115 - RelieveParts(t,i,rgc,sgc);
116 + RelieveParts(t,i,sgc,i?sgc:sgc);
120 else /* no decorative border */
122 DrawTexturedText(dpy,t->title_w,Scr.WindowFont.font,hor_off,
123 4,Scr.TitleGradient, t->name, strlen(t->name));
126 - if(Scr.TitleTextType==1){
128 - { /* If on, check */
129 - tGC = PressedW==t->title_w?Scr.HiFontReliefGC:Scr.HiFontGC;
130 - ReliefGC = PressedW==t->title_w?Scr.HiFontShadowGC:Scr.HiFontReliefGC;
131 - ShadowGC = PressedW==t->title_w?Scr.HiFontGC:Scr.HiFontShadowGC;
135 - { /* If Off, then just use Lo */
136 - ReliefGC=Scr.LoFontReliefGC;
137 - ShadowGC=Scr.LoFontShadowGC;
141 - XDrawString (dpy, t->title_w,ReliefGC,hor_off, Scr.WindowFont.y+Scr.TitleTextY, t->name, strlen(t->name));
142 - XDrawString (dpy, t->title_w,ReliefGC,hor_off+1, Scr.WindowFont.y+Scr.TitleTextY, t->name, strlen(t->name));
143 - XDrawString (dpy, t->title_w,ReliefGC,hor_off+2, Scr.WindowFont.y+Scr.TitleTextY, t->name, strlen(t->name));
144 - XDrawString (dpy, t->title_w,ReliefGC,hor_off+3, Scr.WindowFont.y+Scr.TitleTextY, t->name, strlen(t->name));
145 - XDrawString (dpy, t->title_w,ReliefGC,hor_off+4, Scr.WindowFont.y+Scr.TitleTextY, t->name, strlen(t->name));
147 - XDrawString (dpy, t->title_w,ReliefGC,hor_off, Scr.WindowFont.y+1+Scr.TitleTextY, t->name, strlen(t->name));
148 - XDrawString (dpy, t->title_w,ReliefGC,hor_off, Scr.WindowFont.y+2+Scr.TitleTextY, t->name, strlen(t->name));
149 - XDrawString (dpy, t->title_w,ReliefGC,hor_off, Scr.WindowFont.y+3+Scr.TitleTextY, t->name, strlen(t->name));
150 - XDrawString (dpy, t->title_w,ReliefGC,hor_off, Scr.WindowFont.y+4+Scr.TitleTextY, t->name, strlen(t->name));
152 - XDrawString (dpy, t->title_w,ShadowGC,hor_off+4,Scr.WindowFont.y+2+Scr.TitleTextY, t->name, strlen(t->name));
153 - XDrawString (dpy, t->title_w,ShadowGC,hor_off+4,Scr.WindowFont.y+3+Scr.TitleTextY, t->name, strlen(t->name));
155 - XDrawString (dpy, t->title_w,ShadowGC,hor_off+4,Scr.WindowFont.y+4+Scr.TitleTextY, t->name, strlen(t->name));
156 - XDrawString (dpy, t->title_w,ShadowGC,hor_off+3,Scr.WindowFont.y+4+Scr.TitleTextY, t->name, strlen(t->name));
157 - XDrawString (dpy, t->title_w,ShadowGC,hor_off+2,Scr.WindowFont.y+4+Scr.TitleTextY, t->name, strlen(t->name));
159 - XDrawString (dpy, t->title_w,tGC,hor_off+2, Scr.WindowFont.y+2+Scr.TitleTextY, t->name, strlen(t->name));
161 - else if(Scr.TitleTextType==2){
162 - tGC = (onoroff?Scr.HiFontGC:Scr.LoFontGC);
163 - ReliefGC = (onoroff?Scr.HiFontReliefGC:Scr.HiFontReliefGC);
164 - ShadowGC = (onoroff?Scr.HiFontShadowGC:Scr.LoFontShadowGC);
166 - if(PressedW!=t->title_w)
168 - XDrawString (dpy, t->title_w,ShadowGC,hor_off+1,Scr.WindowFont.y+1+Scr.TitleTextY, t->name, strlen(t->name));
169 - XDrawString (dpy, t->title_w,ReliefGC,hor_off+2,Scr.WindowFont.y+2+Scr.TitleTextY, t->name, strlen(t->name));
170 - XDrawString (dpy, t->title_w,tGC, hor_off+3,Scr.WindowFont.y+3+Scr.TitleTextY, t->name, strlen(t->name));
173 - XDrawString (dpy, t->title_w,Scr.HiFontGC,hor_off+1,Scr.WindowFont.y+1+Scr.TitleTextY, t->name, strlen(t->name));
178 - { /* Default Window Draw */
179 - XDrawString (dpy, t->title_w,Scr.FontGC,hor_off,
180 - Scr.WindowFont.y+ 4,
181 - t->name, strlen(t->name));
183 + XDrawString (dpy, t->title_w,Scr.FontGC,hor_off,
184 + Scr.WindowFont.y+ 4,
185 + t->name, strlen(t->name));
192 seg[0].x1 = t->boundary_width-1;
193 - /* used to be -2 */
194 seg[0].x2 = t->corner_width-2;
195 - seg[0].y1 = t->corner_width - t->boundary_height+t->bw-1;
196 + seg[0].y1 = t->corner_width - t->boundary_height+t->bw;
197 seg[0].y2 = t->corner_width - t->boundary_height+t->bw;
200 Only in .: borders.c.rej
201 diff -u ./configure.c /home/malda/code/AfterStep-1.0/afterstep/configure.c
202 --- ./configure.c Wed May 21 19:53:30 1997
203 +++ /home/malda/code/AfterStep-1.0/afterstep/configure.c Sat Mar 8 19:43:54 1997
205 /****************************************************************************
206 * This module is mostly all new
209 * Copyright 1993 Robert Nation. No restrictions are placed on this code,
210 * as long as the copyright notice is preserved
211 ****************************************************************************
212 * slightly modified for BowMan
216 * slightly modified for AfterStep
220 ****************************************************************************
223 * Configure.c: reads the .steprc or system.steprc file, interprets it,
224 * and sets up menus, bindings, colors, and fonts as specified
228 #include <X11/Xproto.h>
229 #include <X11/Xatom.h>
232 #include <X11/Xmu/SysUtil.h>
235 void nocolor(char *note, char *name);
237 int mods,func,func_val_1,func_val_2;
241 int pager_x=10000,pager_y=10000;
244 char *TexMaxcols=NULL;
245 char *TColor=NULL, *IColor=NULL, *MColor=NULL, *UColor=NULL, *SColor=NULL;
247 -char *TPixmap=NULL,*UPixmap=NULL,*SPixmap=NULL, *MTPixmap=NULL, *MPixmap=NULL, *MTPixmapMask=NULL, *MArrowPixmap=NULL;
257 +char *TPixmap=NULL,*UPixmap=NULL,*SPixmap=NULL;
258 extern void InitTextureData(TextureInfo *info, char *title, char*utitle,
259 char *mtitle, char *menu, char *sticky, char *text);
260 int IconTexType = TEXTURE_BUILTIN;
262 {"IconBox", SetBox, (char **)0, (int *)0},
263 {"StickyIcons", SetFlag, (char **)StickyIcons, (int *)0},
264 {"IconFont", assign_string, &Scr.IconFont.name, (int *)0},
265 - {"IconTitle", SetFlag, (char **)IconTitle, (int*)0},
266 + {"IconTitle", SetFlag, (char **)IconTitle, (int*)0},
268 {"Icon", SetOneStyle, (char **)&Scr.TheList,(int *)ICON_FLAG},
270 @@ -174,13 +164,13 @@
271 {"CirculateSkipIcons",SetFlag, (char **)CirculateSkipIcons, (int *)0},
274 - {"NoFocus", SetOneStyle, (char **)&Scr.TheList,
275 + {"NoFocus", SetOneStyle, (char **)&Scr.TheList,
276 (int *)NOFOCUS_FLAG},
277 - {"NoTitle", SetOneStyle, (char **)&Scr.TheList,
278 + {"NoTitle", SetOneStyle, (char **)&Scr.TheList,
279 (int *)NOTITLE_FLAG},
280 - {"NoBorder", SetOneStyle, (char **)&Scr.TheList,
281 + {"NoBorder", SetOneStyle, (char **)&Scr.TheList,
282 (int *)NOBORDER_FLAG},
283 - {"Sticky", SetOneStyle, (char **)&Scr.TheList,
284 + {"Sticky", SetOneStyle, (char **)&Scr.TheList,
286 {"StaysOnTop", SetOneStyle, (char **)&Scr.TheList,
287 (int *)STAYSONTOP_FLAG},
289 {"BackingStore", SetFlag, (char **)BackingStore, (int *)0},
290 {"AppsBackingStore", SetFlag, (char **)AppsBackingStore, (int *)0},
291 {"SaveUnders", SetFlag, (char **)SaveUnders, (int *)0},
294 {"ModulePath", assign_string, &ModulePath, (int *)0},
296 {"Module", executeModule, (char **)0, (int *)0},
298 {"TitleBarStyle", assign_string, &TitleStyle, (int *)0},
299 {"TextureTypes", assign_string, &TexTypes, (int *)0},
300 {"TextureMaxColors", assign_string, &TexMaxcols, (int *)0},
303 {"TitleTextureColor", assign_string, &TColor, (int*)0}, /* title */
304 {"MenuTextureColor", assign_string, &IColor, (int*)0}, /* menu items */
305 {"UTitleTextureColor", assign_string, &UColor, (int*)0}, /*unfocused title*/
307 {"TitlePixmap", assign_string, &TPixmap, (int*)0}, /* title pixmap */
308 {"UTitlePixmap", assign_string, &UPixmap, (int*)0}, /* title pixmap */
309 {"STitlePixmap", assign_string, &SPixmap, (int*)0}, /* title pixmap */
310 - {"MenuPixmap", assign_string, &MPixmap, (int*)0}, /* title pixmap */
311 - {"MTitlePixmap", assign_string, &MTPixmap, (int*)0}, /* title pixmap */
312 - {"MArrowPixmap", assign_string, &MArrowPixmap, (int*)0},
313 {"TextGradientColor", assign_string, &TGColor, (int*)0}, /* title text */
314 {"TexturedHandle", SetTextureFlag, (char **)TexturedHandle, (int *)0},
315 {"TitlebarNoPush", SetTextureFlag, (char **)TitlebarNoPush, (int *)0},
317 {"ButtonNoBorder", SetIconFlag, (char **)IconNoBorder, (int *)0},
319 {"TitleTextAlign", SetInts, (char **)&Scr.TitleTextAlign, &dummy},
320 - {"TitleButton", SetTitleButton, (char **)1, (int *)0},
321 - {"TitleTextMode", SetTitleText, (char **)1, (int *)0},
322 + {"TitleButton", SetTitleButton, (char **)1, (int *)0},
323 {"", 0, (char **)0, (int *)0}
340 /***************************************************************
346 **************************************************************/
347 Pixmap GetXPMTile(char *file)
349 @@ -390,14 +376,14 @@
355 path = findIconFile(file, PixmapPath,R_OK);
356 if(path == NULL)return None;
358 XGetWindowAttributes(dpy,Scr.Root,&root_attr);
359 -/* xpm_attributes.colormap = root_attr.colormap;
360 + xpm_attributes.colormap = root_attr.colormap;
361 xpm_attributes.closeness = 40000; /* Allow for "similar" colors */
362 - xpm_attributes.valuemask = (XpmReturnPixels | XpmReturnExtensions);
363 + xpm_attributes.valuemask = XpmReturnPixels | XpmColormap | XpmCloseness;
365 if (XpmReadFileToPixmap(dpy, Scr.Root, path,
373 XFreePixmap(dpy,mask);
381 -Pixmap GetXPMTileMask(char *file, Pixmap *mask)
383 - XWindowAttributes root_attr;
384 - XpmAttributes xpm_attributes;
385 - extern char *PixmapPath;
390 - path = findIconFile(file, PixmapPath,R_OK);
391 - if(path == NULL)return None;
393 - XGetWindowAttributes(dpy,Scr.Root,&root_attr);
394 -/* xpm_attributes.colormap = root_attr.colormap;
395 - xpm_attributes.closeness = 40000; /* Allow for "similar" colors */
397 - xpm_attributes.valuemask = (XpmReturnPixels | XpmReturnExtensions);
399 - if (XpmReadFileToPixmap(dpy, Scr.Root, path,
401 - &xpm_attributes) != XpmSuccess ) {
414 /*****************************************************************************
417 * This routine is responsible for reading and parsing the config file
419 ****************************************************************************/
421 int HomeLen; /* length of Home */
422 #ifdef ENABLE_TEXTURE
423 int icol, mcol, ucol, tcol, scol; /* texture colors */
430 extern int m4_enable;
433 Scr.MouseButtonRoot = NULL;
434 Scr.FuncKeyRoot.next = NULL;
438 Scr.DefaultIcon = NULL;
440 /* find the home directory to look in */
442 HomeLen = strlen(Home);
444 if(config_file[0] == '/')
447 home_file = safemalloc(strlen(config_file)+1);
448 strcpy(home_file,config_file);
450 @@ -538,13 +490,13 @@
451 * Process the config file through m4 and save the
452 * results in a temp file.
456 afterstep_file = m4_defs(dpy, display_name, m4_options, afterstep_file);
459 + config_fd = fopen(afterstep_file, "r");
461 - config_fd = fopen(afterstep_file, "r");
463 - if (config_fd == (FILE *) 0)
464 + if (config_fd == (FILE *) 0)
466 perror("Cannot open m4-processed config file\n");
475 Textures.Tmaxcols = defcol;
476 Textures.Imaxcols = defcol;
478 Textures.Mmaxcols = (mcol >= 0 ? mcol : defcol);
479 Textures.Smaxcols = (scol >= 0 ? scol : defcol);
481 - InitTextureData(&Textures, TColor, UColor, MColor, IColor, SColor,
482 + InitTextureData(&Textures, TColor, UColor, MColor, IColor, SColor,
484 /* load titlebar pixmaps */
485 if (Textures.Ttype==TEXTURE_PIXMAP) {
487 if ((Scr.ForeTitle=GetXPMTile(TPixmap))==None) {
488 printf("couldn't load Titlebar tile pixmap\n");
495 if (Textures.Utype==TEXTURE_PIXMAP) {
498 @@ -633,49 +585,16 @@
505 - if (Textures.Mtype==TEXTURE_PIXMAP) {
509 - if ((Scr.MenuItem=GetXPMTile(MPixmap))==None) {
510 - printf("couldn't load Menu Item pixmap\n");
511 - Textures.Mtype = 0;
516 - if (Textures.Itype==TEXTURE_PIXMAP) {
517 - if (MTPixmap==NULL)
521 - (Scr.MenuTitle =GetXPMTileMask(MTPixmap,&Scr.MenuTitleMask))==None)
523 - printf("couldn't load Menu Titlebar tile pixmap\n");
524 - Textures.Itype = 0;
529 - if(MArrowPixmap==NULL)
530 - Scr.MenuArrow=None;
532 - if((Scr.MenuArrow=GetXPMTile(MArrowPixmap))==None)
533 - printf("couldn't load menu arrow pixmap\n", Scr.MenuArrow=None);
538 /* cache textures for ideal cases (types 2 and 3) */
539 if (Textures.Ttype==2 || Textures.Ttype==3) {
540 Scr.ForeTitle = XCreatePixmap(dpy, Scr.Root, Scr.MyDisplayWidth-1,
541 NS_TITLE_HEIGHT, Scr.d_depth);
542 if (Scr.ForeTitle!=None) {
543 - if (!DrawHGradient(dpy, Scr.ForeTitle, 0, 0,
544 + if (!DrawHGradient(dpy, Scr.ForeTitle, 0, 0,
545 Scr.MyDisplayWidth-1, NS_TITLE_HEIGHT,
546 - Textures.Tfrom, Textures.Tto, 1,
547 + Textures.Tfrom, Textures.Tto, 1,
548 Textures.Tmaxcols, Textures.Ttype-2)) {
549 XFreePixmap(dpy, Scr.ForeTitle);
550 Scr.ForeTitle = None;
551 @@ -713,12 +632,12 @@
554 if (Textures.Utype==2 || Textures.Utype==3) {
555 - Scr.BackTitle = XCreatePixmap(dpy, Scr.Root, Scr.MyDisplayWidth-1,
556 + Scr.BackTitle = XCreatePixmap(dpy, Scr.Root, Scr.MyDisplayWidth-1,
557 NS_TITLE_HEIGHT, Scr.d_depth);
558 if (Scr.BackTitle!=None) {
559 if (!DrawHGradient(dpy, Scr.BackTitle, 0, 0,
560 Scr.MyDisplayWidth-1, NS_TITLE_HEIGHT,
561 - Textures.Ufrom, Textures.Uto, 1,
562 + Textures.Ufrom, Textures.Uto, 1,
563 Textures.Umaxcols, Textures.Utype-2)) {
564 XFreePixmap(dpy, Scr.BackTitle);
565 Scr.BackTitle = None;
566 @@ -727,14 +646,14 @@
572 if (Textures.Stype==2 || Textures.Stype==3) {
573 - Scr.StickyTitle = XCreatePixmap(dpy, Scr.Root, Scr.MyDisplayWidth-1,
574 - NS_TITLE_HEIGHT, Scr.d_depth);
575 + Scr.StickyTitle = XCreatePixmap(dpy, Scr.Root, Scr.MyDisplayWidth-1,
576 + NS_TITLE_HEIGHT, Scr.d_depth);
577 if (Scr.StickyTitle!=None) {
578 if (!DrawHGradient(dpy, Scr.StickyTitle, 0, 0,
579 Scr.MyDisplayWidth-1, NS_TITLE_HEIGHT,
580 - Textures.Sfrom, Textures.Sto, 1,
581 + Textures.Sfrom, Textures.Sto, 1,
582 Textures.Smaxcols, Textures.Stype-2)) {
583 XFreePixmap(dpy, Scr.StickyTitle);
584 Scr.StickyTitle = None;
591 #endif /* ENABLE_TEXTURE */
594 /* create pixmaps for buttons */
597 @@ -757,12 +676,12 @@
599 /* if edgescroll >1000 and < 100000m
600 * wrap at edges of desktop (a "spherical" desktop) */
601 - if (Scr.EdgeScrollX >= 1000)
602 + if (Scr.EdgeScrollX >= 1000)
604 Scr.EdgeScrollX /= 1000;
605 Scr.flags |= EdgeWrapX;
607 - if (Scr.EdgeScrollY >= 1000)
608 + if (Scr.EdgeScrollY >= 1000)
610 Scr.EdgeScrollY /= 1000;
611 Scr.flags |= EdgeWrapY;
613 Scr.flags &= ~EdgeWrapY;
618 /* create pixmap for icon button background */
624 /*****************************************************************************
627 * Copies a text string from the config file to a specified location
629 ****************************************************************************/
631 *arg = stripcpy(text);
637 -/****************************************************************************
639 - * Read TitleText Controls
641 - ****************************************************************************/
642 -void SetTitleText(char *tline,FILE *fd, char **junk,int *junk2)
646 - n = sscanf(tline,"%d %d %s %s %s %s %s %s",&ttype,&y,hircolor,
647 - hiscolor, hincolor, lorcolor, loscolor, loncolor);
650 - printf("wrong number of parameters given to TitleText\n");
651 - printf("t=%i y=%i 1=%s 2=%s 3=%s 4=%s 5=%s 6=%s\n", ttype,y,hircolor,
652 - hiscolor, hincolor, lorcolor, loscolor, loncolor);
656 - Scr.TitleTextType=ttype;
668 /*****************************************************************************
671 * read the button pixmaps
673 ****************************************************************************/
675 XpmAttributes xpm_attributes;
680 XGetWindowAttributes(dpy, Scr.Root, &root_attr);
681 xpm_attributes.colormap = root_attr.colormap;
682 xpm_attributes.closeness = 4000;
683 @@ -869,14 +754,14 @@
685 Scr.button_width[2] = xpm_attributes.width;
686 Scr.button_height[2] = xpm_attributes.height;
687 - Scr.button_style[2] = XPM_BUTTON_STYLE;
688 + Scr.button_style[2] = XPM_BUTTON_STYLE;
692 XFreePixmap(dpy,mask);
695 if (!Scr.button_pixmap[1]) {
696 - if ( XpmCreatePixmapFromData(dpy, Scr.Root, minbutton_xpm,
697 + if ( XpmCreatePixmapFromData(dpy, Scr.Root, minbutton_xpm,
698 &Scr.button_pixmap[1], &mask,
699 &xpm_attributes) != XpmSuccess ) {
700 afterstep_err("Can not read minbutton_xpm to buttonstyles",NULL, NULL, NULL);
701 @@ -886,16 +771,16 @@
702 Scr.button_height[1] = xpm_attributes.height;
703 Scr.button_style[1] = XPM_BUTTON_STYLE;
707 XFreePixmap(dpy,mask);
711 /****************************************************************************
714 * Read Titlebar pixmap button
716 - ****************************************************************************/
717 + ****************************************************************************/
718 void SetTitleButton(char *tline,FILE *fd, char **junk,int *junk2)
721 @@ -903,14 +788,14 @@
722 XpmAttributes xpm_attributes;
723 extern char *PixmapPath;
731 - n = sscanf(tline,"%d %s %s",&num,file,file2);
732 + n = sscanf(tline,"%d %s",&num,file);
736 printf("wrong number of parameters given with TitleButton\n");
738 if (num < 0 || num > 9) {
740 xpm_attributes.valuemask = XpmSize|XpmReturnPixels|XpmColormap|XpmCloseness;
742 if (XpmReadFileToPixmap(dpy, Scr.Root, path,
743 - &Scr.button_pixmap[num], &Scr.button_pixmap_mask[num],
744 + &Scr.button_pixmap[num], &mask,
745 &xpm_attributes) != XpmSuccess ) {
746 printf("couldn't read Titlebar button pixmap %s\n", path);
749 Scr.button_style[num] = XPM_BUTTON_STYLE;
754 - path = findIconFile(file2,PixmapPath,R_OK);
756 - Scr.ButtonType=1; /* Rob's Button Mode - Shaped & Bigger, Must Relieve */
758 - XGetWindowAttributes(dpy,Scr.Root,&root_attr);
759 - xpm_attributes.colormap = root_attr.colormap;
760 - xpm_attributes.closeness = 40000; /* Allow for "similar" colors */
761 - xpm_attributes.valuemask = XpmSize|XpmReturnPixels|XpmColormap|XpmCloseness;
763 - if (XpmReadFileToPixmap(dpy, Scr.Root, path,
764 - &Scr.dbutton_pixmap[num], &Scr.dbutton_pixmap_mask[num],
765 - &xpm_attributes) != XpmSuccess ) {
766 - printf("couldn't read Titlebar button pixmap %s\n", path);
771 - Scr.button_width[num] = xpm_attributes.width;
772 - Scr.button_height[num] = xpm_attributes.height;
773 - Scr.button_style[num] = XPM_BUTTON_STYLE;
781 + XFreePixmap(dpy,mask);
786 xpm_attributes.valuemask = XpmSize | XpmReturnPixels | XpmColormap | XpmCloseness;
788 if(XpmCreatePixmapFromData(dpy, Scr.Root, button_xpm,
789 - &Scr.IconBgPixmap, &Scr.IconBgMask,
790 - &xpm_attributes) == XpmSuccess ) {
791 + &Scr.IconBgPixmap, &Scr.IconBgMask,
792 + &xpm_attributes) == XpmSuccess ) {
793 Scr.IconBgWidth = xpm_attributes.width;
794 Scr.IconBgHeight = xpm_attributes.height;
795 Scr.IconBgDepth = Scr.d_depth;
799 /***************************************************************
802 * Read a XPM Icon Background from file
805 **************************************************************/
806 static int GetXPMIconFile(char *file)
809 XpmAttributes xpm_attributes;
810 extern char *PixmapPath;
814 path = findIconFile(file, PixmapPath,R_OK);
815 if(path == NULL) return False;
820 /*******************************************************************
823 * Make a gradient pixmap for iconized windows background (aka Buttons)
826 *******************************************************************/
828 static int GetXPMGradient(int from[3], int to[3], int maxcols, int type)
830 if (!DrawHGradient(dpy, Scr.IconBgPixmap, 0, 0, 64,64,
831 from, to, 0, maxcols, type-TEXTURE_HGRADIENT)) {
832 XFreePixmap(dpy, Scr.IconBgPixmap);
837 case TEXTURE_VGRADIENT:
838 @@ -1101,21 +960,21 @@
839 if (!DrawVGradient(dpy, Scr.IconBgPixmap, 0, 0, 64,64,
840 from, to, 0, maxcols, type-TEXTURE_VGRADIENT)) {
841 XFreePixmap(dpy, Scr.IconBgPixmap);
851 - DrawOutline(Scr.IconBgPixmap,64,64);
852 + DrawOutline(Scr.IconBgPixmap,64,64);
856 /*******************************************************************
859 * Make a solid color pixmap for iconized windows background (aka Buttons)
862 *******************************************************************/
864 static int GetSolidXPM(Pixel pixel)
865 @@ -1141,7 +1000,7 @@
868 /*****************************************************************************
871 * Create pixmap for icon background
873 ****************************************************************************/
874 @@ -1155,9 +1014,9 @@
877 /* Free resources if this is a restart */
878 - if (Scr.IconBgPixmap != None)
879 + if (Scr.IconBgPixmap != None)
880 XFreePixmap(dpy,Scr.IconBgPixmap);
881 - if (Scr.IconBgMask != None)
882 + if (Scr.IconBgMask != None)
883 XFreePixmap(dpy,Scr.IconBgMask);
886 @@ -1195,7 +1054,7 @@
888 BgColor=GetColor("grey");
892 if (!GetSolidXPM(BgColor)) {
893 afterstep_err("couldn't create Solid Button. Using default.\n",NULL,NULL,NULL);
895 @@ -1214,12 +1073,12 @@
896 if (Scr.flags & IconTitle) {
897 XSetForeground(dpy, Scr.IconGC, Scr.HiColors.back);
898 XFillRectangle(dpy, Scr.IconBgPixmap, Scr.IconGC, 1, 1,
899 - Scr.IconBgWidth-2,Scr.IconFont.height+2);
900 + Scr.IconBgWidth-2,Scr.IconFont.height+2);
904 /*****************************************************************************
907 * Changes a cursor def.
909 ****************************************************************************/
910 @@ -1230,14 +1089,14 @@
911 num = sscanf(text,"%d %d",&cursor_num, &cursor_style);
912 if((num != 2)||(cursor_num >= MAX_CURSORS)||(cursor_num<0))
914 - afterstep_err("Bad cursor in line %s",orig_tline,NULL,NULL);
915 + afterstep_err("Bad cursor in line %s",orig_tline,NULL,NULL);
918 Scr.ASCursors[cursor_num] = XCreateFontCursor(dpy,cursor_style);
921 /*****************************************************************************
924 * Sets a boolean flag to true
926 ****************************************************************************/
927 @@ -1261,7 +1120,7 @@
930 /*****************************************************************************
933 * Reads in one or two integer values
935 ****************************************************************************/
936 @@ -1272,7 +1131,7 @@
939 /*****************************************************************************
942 * Reads in a list of mouse button numbers
944 ****************************************************************************/
945 @@ -1286,15 +1145,15 @@
946 if(next == text) break;
948 if (*text == ',') text++;
949 - if((b > 0) && (b <= MAX_BUTTONS))
950 + if((b > 0) && (b <= MAX_BUTTONS))
951 Scr.RaiseButtons |= 1<<b;
953 Scr.flags |= ClickToRaise;
958 /*****************************************************************************
961 * Reads Dimensions for an icon box from the config file
963 ****************************************************************************/
964 @@ -1332,25 +1191,25 @@
965 * This routine computes the shadow color from the background color
967 ****************************************************************************/
968 -Pixel GetShadow(Pixel background)
969 +Pixel GetShadow(Pixel background)
972 XWindowAttributes attributes;
976 XGetWindowAttributes(dpy,Scr.Root,&attributes);
979 bg_color.pixel = background;
980 XQueryColor(dpy,attributes.colormap,&bg_color);
983 r = bg_color.red % 0xffff;
984 g = bg_color.green % 0xffff;
985 b = bg_color.blue % 0xffff;
993 /* pure black: use gray */
994 if( r==0 && g== 0 && b==0)
996 @@ -1363,7 +1222,7 @@
997 nocolor("alloc shadow","");
998 bg_color.pixel = background;
1002 return bg_color.pixel;
1005 @@ -1372,19 +1231,19 @@
1006 * This routine computes the hilight color from the background color
1008 ****************************************************************************/
1009 -Pixel GetHilite(Pixel background)
1010 +Pixel GetHilite(Pixel background)
1012 XColor bg_color, white_p;
1013 XWindowAttributes attributes;
1016 XGetWindowAttributes(dpy,Scr.Root,&attributes);
1019 bg_color.pixel = background;
1020 XQueryColor(dpy,attributes.colormap,&bg_color);
1022 white_p.pixel = GetColor(white);
1023 XQueryColor(dpy,attributes.colormap,&white_p);
1027 #define min(a,b) (((a)<(b)) ? (a) : (b))
1028 #define max(a,b) (((a)>(b)) ? (a) : (b))
1029 @@ -1397,7 +1256,7 @@
1030 bg_color.red = max((white_p.red/5), bg_color.red);
1031 bg_color.green = max((white_p.green/5), bg_color.green);
1032 bg_color.blue = max((white_p.blue/5), bg_color.blue);
1035 bg_color.red = min(white_p.red, (bg_color.red*140)/100);
1036 bg_color.green = min(white_p.green, (bg_color.green*140)/100);
1037 bg_color.blue = min(white_p.blue, (bg_color.blue*140)/100);
1038 @@ -1406,7 +1265,7 @@
1044 if(!XAllocColor(dpy,attributes.colormap,&bg_color))
1046 nocolor("alloc hilight","");
1047 @@ -1443,17 +1302,17 @@
1048 /* black and white - override user choices */
1050 Scr.MenuColors.back = GetColor(white);
1051 - Scr.MenuColors.fore = GetColor(black);
1052 + Scr.MenuColors.fore = GetColor(black);
1053 Scr.MenuStippleColors.back = GetColor(white);
1054 - Scr.MenuStippleColors.fore = GetColor(black);
1055 + Scr.MenuStippleColors.fore = GetColor(black);
1056 Scr.MenuRelief.back = GetColor(black);
1057 Scr.MenuRelief.fore = GetColor(white);
1058 Scr.StdColors.back = GetColor(white);
1059 - Scr.StdColors.fore = GetColor(black);
1060 + Scr.StdColors.fore = GetColor(black);
1061 Scr.StickyColors.back = GetColor(white);
1062 - Scr.StickyColors.fore = GetColor(black);
1063 + Scr.StickyColors.fore = GetColor(black);
1064 Scr.HiColors.back = GetColor(white);
1065 - Scr.HiColors.fore = GetColor(black);
1066 + Scr.HiColors.fore = GetColor(black);
1067 Scr.StdRelief.back = GetColor(black);
1068 Scr.StdRelief.fore = GetColor(white);
1069 Scr.StickyRelief.back = GetColor(black);
1070 @@ -1470,17 +1329,17 @@
1071 /* color - accept user choices */
1073 Scr.MenuColors.back = GetColor(Menuback);
1074 - Scr.MenuColors.fore = GetColor(Menufore);
1075 + Scr.MenuColors.fore = GetColor(Menufore);
1076 Scr.MenuStippleColors.back = GetColor(Menuback);
1077 - Scr.MenuStippleColors.fore = GetColor(Menustipple);
1078 + Scr.MenuStippleColors.fore = GetColor(Menustipple);
1079 Scr.MenuRelief.back = GetShadow(Scr.MenuColors.back);
1080 Scr.MenuRelief.fore = GetHilite(Scr.MenuColors.back);
1081 Scr.StdColors.back = GetColor(Stdback);
1082 - Scr.StdColors.fore = GetColor(Stdfore);
1083 + Scr.StdColors.fore = GetColor(Stdfore);
1084 Scr.StickyColors.back = GetColor(Stickyback);
1085 - Scr.StickyColors.fore = GetColor(Stickyfore);
1086 + Scr.StickyColors.fore = GetColor(Stickyfore);
1087 Scr.HiColors.back = GetColor(Hiback);
1088 - Scr.HiColors.fore = GetColor(Hifore);
1089 + Scr.HiColors.fore = GetColor(Hifore);
1090 Scr.StdRelief.back = GetShadow(Scr.StdColors.back);
1091 Scr.StdRelief.fore = GetHilite(Scr.StdColors.back);
1092 Scr.StickyRelief.back = GetShadow(Scr.StickyColors.back);
1093 @@ -1545,7 +1404,7 @@
1094 Scr.IconFont.font->ascent+Scr.IconFont.font->descent;
1095 Scr.IconFont.y = Scr.IconFont.font->ascent;
1096 IconFont = &Scr.IconFont;
1099 nofont("fixed: that's bad...");
1102 @@ -1559,20 +1418,20 @@
1105 /****************************************************************************
1108 * Prints an error message for font loading
1110 - ****************************************************************************/
1111 + ****************************************************************************/
1112 void nofont(char *name)
1114 afterstep_err("can't get font %s", name,NULL,NULL);
1117 /****************************************************************************
1120 * Processes a menu body definition
1122 - ****************************************************************************/
1123 + ****************************************************************************/
1124 MenuRoot *ParseMenuBody(char *name,FILE *fd)
1127 @@ -1617,7 +1476,7 @@
1128 AddToMenu(mr, stripcpy2(pline,1,True), stripcpy2(pline,2,True),
1129 ptr2, func,func_val_1,func_val_2, unit_1, unit_2);
1133 pline = fgets(newline,(sizeof newline)-1,fd);
1134 if(pline == (char *)0)return NULL;
1136 @@ -1631,10 +1490,10 @@
1139 /****************************************************************************
1141 + * Parses a popup definition
1143 - * Parses a popup definition
1145 - ****************************************************************************/
1146 + ****************************************************************************/
1147 void ParsePopupEntry(char *tline,FILE *fd, char **junk,int *junk2)
1150 @@ -1663,10 +1522,10 @@
1153 /****************************************************************************
1156 * Parses a mouse binding
1158 - ****************************************************************************/
1159 + ****************************************************************************/
1160 void ParseMouseEntry(char *tline,FILE *fd, char **junk,int *junk2)
1162 char context[256],modifiers[256],function[256],*ptr;
1163 @@ -1748,7 +1607,7 @@
1164 (func == F_WARP)||(func == F_MODULE))
1166 mi = (MenuItem *)safemalloc(sizeof(MenuItem));
1169 mi->next = (MenuItem *)NULL;
1170 mi->prev = (MenuItem *)NULL;
1172 @@ -1770,7 +1629,7 @@
1178 temp = Scr.MouseButtonRoot;
1179 Scr.MouseButtonRoot = (MouseButton *)safemalloc(sizeof(MouseButton));
1180 Scr.MouseButtonRoot->func = func;
1181 @@ -1802,10 +1661,10 @@
1184 /****************************************************************************
1187 * Processes a line with a key binding
1189 - ****************************************************************************/
1190 + ****************************************************************************/
1191 void ParseKeyEntry(char *tline, FILE *fd,char **junk,int *junk2)
1193 char context[256],modifiers[256],function[256],*ptr;
1194 @@ -1830,13 +1689,13 @@
1195 match_string(func_config,function,"bad key function:",fd);
1197 /* Make CirculateUp and CirculateDown
\ 1take args. by Y.NOMURA */
1200 if ((func == F_CIRCULATE_UP) || (func == F_CIRCULATE_DOWN)||
1202 ptr = stripcpy3(tline,False);
1205 /* End of addition */
1208 if((func == F_EXEC)||(func == F_RESTART)||(func == F_MODULE))
1210 ptr = stripcpy3(tline,True);
1211 @@ -1865,21 +1724,21 @@
1214 /****************************************************************************
1217 * Sets menu/keybinding/mousebinding function to specified value
1219 - ****************************************************************************/
1220 + ****************************************************************************/
1221 void set_func(char *text, FILE *fd, char **value,int *junk)
1223 func = (unsigned long)value;
1226 /****************************************************************************
1228 - * Turns a string context of context or modifier values into an array of
1230 + * Turns a string context of context or modifier values into an array of
1231 * true/false values (bits)
1233 - ****************************************************************************/
1234 + ****************************************************************************/
1235 void find_context(char *string, int *output, struct charstring *table)
1238 @@ -1919,11 +1778,11 @@
1241 /****************************************************************************
1244 * Matches text from config to a table of strings, calls routine
1245 * indicated in table.
1247 - ****************************************************************************/
1248 + ****************************************************************************/
1249 void match_string(struct config *table, char *text, char *error_msg, FILE *fd)
1252 @@ -1949,21 +1808,21 @@
1261 /****************************************************************************
1264 * Generates the window for a menu
1266 - ****************************************************************************/
1267 + ****************************************************************************/
1268 void MakeMenu(MenuRoot *mr)
1271 unsigned long valuemask;
1272 XSetWindowAttributes attributes;
1276 /* lets first size the window accordingly */
1279 @@ -1995,7 +1854,7 @@
1283 -#ifndef NO_SAVEUNDERS
1284 +#ifndef NO_SAVEUNDERS
1285 valuemask = (CWBackPixel | CWEventMask | CWCursor | CWSaveUnder);
1287 valuemask = (CWBackPixel | CWEventMask | CWCursor);
1288 @@ -2003,7 +1862,7 @@
1289 attributes.background_pixel = Scr.MenuColors.back;
1290 attributes.event_mask = (ExposureMask | EnterWindowMask);
1291 attributes.cursor = Scr.ASCursors[MENU];
1292 -#ifndef NO_SAVEUNDERS
1293 +#ifndef NO_SAVEUNDERS
1294 attributes.save_under = TRUE;
1296 mr->width = mr->width + mr->width2;
1297 @@ -2014,7 +1873,7 @@
1298 (Visual *) CopyFromParent,
1299 valuemask, &attributes);
1300 XSaveContext(dpy,mr->w,MenuContext,(caddr_t)mr);
1306 @@ -2022,23 +1881,23 @@
1308 * scanForHotkeys - Look for hotkey markers in a MenuItem
1313 * it - MenuItem to scan
1314 * which - +1 to look in it->item1 and -1 to look in it->item2.
1316 ***********************************************************************/
1318 -void scanForHotkeys(MenuItem *it, int which)
1319 +void scanForHotkeys(MenuItem *it, int which)
1323 start = (which > 0) ? it->item : it->item2; /* Get start of string */
1324 - for (txt = start; *txt != '\0'; txt++)
1325 + for (txt = start; *txt != '\0'; txt++)
1326 { /* Scan whole string */
1329 { /* A hotkey marker? */
1330 - if (txt[1] == '&')
1331 + if (txt[1] == '&')
1332 { /* Just an escaped & */
1333 char *tmp; /* Copy the string down over it */
1334 for (tmp = txt; *tmp != '\0'; tmp++) tmp[0] = tmp[1];
1335 @@ -2046,7 +1905,7 @@
1337 /* It's a hot key marker - work out the offset value */
1338 it->hotkey = txt[1];
1339 - for (; txt[1] != '\0'; txt++)
1340 + for (; txt[1] != '\0'; txt++)
1341 txt[0] = txt[2]; /* Copy down.. */
1342 return; /* Only one hotkey per item... */
1344 @@ -2071,7 +1930,7 @@
1345 * func - the numeric function
1347 ***********************************************************************/
1348 -void AddToMenu(MenuRoot *menu, char *item, char *item2, char *action,int func,
1349 +void AddToMenu(MenuRoot *menu, char *item, char *item2, char *action,int func,
1350 long func_val_1,long func_val_2, char unit_1, char unit_2)
1353 @@ -2092,7 +1951,7 @@
1354 tmp->prev = menu->last;
1360 if (item != (char *)0)
1362 @@ -2162,7 +2021,7 @@
1363 menu->width2 = width;
1364 if((width==0)&&(tmp->strlen2>0))
1368 tmp->item_num = menu->items++;
1371 @@ -2181,7 +2040,7 @@
1372 MenuRoot *NewMenuRoot(char *name)
1377 tmp = (MenuRoot *) safemalloc(sizeof(MenuRoot));
1380 @@ -2191,7 +2050,7 @@
1382 #ifdef ENABLE_TEXTURE
1383 tmp->titlebg = None;
1384 - tmp->itembg = None;
1385 + tmp->itembg = None;
1389 @@ -2227,8 +2086,8 @@
1390 if ((keysym = XStringToKeysym(name)) == NoSymbol ||
1391 (keycode = XKeysymToKeycode(dpy, keysym)) == 0)
1397 XDisplayKeycodes(dpy, &min, &max);
1398 for (i=min; i<=max; i++)
1399 if (XKeycodeToKeysym(dpy, i, 0) == keysym)
1400 @@ -2253,17 +2112,17 @@
1401 tmp->val2_unit = 100;
1403 tmp->val2_unit = Scr.MyDisplayHeight;
1411 /****************************************************************************
1414 * Loads a single color
1416 - ****************************************************************************/
1417 + ****************************************************************************/
1418 Pixel GetColor(char *name)
1421 @@ -2271,11 +2130,11 @@
1423 XGetWindowAttributes(dpy,Scr.Root,&attributes);
1425 - if (!XParseColor (dpy, attributes.colormap, name, &color))
1426 + if (!XParseColor (dpy, attributes.colormap, name, &color))
1428 nocolor("parse",name);
1430 - else if(!XAllocColor (dpy, attributes.colormap, &color))
1431 + else if(!XAllocColor (dpy, attributes.colormap, &color))
1433 nocolor("alloc",name);
1435 @@ -2287,11 +2146,11 @@
1436 afterstep_err("can't %s color %s", note,name,NULL);
1438 /****************************************************************************
1441 * Copies a string into a new, malloc'ed string
1442 * Strips leading spaces and trailing spaces and new lines
1444 - ****************************************************************************/
1445 + ****************************************************************************/
1446 char *stripcpy(char *source)
1449 @@ -2311,10 +2170,10 @@
1456 /****************************************************************************
1459 * Copies a string into a new, malloc'ed string
1460 * Strips all data before the first quote and after the second
1462 @@ -2337,13 +2196,13 @@
1464 while((*ptr!='"')&&(*ptr != 0))
1470 else if(tab_sensitive==1)
1471 while((*ptr!='"')&&(*ptr != 0)&&(*ptr!='\t'))
1477 else if(tab_sensitive==2)
1478 @@ -2372,7 +2231,7 @@
1481 /****************************************************************************
1484 * Copies a string into a new, malloc'ed string
1485 * Strips all data before the second quote. and strips trailing spaces and
1487 @@ -2394,7 +2253,7 @@
1489 return stripcpy(source);
1493 void bad_binding(int num)
1495 afterstep_err("bad binding in line %s",orig_tline,NULL,NULL);
1496 @@ -2413,23 +2272,16 @@
1504 - gcm = GCForeground|GCBackground|GCGraphicsExposures;
1505 - gcv.foreground = Scr.StdColors.fore;
1506 - gcv.background = Scr.StdColors.back;
1507 - gcv.graphics_exposures = False;
1508 - Scr.MaskGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);
1510 - gcm = GCLineWidth|GCForeground|GCBackground|GCFunction;
1511 + gcm = GCLineWidth|GCForeground|GCBackground|GCFunction;
1512 gcv.function = GXcopy;
1514 gcv.foreground = Scr.StdColors.fore;
1515 gcv.background = Scr.StdColors.back;
1516 Scr.LineGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);
1518 - gcm = GCFunction|GCLineWidth|GCForeground|GCSubwindowMode;
1519 + gcm = GCFunction|GCLineWidth|GCForeground|GCSubwindowMode;
1520 gcv.function = GXxor;
1522 gcv.foreground = XORvalue;
1523 @@ -2441,33 +2293,6 @@
1525 gcv.function = GXcopy;
1526 gcv.plane_mask = AllPlanes;
1528 - if(Scr.TitleTextType!=0){
1529 - gcv.foreground = GetColor(hircolor);
1530 - gcv.font = Scr.WindowFont.font->fid;
1531 - Scr.HiFontReliefGC= XCreateGC(dpy, Scr.Root, gcm, &gcv);
1533 - gcv.foreground = GetColor(hiscolor);
1534 - gcv.font = Scr.WindowFont.font->fid;
1535 - Scr.HiFontShadowGC= XCreateGC(dpy, Scr.Root, gcm, &gcv);
1537 - gcv.foreground = GetColor(hincolor);
1538 - gcv.font = Scr.WindowFont.font->fid;
1539 - Scr.HiFontGC= XCreateGC(dpy, Scr.Root, gcm, &gcv);
1541 - gcv.foreground = GetColor(lorcolor);
1542 - gcv.font = Scr.WindowFont.font->fid;
1543 - Scr.LoFontReliefGC= XCreateGC(dpy, Scr.Root, gcm, &gcv);
1545 - gcv.foreground = GetColor(loscolor);
1546 - gcv.font = Scr.WindowFont.font->fid;
1547 - Scr.LoFontShadowGC= XCreateGC(dpy, Scr.Root, gcm, &gcv);
1549 - gcv.foreground = GetColor(loncolor);
1550 - gcv.font = Scr.WindowFont.font->fid;
1551 - Scr.LoFontGC= XCreateGC(dpy, Scr.Root, gcm, &gcv);
1554 gcv.foreground = Scr.StdColors.fore;
1555 gcv.background = Scr.StdColors.back;
1556 gcv.font = Scr.StdFont.font->fid;
1557 @@ -2477,10 +2302,10 @@
1558 * call in FindScreenInfo (events.c) (since drawable is a pixmap).
1560 gcv.graphics_exposures = False;
1563 Scr.NormalGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);
1567 /* GC for pager labels */
1568 Scr.FontGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);
1570 @@ -2498,11 +2323,11 @@
1571 gcv.foreground = Scr.HiRelief.fore;
1572 gcv.background = Scr.HiRelief.back;
1573 gcv.fill_style = FillSolid;
1574 - Scr.HiReliefGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);
1575 + Scr.HiReliefGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);
1577 gcv.foreground = Scr.HiRelief.back;
1578 gcv.background = Scr.HiRelief.fore;
1579 - Scr.HiShadowGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);
1580 + Scr.HiShadowGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);
1582 if (Scr.BevelReliefGC==None)
1583 Scr.BevelReliefGC=Scr.HiReliefGC;
1584 @@ -2523,7 +2348,7 @@
1585 gcm=GCFunction|GCPlaneMask|GCGraphicsExposures|GCLineWidth|GCForeground|
1586 GCBackground|GCFont|GCStipple|GCFillStyle;
1587 Scr.MenuStippleGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);
1590 gcm=GCFunction|GCPlaneMask|GCGraphicsExposures|GCLineWidth|GCForeground|
1591 GCBackground|GCFont;
1592 gcv.fill_style = FillSolid;
1593 @@ -2536,24 +2361,24 @@
1595 gcv.foreground = Scr.MenuRelief.fore;
1596 gcv.background = Scr.MenuRelief.back;
1597 - Scr.MenuReliefGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);
1598 + Scr.MenuReliefGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);
1600 gcv.foreground = Scr.MenuRelief.back;
1601 gcv.background = Scr.MenuRelief.fore;
1602 - Scr.MenuShadowGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);
1603 + Scr.MenuShadowGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);
1605 gcv.foreground = Scr.StdRelief.fore;
1606 gcv.background = Scr.StdRelief.back;
1607 - Scr.StdReliefGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);
1608 + Scr.StdReliefGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);
1610 gcv.foreground = Scr.StdRelief.back;
1611 gcv.background = Scr.StdRelief.fore;
1612 - Scr.StdShadowGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);
1613 + Scr.StdShadowGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);
1614 Scr.ScratchGC2 = XCreateGC(dpy, Scr.Root, gcm, &gcv);
1616 gcv.foreground = Scr.StickyRelief.fore;
1617 gcv.background = Scr.StickyRelief.back;
1618 - Scr.StickyReliefGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);
1619 + Scr.StickyReliefGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);
1621 gcv.foreground = Scr.StickyRelief.back;
1622 gcv.background = Scr.StickyRelief.fore;
1623 @@ -2562,7 +2387,6 @@
1624 gcv.foreground = Scr.HiColors.fore;
1625 gcv.font = Scr.IconFont.font->fid;
1626 Scr.IconGC = XCreateGC(dpy, Scr.Root, GCForeground|GCFont, &gcv);
1630 /***********************************************************************
1631 @@ -2571,7 +2395,7 @@
1632 * SetOneStyle - add a window name to the no title list
1635 - * name - a pointer to the name of the window
1636 + * name - a pointer to the name of the window
1638 ***********************************************************************/
1640 @@ -2613,8 +2437,8 @@
1643 AddToList(name,icon_name,new_flags,0,desknumber,0,0,NULL,NULL,0,0);
1651 @@ -2646,11 +2470,11 @@
1652 static char *cp = NULL;
1653 static int maxsize = 0;
1657 /* The char * storage only lasts for 1 call... */
1659 /* Get space to hold everything, if needed */
1662 n = EXTRA + strlen(name) + strlen(def);
1665 @@ -2674,7 +2498,7 @@
1668 strcpy(cp, "define(");
1673 /* Tack on "," and 2 sets of starting quotes */
1674 @@ -2697,14 +2521,14 @@
1677 strcat(cp, "dnl\n");
1683 static char *MkNum(char *name,int def)
1688 sprintf(num, "%d", def);
1689 return(MkDef(name, num));
1691 @@ -2731,7 +2555,7 @@
1693 strcat(tmp_name, "/steprcXXXXX");
1697 if (*tmp_name == '\0')
1699 perror("mktemp failed in m4_defs");
1700 @@ -2753,7 +2577,7 @@
1701 perror("Cannot open pipe to m4");
1706 mygethostname(client,MAXHOSTNAME);
1708 mygetostype (ostype, sizeof ostype);
1709 @@ -2775,7 +2599,7 @@
1710 /* TWM_TYPE is afterstep, for completeness */
1712 fputs(MkDef("TWM_TYPE", "afterstep"), tmpf);
1715 /* The machine running the X server */
1716 fputs(MkDef("SERVERHOST", server), tmpf);
1717 /* The machine running the window manager process */
1718 @@ -2806,7 +2630,7 @@
1720 fputs(MkNum("BITS_PER_RGB", visual->bits_per_rgb), tmpf);
1722 - switch(visual->class)
1723 + switch(visual->class)
1727 @@ -2830,11 +2654,11 @@
1733 fputs(MkDef("CLASS", vc), tmpf);
1734 - if (visual->class != StaticGray && visual->class != GrayScale)
1735 + if (visual->class != StaticGray && visual->class != GrayScale)
1736 fputs(MkDef("COLOR", "Yes"), tmpf);
1739 fputs(MkDef("COLOR", "No"), tmpf);
1740 fputs(MkDef("AFTER_VERSION", VERSION), tmpf);
1742 @@ -2867,18 +2691,18 @@
1743 fputs(MkDef("OPTIONS", options), tmpf);
1745 fputs(MkDef("AFTERDIR", AFTERDIR), tmpf);
1749 * At this point, we've sent the definitions to m4. Just include
1750 * the steprc file now.
1754 fprintf(tmpf, "%sinclude(%s%s%s)\n",
1755 (m4_prefix) ? "m4_": "",
1764 diff -u ./icons.c /home/malda/code/AfterStep-1.0/afterstep/icons.c
1765 --- ./icons.c Wed May 14 17:38:51 1997
1766 +++ /home/malda/code/AfterStep-1.0/afterstep/icons.c Thu Mar 20 19:09:21 1997
1770 XSetForeground(dpy, Scr.IconGC, Scr.HiColors.back);
1771 -/* XFillRectangle(dpy, Tmp_win->icon_pixmap_w, Scr.IconGC, 1, 1,
1772 - Tmp_win->icon_p_width-2,titleH+6); */
1773 + XFillRectangle(dpy, Tmp_win->icon_pixmap_w, Scr.IconGC, 1, 1,
1774 + Tmp_win->icon_p_width-2,titleH+6);
1775 XSetForeground(dpy, Scr.IconGC, Scr.HiColors.fore);
1776 if (Tmp_win->icon_name==NULL) {
1777 if (Tmp_win->name!=NULL) {
1778 @@ -255,11 +255,8 @@
1783 XDrawString(dpy, Tmp_win->icon_pixmap_w, Scr.IconGC, textX,
1784 Scr.IconFont.font->ascent+1, text, cnt);
1785 - /* XDrawString(dpy, Tmp_win->icon_pixmap_w, Scr.IconGC, textX+1,
1786 - Scr.IconFont.font->ascent+2, text, cnt); */
1790 diff -u ./menus.c /home/malda/code/AfterStep-1.0/afterstep/menus.c
1791 --- ./menus.c Wed May 21 19:28:47 1997
1792 +++ /home/malda/code/AfterStep-1.0/afterstep/menus.c Sat Apr 19 16:26:01 1997
1794 ***********************************************************************/
1795 #include "../configure.h"
1803 #include <sys/types.h>
1804 #include <sys/time.h>
1808 #include "afterstep.h"
1812 #include "stepgfx.h"
1817 -#include <X11/extensions/shape.h>
1821 Bool IgnoreRelease = 1;
1823 @@ -187,17 +178,6 @@
1824 menu->titlebg = None;
1828 - XCopyArea(dpy, Scr.MenuTitle, menu->titlebg, Scr.NormalGC, 0, 0, menu->width-2, menu->first->y_height-2, 0,0);
1831 - XSetWindowBackgroundPixmap(dpy, menu->w, Scr.MenuTitle);
1832 - if(Scr.MenuTitleMask!=None)
1833 - XShapeCombineMask(dpy, menu->w, ShapeBounding, 0, 0,
1834 - Scr.MenuTitleMask, ShapeSet);
1835 - XFreePixmap(dpy, menu->titlebg);
1839 XFreePixmap(dpy, menu->titlebg);
1840 menu->titlebg = None;
1841 @@ -206,10 +186,6 @@
1845 - if(Textures.Mtype==128)
1846 - XSetWindowBackgroundPixmap(dpy, menu->w, Scr.MenuTitle);
1849 if ((menu->itembg==None) && (Textures.Itype>0) && (menu->last!=NULL)) {
1850 menu->itembg = XCreatePixmap(dpy, menu->w, menu->width-2,
1851 menu->last->y_height-3,
1852 @@ -244,12 +220,6 @@
1853 menu->itembg = None;
1856 - case 128: /* Pixmap */
1857 - if(Textures.Mtype!=129)
1858 - XCopyArea(dpy, Scr.MenuItem, menu->itembg, Scr.NormalGC,0, 0, menu->width-2, menu->last->y_height-3,0,0);
1859 - else { XFreePixmap(dpy, menu->itembg);
1860 - menu->itembg = None; }
1863 XFreePixmap(dpy, menu->itembg);
1864 menu->itembg = None;
1865 @@ -350,16 +320,11 @@
1866 if (mr->titlebg != None) {
1867 Globalgcv.foreground = Scr.HiColors.back;
1868 XChangeGC(dpy,Scr.ScratchGC1,GCForeground,&Globalgcv);
1870 - if(Textures.Mtype<129)
1871 - XCopyArea(dpy, mr->titlebg, mr->w, DefaultGC(dpy,Scr.screen),
1872 + XCopyArea(dpy, mr->titlebg, mr->w, DefaultGC(dpy,Scr.screen),
1873 0, y_offset, mr->width-1, mr->first->y_height-2, 1,
1875 - else XCopyArea(dpy, mr->titlebg, mr->w, DefaultGC(dpy,Scr.screen),
1876 - 0, y_offset+1, mr->width-1, mr->height, 1, y_offset+1);
1877 - if(Textures.Mtype<129)
1878 - XDrawRectangle(dpy, mr->w, Scr.ScratchGC1, 0, y_offset,
1879 - mr->width-1, y_height-2);
1880 + XDrawRectangle(dpy, mr->w, Scr.ScratchGC1, 0, y_offset,
1881 + mr->width-1, y_height-2);
1885 @@ -375,15 +340,14 @@
1887 #ifdef ENABLE_TEXTURE
1888 if (mr->itembg!=None) {
1889 - if(Textures.Mtype<129)
1890 - XCopyArea(dpy, mr->itembg, mr->w, DefaultGC(dpy,Scr.screen), 0, 0,
1891 + XCopyArea(dpy, mr->itembg, mr->w, DefaultGC(dpy,Scr.screen), 0, 0,
1892 mr->width-2, mr->last->y_height-3, 1, y_offset+1);
1895 XClearArea(dpy, mr->w, 0,y_offset,mr->width,y_height,0);
1897 #ifdef ENABLE_TEXTURE
1898 - if ((mr->titlebg == None || mi->func != F_TITLE)&&(Textures.Mtype!=129)) {
1899 + if (mr->titlebg == None || mi->func != F_TITLE) {
1900 RelieveHalfRectangle(mr->w, 0, y_offset, mr->width,
1901 y_height, ReliefGC, ShadowGC);
1902 RelieveRectangle(mr->w, 0, y_offset, mr->width, y_height-1,
1905 if(mi->func != F_TITLE)
1906 text_y += HEIGHT_EXTRA>>1;
1907 - if(Textures.Mtype!=129)
1908 - XDrawLine( dpy, mr->w, Scr.LineGC, 0, y_height+y_offset-1,
1910 + XDrawLine( dpy, mr->w, Scr.LineGC, 0, y_height+y_offset-1,
1911 mr->width, y_height+y_offset-1);
1916 if(mi->func != F_TITLE)
1917 text_y += HEIGHT_EXTRA>>1;
1918 - if(Textures.Mtype!=129)
1919 - XDrawLine( dpy, mr->w, Scr.LineGC, 0, y_height+y_offset-1,
1921 + XDrawLine( dpy, mr->w, Scr.LineGC, 0, y_height+y_offset-1,
1922 mr->width, y_height+y_offset-1);
1924 XDrawLine( dpy, mr->w, Scr.LineGC, 0, y_offset,
1925 @@ -448,12 +412,10 @@
1926 DrawTrianglePattern(mr->w, ShadowGC, ReliefGC, ShadowGC,mr->width-d-8,
1927 y_offset+d-1, mr->width-d-1, y_offset+d+7);
1928 /* major hackage going on here */
1929 - if(Textures.Mtype!=129) {
1930 - if (y_offset > 30)
1931 - XDrawLine( dpy, mr->w, Scr.LineGC, 0, y_offset-1, 1600, y_offset-1);
1933 - XDrawLine( dpy, mr->w, Scr.MenuStippleGC, 0, y_offset-1, 1600, y_offset-1);
1935 + if (y_offset > 30)
1936 + XDrawLine( dpy, mr->w, Scr.LineGC, 0, y_offset-1, 1600, y_offset-1);
1938 + XDrawLine( dpy, mr->w, Scr.MenuStippleGC, 0, y_offset-1, 1600, y_offset-1);
1942 @@ -494,15 +456,13 @@
1943 void DrawTrianglePattern(Window w,GC GC1,GC GC2,GC GC3,int l,int u,int r,int b)
1946 - if(Scr.MenuArrow==None) {
1949 - XDrawLine(dpy,w,GC1,l,u,l,b);
1952 - XDrawLine(dpy,w,GC2,l,b,r,m);
1953 - XDrawLine(dpy,w,GC3,r,m,l,u);
1955 - else XCopyArea(dpy,Scr.MenuArrow, w, GC1, 0,0,r-l,b-u, l,u);
1956 + XDrawLine(dpy,w,GC1,l,u,l,b);
1958 + XDrawLine(dpy,w,GC2,l,b,r,m);
1959 + XDrawLine(dpy,w,GC3,r,m,l,u);
1962 /***********************************************************************
1963 diff -u ./misc.h /home/malda/code/AfterStep-1.0/afterstep/misc.h
1964 --- ./misc.h Wed May 14 17:39:23 1997
1965 +++ /home/malda/code/AfterStep-1.0/afterstep/misc.h Tue Mar 18 20:37:12 1997
1969 void SetTitleButton(char *text,FILE *,char **,int *);
1970 -void SetTitleText(char *text, FILE *, char **, int *);
1971 void SetFlag(char *text, FILE *fd, char **arg,int *);
1972 void SetTextureFlag(char *text, FILE *fd, char **arg,int *);
1973 void SetIconFlag(char *text, FILE *fd, char **arg,int *);
1974 diff -u ./screen.h /home/malda/code/AfterStep-1.0/afterstep/screen.h
1975 --- ./screen.h Wed May 21 17:41:50 1997
1976 +++ /home/malda/code/AfterStep-1.0/afterstep/screen.h Mon Mar 10 19:49:26 1997
1978 GC StippleGC; /* normal GC for menus, pager, resize window */
1979 GC DrawGC; /* GC to draw lines for move and resize */
1980 GC LineGC; /* GC to draw lines on buttons */
1982 GC HiReliefGC; /* GC for highlighted window relief */
1983 GC HiShadowGC; /* GC for highlighted window shadow */
1985 @@ -175,15 +174,6 @@
1986 GC StickyShadowGC; /* GC for unselected sticky window shadow */
1987 GC FontGC; /* GC for non-standard fonts */
1989 - GC HiFontReliefGC;
1990 - GC HiFontShadowGC;
1993 - GC LoFontShadowGC;
1994 - GC LoFontReliefGC;
1995 - int TitleTextType;
1998 int SizeStringWidth; /* minimum width of size window */
1999 int CornerWidth; /* corner width for decoratedwindows */
2000 int BoundaryWidth; /* frame width for decorated windows */
2001 @@ -195,11 +185,6 @@
2002 Pixmap BackTitle; /* Cached titlebars for gradient or tiling */
2003 Pixmap ForeTitle; /* types 2 and 3. unfocused, focused */
2004 Pixmap StickyTitle; /* and sticky */
2006 - Pixmap MenuTitleMask;
2008 - Pixmap MenuArrowMask;
2010 Pixmap TitleGradient; /* gradient for the focused title text */
2012 long next_focus_sequence; /* keep track of previously focused windows */
2013 @@ -241,12 +226,8 @@
2014 MenuRoot *InitFunction;
2015 MenuRoot *RestartFunction;
2018 int button_style[10];
2019 Pixmap button_pixmap[10];
2020 - Pixmap button_pixmap_mask[10];
2021 - Pixmap dbutton_pixmap[10];
2022 - Pixmap dbutton_pixmap_mask[10];
2023 int button_width[10];
2024 int button_height[10];