]>
Commit | Line | Data |
---|---|---|
e3298fa1 | 1 | Only in .: Makefile |
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 | |
5 | @@ -164,11 +164,6 @@ | |
6 | Bool single = False; | |
7 | Bool option_error = FALSE; | |
8 | ||
9 | - | |
10 | - Scr.ButtonType=0; | |
11 | - Scr.TitleTextType=0; | |
12 | - Scr.TitleTextY=0; | |
13 | - | |
14 | #ifdef M4 | |
15 | /* Set the defaults for m4 processing */ | |
16 | ||
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 | |
20 | @@ -186,7 +186,6 @@ | |
21 | { | |
22 | Window w=None; | |
23 | int y, i, x; | |
24 | - int z=0; | |
25 | GC ReliefGC,ShadowGC; | |
26 | GC HReliefGC,HShadowGC; | |
27 | Pixel BorderColor,BackColor; | |
28 | @@ -359,33 +358,16 @@ | |
29 | (expose_win==t->right_w[i]) || | |
30 | (expose_win == None)) { | |
31 | ||
32 | - if(Scr.ButtonType==0){ RelieveWindow(t,t->right_w[i],0,0,t->button_height, | |
33 | - 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; } | |
37 | - | |
38 | - | |
39 | + RelieveWindow(t,t->right_w[i],0,0,t->button_height, | |
40 | + 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)) | |
47 | - { /* Pressed! */ | |
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); | |
53 | - | |
54 | - } | |
55 | - else /* Not Pressed */ | |
56 | - { | |
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); | |
62 | - | |
63 | - } | |
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); | |
67 | break; | |
68 | default: | |
69 | afterstep_err( "old button styles should not be used\n",NULL,NULL,NULL); | |
70 | @@ -400,27 +382,37 @@ | |
71 | if(t->flags & BORDER ) | |
72 | { | |
73 | /* draw relief lines */ | |
74 | - GC rgc,sgc; | |
75 | - | |
76 | - rgc = onoroff?Scr.HiReliefGC:Scr.StdReliefGC; | |
77 | - sgc = onoroff?Scr.HiShadowGC:Scr.StdShadowGC; | |
78 | - | |
79 | - y = t->frame_height - 2*t->corner_width; | |
80 | - x = t->frame_width - 2*t->corner_width +t->bw; | |
81 | - SetBottomBackground(t, onoroff); | |
82 | ||
83 | - RelieveWindow(t,t->side,0,0,x,t->boundary_height, | |
84 | - rgc, sgc, 0x0004); | |
85 | + y = t->frame_height - 2*t->corner_width; | |
86 | + x = t->frame_width - 2*t->corner_width +t->bw; | |
87 | + SetBottomBackground(t, onoroff); | |
88 | + /* | |
89 | + if((flush_expose (t->side))||(expose_win == t->side)|| | |
90 | + (expose_win == None)) {*/ | |
91 | + | |
92 | + RelieveWindow(t,t->side,0,0,x,t->boundary_height, | |
93 | + HReliefGC, HShadowGC, 0x0004); | |
94 | + /* } */ | |
95 | for(i=0;i<2;i++) | |
96 | { | |
97 | - RelieveWindow(t,t->corners[i],0,0,t->corner_width, | |
98 | + /* | |
99 | + if((flush_expose(t->corners[i]))||(expose_win==t->corners[i])|| | |
100 | + (expose_win == None)) | |
101 | + {*/ | |
102 | + GC rgc,sgc; | |
103 | + | |
104 | + rgc = HReliefGC; | |
105 | + sgc = HShadowGC; | |
106 | + | |
107 | + RelieveWindow(t,t->corners[i],0,0,t->corner_width, | |
108 | t->corner_width+t->bw, | |
109 | rgc,sgc, corners[i]); | |
110 | ||
111 | if(t->boundary_height > 1) | |
112 | - RelieveParts(t,i,rgc,sgc); | |
113 | + RelieveParts(t,i,rgc,i?rgc:sgc); | |
114 | else | |
115 | - RelieveParts(t,i,rgc,sgc); | |
116 | + RelieveParts(t,i,sgc,i?sgc:sgc); | |
117 | + /* } */ | |
118 | } | |
119 | } | |
120 | else /* no decorative border */ | |
121 | @@ -641,64 +633,9 @@ | |
122 | DrawTexturedText(dpy,t->title_w,Scr.WindowFont.font,hor_off, | |
123 | 4,Scr.TitleGradient, t->name, strlen(t->name)); | |
124 | } else { | |
125 | - | |
126 | - if(Scr.TitleTextType==1){ | |
127 | - if(onoroff) | |
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; | |
132 | - | |
133 | - } | |
134 | - else | |
135 | - { /* If Off, then just use Lo */ | |
136 | - ReliefGC=Scr.LoFontReliefGC; | |
137 | - ShadowGC=Scr.LoFontShadowGC; | |
138 | - tGC=Scr.LoFontGC; | |
139 | - } | |
140 | - | |
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)); | |
146 | - | |
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)); | |
151 | - | |
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)); | |
154 | - | |
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)); | |
158 | - | |
159 | - XDrawString (dpy, t->title_w,tGC,hor_off+2, Scr.WindowFont.y+2+Scr.TitleTextY, t->name, strlen(t->name)); | |
160 | - } | |
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); | |
165 | - | |
166 | - if(PressedW!=t->title_w) | |
167 | - { | |
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)); | |
171 | - } else | |
172 | - | |
173 | - XDrawString (dpy, t->title_w,Scr.HiFontGC,hor_off+1,Scr.WindowFont.y+1+Scr.TitleTextY, t->name, strlen(t->name)); | |
174 | - | |
175 | - | |
176 | - } | |
177 | - else | |
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)); | |
182 | - } | |
183 | + XDrawString (dpy, t->title_w,Scr.FontGC,hor_off, | |
184 | + Scr.WindowFont.y+ 4, | |
185 | + t->name, strlen(t->name)); | |
186 | } | |
187 | } | |
188 | #else | |
189 | @@ -797,9 +734,8 @@ | |
190 | { | |
191 | case 0: | |
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; | |
198 | break; | |
199 | case 1: | |
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 | |
204 | @@ -1,17 +1,17 @@ | |
205 | /**************************************************************************** | |
206 | * This module is mostly all new | |
207 | - * by Rob Nation | |
208 | + * by Rob Nation | |
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 | |
213 | * by Bo Yang | |
214 | - * | |
215 | + * | |
216 | * slightly modified for AfterStep | |
217 | * by Frank Fejes | |
218 | - * | |
219 | + * | |
220 | **************************************************************************** | |
221 | - * | |
222 | + * | |
223 | * Configure.c: reads the .steprc or system.steprc file, interprets it, | |
224 | * and sets up menus, bindings, colors, and fonts as specified | |
225 | * | |
226 | @@ -30,7 +30,6 @@ | |
227 | ||
228 | #include <X11/Xproto.h> | |
229 | #include <X11/Xatom.h> | |
230 | - | |
231 | #ifdef M4 | |
232 | #include <X11/Xmu/SysUtil.h> | |
233 | #endif | |
234 | @@ -85,7 +84,7 @@ | |
235 | void nocolor(char *note, char *name); | |
236 | int contexts; | |
237 | int mods,func,func_val_1,func_val_2; | |
238 | - | |
239 | + | |
240 | #ifndef NO_PAGER | |
241 | int pager_x=10000,pager_y=10000; | |
242 | #endif | |
243 | @@ -97,16 +96,7 @@ | |
244 | char *TexMaxcols=NULL; | |
245 | char *TColor=NULL, *IColor=NULL, *MColor=NULL, *UColor=NULL, *SColor=NULL; | |
246 | char *TGColor=NULL; | |
247 | -char *TPixmap=NULL,*UPixmap=NULL,*SPixmap=NULL, *MTPixmap=NULL, *MPixmap=NULL, *MTPixmapMask=NULL, *MArrowPixmap=NULL; | |
248 | - | |
249 | -char hincolor[15]; | |
250 | -char hircolor[15]; | |
251 | -char hiscolor[15]; | |
252 | -char loncolor[15]; | |
253 | -char lorcolor[15]; | |
254 | -char loscolor[15]; | |
255 | - | |
256 | - | |
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; | |
261 | @@ -158,7 +148,7 @@ | |
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}, | |
267 | #ifndef PRUNE | |
268 | {"Icon", SetOneStyle, (char **)&Scr.TheList,(int *)ICON_FLAG}, | |
269 | #endif | |
270 | @@ -174,13 +164,13 @@ | |
271 | {"CirculateSkipIcons",SetFlag, (char **)CirculateSkipIcons, (int *)0}, | |
272 | ||
273 | #ifndef PRUNE | |
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, | |
285 | (int *)STICKY_FLAG}, | |
286 | {"StaysOnTop", SetOneStyle, (char **)&Scr.TheList, | |
287 | (int *)STAYSONTOP_FLAG}, | |
288 | @@ -234,7 +224,7 @@ | |
289 | {"BackingStore", SetFlag, (char **)BackingStore, (int *)0}, | |
290 | {"AppsBackingStore", SetFlag, (char **)AppsBackingStore, (int *)0}, | |
291 | {"SaveUnders", SetFlag, (char **)SaveUnders, (int *)0}, | |
292 | - | |
293 | + | |
294 | {"ModulePath", assign_string, &ModulePath, (int *)0}, | |
295 | #ifndef PRUNE | |
296 | {"Module", executeModule, (char **)0, (int *)0}, | |
297 | @@ -243,7 +233,7 @@ | |
298 | {"TitleBarStyle", assign_string, &TitleStyle, (int *)0}, | |
299 | {"TextureTypes", assign_string, &TexTypes, (int *)0}, | |
300 | {"TextureMaxColors", assign_string, &TexMaxcols, (int *)0}, | |
301 | - | |
302 | + | |
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*/ | |
306 | @@ -252,9 +242,6 @@ | |
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}, | |
316 | @@ -267,8 +254,7 @@ | |
317 | {"ButtonNoBorder", SetIconFlag, (char **)IconNoBorder, (int *)0}, | |
318 | #endif | |
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} | |
324 | }; | |
325 | ||
326 | @@ -318,8 +304,8 @@ | |
327 | #endif | |
328 | {"", 0,(char **)0} | |
329 | }; | |
330 | - | |
331 | -struct charstring | |
332 | + | |
333 | +struct charstring | |
334 | { | |
335 | char key; | |
336 | int value; | |
337 | @@ -378,9 +364,9 @@ | |
338 | #endif | |
339 | ||
340 | /*************************************************************** | |
341 | - * | |
342 | + * | |
343 | * Read a XPM file | |
344 | - * | |
345 | + * | |
346 | **************************************************************/ | |
347 | Pixmap GetXPMTile(char *file) | |
348 | { | |
349 | @@ -390,14 +376,14 @@ | |
350 | char *path = NULL; | |
351 | Pixmap pix, mask; | |
352 | #ifdef XPM | |
353 | - | |
354 | + | |
355 | path = findIconFile(file, PixmapPath,R_OK); | |
356 | if(path == NULL)return None; | |
357 | ||
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; | |
364 | ||
365 | if (XpmReadFileToPixmap(dpy, Scr.Root, path, | |
366 | &pix, &mask, | |
367 | @@ -406,7 +392,7 @@ | |
368 | return None; | |
369 | } | |
370 | free(path); | |
371 | - if (mask!=None) | |
372 | + if (mask!=None) | |
373 | XFreePixmap(dpy,mask); | |
374 | #else | |
375 | pix = None; | |
376 | @@ -414,42 +400,8 @@ | |
377 | return pix; | |
378 | } | |
379 | ||
380 | - | |
381 | -Pixmap GetXPMTileMask(char *file, Pixmap *mask) | |
382 | -{ | |
383 | - XWindowAttributes root_attr; | |
384 | - XpmAttributes xpm_attributes; | |
385 | - extern char *PixmapPath; | |
386 | - char *path = NULL; | |
387 | - Pixmap pix; | |
388 | -#ifdef XPM | |
389 | - | |
390 | - path = findIconFile(file, PixmapPath,R_OK); | |
391 | - if(path == NULL)return None; | |
392 | - | |
393 | - XGetWindowAttributes(dpy,Scr.Root,&root_attr); | |
394 | -/* xpm_attributes.colormap = root_attr.colormap; | |
395 | - xpm_attributes.closeness = 40000; /* Allow for "similar" colors */ | |
396 | - | |
397 | - xpm_attributes.valuemask = (XpmReturnPixels | XpmReturnExtensions); | |
398 | - | |
399 | - if (XpmReadFileToPixmap(dpy, Scr.Root, path, | |
400 | - &pix, mask, | |
401 | - &xpm_attributes) != XpmSuccess ) { | |
402 | - free(path); | |
403 | - return None; | |
404 | - } | |
405 | - free(path); | |
406 | -#else | |
407 | - pix = None; | |
408 | -#endif | |
409 | - | |
410 | - return pix; | |
411 | -} | |
412 | - | |
413 | - | |
414 | /***************************************************************************** | |
415 | - * | |
416 | + * | |
417 | * This routine is responsible for reading and parsing the config file | |
418 | * | |
419 | ****************************************************************************/ | |
420 | @@ -462,9 +414,9 @@ | |
421 | int HomeLen; /* length of Home */ | |
422 | #ifdef ENABLE_TEXTURE | |
423 | int icol, mcol, ucol, tcol, scol; /* texture colors */ | |
424 | - int defcol; | |
425 | + int defcol; | |
426 | #endif | |
427 | - | |
428 | + | |
429 | #ifdef M4 | |
430 | extern int m4_enable; | |
431 | #endif | |
432 | @@ -488,7 +440,7 @@ | |
433 | Scr.MouseButtonRoot = NULL; | |
434 | Scr.FuncKeyRoot.next = NULL; | |
435 | Scr.TheList = NULL; | |
436 | - | |
437 | + | |
438 | Scr.DefaultIcon = NULL; | |
439 | ||
440 | /* find the home directory to look in */ | |
441 | @@ -498,7 +450,7 @@ | |
442 | HomeLen = strlen(Home); | |
443 | ||
444 | if(config_file[0] == '/') | |
445 | - { | |
446 | + { | |
447 | home_file = safemalloc(strlen(config_file)+1); | |
448 | strcpy(home_file,config_file); | |
449 | } | |
450 | @@ -538,13 +490,13 @@ | |
451 | * Process the config file through m4 and save the | |
452 | * results in a temp file. | |
453 | */ | |
454 | - | |
455 | + | |
456 | afterstep_file = m4_defs(dpy, display_name, m4_options, afterstep_file); | |
457 | fclose(config_fd); | |
458 | + | |
459 | + config_fd = fopen(afterstep_file, "r"); | |
460 | ||
461 | - config_fd = fopen(afterstep_file, "r"); | |
462 | - | |
463 | - if (config_fd == (FILE *) 0) | |
464 | + if (config_fd == (FILE *) 0) | |
465 | { | |
466 | perror("Cannot open m4-processed config file\n"); | |
467 | exit(1); | |
468 | @@ -585,7 +537,7 @@ | |
469 | defcol = 32; | |
470 | } else { | |
471 | defcol = 10; | |
472 | - } | |
473 | + } | |
474 | if (!TexMaxcols) { | |
475 | Textures.Tmaxcols = defcol; | |
476 | Textures.Imaxcols = defcol; | |
477 | @@ -601,7 +553,7 @@ | |
478 | Textures.Mmaxcols = (mcol >= 0 ? mcol : defcol); | |
479 | Textures.Smaxcols = (scol >= 0 ? scol : defcol); | |
480 | } | |
481 | - InitTextureData(&Textures, TColor, UColor, MColor, IColor, SColor, | |
482 | + InitTextureData(&Textures, TColor, UColor, MColor, IColor, SColor, | |
483 | TGColor); | |
484 | /* load titlebar pixmaps */ | |
485 | if (Textures.Ttype==TEXTURE_PIXMAP) { | |
486 | @@ -611,9 +563,9 @@ | |
487 | if ((Scr.ForeTitle=GetXPMTile(TPixmap))==None) { | |
488 | printf("couldn't load Titlebar tile pixmap\n"); | |
489 | Textures.Ttype = 0; | |
490 | - } | |
491 | + } | |
492 | } | |
493 | - } | |
494 | + } | |
495 | if (Textures.Utype==TEXTURE_PIXMAP) { | |
496 | if (UPixmap==NULL) | |
497 | Textures.Utype=0; | |
498 | @@ -633,49 +585,16 @@ | |
499 | Textures.Stype = 0; | |
500 | } | |
501 | } | |
502 | - } | |
503 | - | |
504 | - | |
505 | - if (Textures.Mtype==TEXTURE_PIXMAP) { | |
506 | - if (MPixmap==NULL) | |
507 | - Textures.Mtype=0; | |
508 | - else { | |
509 | - if ((Scr.MenuItem=GetXPMTile(MPixmap))==None) { | |
510 | - printf("couldn't load Menu Item pixmap\n"); | |
511 | - Textures.Mtype = 0; | |
512 | - } | |
513 | - } | |
514 | - } | |
515 | - | |
516 | - if (Textures.Itype==TEXTURE_PIXMAP) { | |
517 | - if (MTPixmap==NULL) | |
518 | - Textures.Itype=0; | |
519 | - else { | |
520 | - if ( | |
521 | - (Scr.MenuTitle =GetXPMTileMask(MTPixmap,&Scr.MenuTitleMask))==None) | |
522 | - { | |
523 | - printf("couldn't load Menu Titlebar tile pixmap\n"); | |
524 | - Textures.Itype = 0; | |
525 | - } | |
526 | - } | |
527 | - } | |
528 | - | |
529 | - if(MArrowPixmap==NULL) | |
530 | - Scr.MenuArrow=None; | |
531 | - else | |
532 | - if((Scr.MenuArrow=GetXPMTile(MArrowPixmap))==None) | |
533 | - printf("couldn't load menu arrow pixmap\n", Scr.MenuArrow=None); | |
534 | - | |
535 | - | |
536 | + } | |
537 | ||
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 @@ | |
552 | } | |
553 | } | |
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 @@ | |
567 | } else | |
568 | Textures.Utype = 0; | |
569 | } | |
570 | - | |
571 | + | |
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; | |
585 | @@ -742,9 +661,9 @@ | |
586 | } | |
587 | } else | |
588 | Textures.Stype=0; | |
589 | - } | |
590 | + } | |
591 | #endif /* ENABLE_TEXTURE */ | |
592 | - | |
593 | + | |
594 | /* create pixmaps for buttons */ | |
595 | ButtonStyle(); | |
596 | ||
597 | @@ -757,12 +676,12 @@ | |
598 | ||
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) | |
603 | { | |
604 | Scr.EdgeScrollX /= 1000; | |
605 | Scr.flags |= EdgeWrapX; | |
606 | } | |
607 | - if (Scr.EdgeScrollY >= 1000) | |
608 | + if (Scr.EdgeScrollY >= 1000) | |
609 | { | |
610 | Scr.EdgeScrollY /= 1000; | |
611 | Scr.flags |= EdgeWrapY; | |
612 | @@ -784,7 +703,7 @@ | |
613 | Scr.flags &= ~EdgeWrapY; | |
614 | ||
615 | GetColors(); | |
616 | - | |
617 | + | |
618 | /* create pixmap for icon button background */ | |
619 | IconStyle(); | |
620 | ||
621 | @@ -800,7 +719,7 @@ | |
622 | ||
623 | ||
624 | /***************************************************************************** | |
625 | - * | |
626 | + * | |
627 | * Copies a text string from the config file to a specified location | |
628 | * | |
629 | ****************************************************************************/ | |
630 | @@ -809,42 +728,8 @@ | |
631 | *arg = stripcpy(text); | |
632 | } | |
633 | ||
634 | - | |
635 | - | |
636 | - | |
637 | -/**************************************************************************** | |
638 | - * | |
639 | - * Read TitleText Controls | |
640 | - * | |
641 | - ****************************************************************************/ | |
642 | -void SetTitleText(char *tline,FILE *fd, char **junk,int *junk2) | |
643 | -{ | |
644 | - int n; | |
645 | - int ttype, y; | |
646 | - n = sscanf(tline,"%d %d %s %s %s %s %s %s",&ttype,&y,hircolor, | |
647 | - hiscolor, hincolor, lorcolor, loscolor, loncolor); | |
648 | - | |
649 | - if (n != 8) { | |
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); | |
653 | - return; | |
654 | - } | |
655 | - | |
656 | - Scr.TitleTextType=ttype; | |
657 | - Scr.TitleTextY=y; | |
658 | -} | |
659 | - | |
660 | - | |
661 | - | |
662 | - | |
663 | - | |
664 | - | |
665 | - | |
666 | - | |
667 | - | |
668 | /***************************************************************************** | |
669 | - * | |
670 | + * | |
671 | * read the button pixmaps | |
672 | * | |
673 | ****************************************************************************/ | |
674 | @@ -854,7 +739,7 @@ | |
675 | XpmAttributes xpm_attributes; | |
676 | Pixmap mask; | |
677 | ||
678 | - | |
679 | + | |
680 | XGetWindowAttributes(dpy, Scr.Root, &root_attr); | |
681 | xpm_attributes.colormap = root_attr.colormap; | |
682 | xpm_attributes.closeness = 4000; | |
683 | @@ -869,14 +754,14 @@ | |
684 | } | |
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; | |
689 | ||
690 | - if (mask!=None) | |
691 | + if (mask!=None) | |
692 | XFreePixmap(dpy,mask); | |
693 | } | |
694 | ||
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; | |
704 | ||
705 | - if (mask!=None) | |
706 | + if (mask!=None) | |
707 | XFreePixmap(dpy,mask); | |
708 | } | |
709 | } | |
710 | ||
711 | /**************************************************************************** | |
712 | - * | |
713 | + * | |
714 | * Read Titlebar pixmap button | |
715 | * | |
716 | - ****************************************************************************/ | |
717 | + ****************************************************************************/ | |
718 | void SetTitleButton(char *tline,FILE *fd, char **junk,int *junk2) | |
719 | { | |
720 | #ifdef XPM | |
721 | @@ -903,14 +788,14 @@ | |
722 | XpmAttributes xpm_attributes; | |
723 | extern char *PixmapPath; | |
724 | char *path = NULL; | |
725 | + Pixmap mask; | |
726 | int num; | |
727 | char file[256]; | |
728 | - char file2[256]; | |
729 | int n; | |
730 | ||
731 | - n = sscanf(tline,"%d %s %s",&num,file,file2); | |
732 | + n = sscanf(tline,"%d %s",&num,file); | |
733 | ||
734 | - if (n < 2) { | |
735 | + if (n != 2) { | |
736 | printf("wrong number of parameters given with TitleButton\n"); | |
737 | } | |
738 | if (num < 0 || num > 9) { | |
739 | @@ -929,7 +814,7 @@ | |
740 | xpm_attributes.valuemask = XpmSize|XpmReturnPixels|XpmColormap|XpmCloseness; | |
741 | ||
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); | |
747 | free(path); | |
748 | @@ -941,34 +826,8 @@ | |
749 | Scr.button_style[num] = XPM_BUTTON_STYLE; | |
750 | ||
751 | free(path); | |
752 | - | |
753 | - | |
754 | - path = findIconFile(file2,PixmapPath,R_OK); | |
755 | - if(path != NULL) { | |
756 | - Scr.ButtonType=1; /* Rob's Button Mode - Shaped & Bigger, Must Relieve */ | |
757 | - | |
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; | |
762 | - | |
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); | |
767 | - free(path); | |
768 | - return; | |
769 | - } | |
770 | - | |
771 | - Scr.button_width[num] = xpm_attributes.width; | |
772 | - Scr.button_height[num] = xpm_attributes.height; | |
773 | - Scr.button_style[num] = XPM_BUTTON_STYLE; | |
774 | - } | |
775 | - free(path); | |
776 | - | |
777 | - | |
778 | - | |
779 | - | |
780 | + if (mask!=None) | |
781 | + XFreePixmap(dpy,mask); | |
782 | ||
783 | #endif /* XPM */ | |
784 | } | |
785 | @@ -990,8 +849,8 @@ | |
786 | xpm_attributes.valuemask = XpmSize | XpmReturnPixels | XpmColormap | XpmCloseness; | |
787 | ||
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; | |
796 | @@ -1027,9 +886,9 @@ | |
797 | } | |
798 | ||
799 | /*************************************************************** | |
800 | - * | |
801 | + * | |
802 | * Read a XPM Icon Background from file | |
803 | - * | |
804 | + * | |
805 | **************************************************************/ | |
806 | static int GetXPMIconFile(char *file) | |
807 | { | |
808 | @@ -1038,7 +897,7 @@ | |
809 | XpmAttributes xpm_attributes; | |
810 | extern char *PixmapPath; | |
811 | char *path = NULL; | |
812 | - | |
813 | + | |
814 | path = findIconFile(file, PixmapPath,R_OK); | |
815 | if(path == NULL) return False; | |
816 | ||
817 | @@ -1067,9 +926,9 @@ | |
818 | } | |
819 | ||
820 | /******************************************************************* | |
821 | - * | |
822 | + * | |
823 | * Make a gradient pixmap for iconized windows background (aka Buttons) | |
824 | - * | |
825 | + * | |
826 | *******************************************************************/ | |
827 | ||
828 | static int GetXPMGradient(int from[3], int to[3], int maxcols, int type) | |
829 | @@ -1093,7 +952,7 @@ | |
830 | if (!DrawHGradient(dpy, Scr.IconBgPixmap, 0, 0, 64,64, | |
831 | from, to, 0, maxcols, type-TEXTURE_HGRADIENT)) { | |
832 | XFreePixmap(dpy, Scr.IconBgPixmap); | |
833 | - return 0; | |
834 | + return 0; | |
835 | } | |
836 | break; | |
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); | |
842 | - return 0; | |
843 | - } | |
844 | + return 0; | |
845 | + } | |
846 | break; | |
847 | default: | |
848 | return 0; | |
849 | } | |
850 | ||
851 | - DrawOutline(Scr.IconBgPixmap,64,64); | |
852 | + DrawOutline(Scr.IconBgPixmap,64,64); | |
853 | return 1; | |
854 | } | |
855 | ||
856 | /******************************************************************* | |
857 | - * | |
858 | + * | |
859 | * Make a solid color pixmap for iconized windows background (aka Buttons) | |
860 | - * | |
861 | + * | |
862 | *******************************************************************/ | |
863 | ||
864 | static int GetSolidXPM(Pixel pixel) | |
865 | @@ -1141,7 +1000,7 @@ | |
866 | } | |
867 | ||
868 | /***************************************************************************** | |
869 | - * | |
870 | + * | |
871 | * Create pixmap for icon background | |
872 | * | |
873 | ****************************************************************************/ | |
874 | @@ -1155,9 +1014,9 @@ | |
875 | ||
876 | #ifdef XPM | |
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); | |
884 | #endif /* XPM */ | |
885 | ||
886 | @@ -1195,7 +1054,7 @@ | |
887 | } else { | |
888 | BgColor=GetColor("grey"); | |
889 | } | |
890 | - | |
891 | + | |
892 | if (!GetSolidXPM(BgColor)) { | |
893 | afterstep_err("couldn't create Solid Button. Using default.\n",NULL,NULL,NULL); | |
894 | SetBuiltInIconBg(); | |
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); | |
901 | } | |
902 | } | |
903 | ||
904 | /***************************************************************************** | |
905 | - * | |
906 | + * | |
907 | * Changes a cursor def. | |
908 | * | |
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)) | |
913 | { | |
914 | - afterstep_err("Bad cursor in line %s",orig_tline,NULL,NULL); | |
915 | + afterstep_err("Bad cursor in line %s",orig_tline,NULL,NULL); | |
916 | return; | |
917 | } | |
918 | Scr.ASCursors[cursor_num] = XCreateFontCursor(dpy,cursor_style); | |
919 | } | |
920 | ||
921 | /***************************************************************************** | |
922 | - * | |
923 | + * | |
924 | * Sets a boolean flag to true | |
925 | * | |
926 | ****************************************************************************/ | |
927 | @@ -1261,7 +1120,7 @@ | |
928 | } | |
929 | ||
930 | /***************************************************************************** | |
931 | - * | |
932 | + * | |
933 | * Reads in one or two integer values | |
934 | * | |
935 | ****************************************************************************/ | |
936 | @@ -1272,7 +1131,7 @@ | |
937 | ||
938 | ||
939 | /***************************************************************************** | |
940 | - * | |
941 | + * | |
942 | * Reads in a list of mouse button numbers | |
943 | * | |
944 | ****************************************************************************/ | |
945 | @@ -1286,15 +1145,15 @@ | |
946 | if(next == text) break; | |
947 | text = next; | |
948 | if (*text == ',') text++; | |
949 | - if((b > 0) && (b <= MAX_BUTTONS)) | |
950 | + if((b > 0) && (b <= MAX_BUTTONS)) | |
951 | Scr.RaiseButtons |= 1<<b; | |
952 | } | |
953 | Scr.flags |= ClickToRaise; | |
954 | } | |
955 | - | |
956 | + | |
957 | ||
958 | /***************************************************************************** | |
959 | - * | |
960 | + * | |
961 | * Reads Dimensions for an icon box from the config file | |
962 | * | |
963 | ****************************************************************************/ | |
964 | @@ -1332,25 +1191,25 @@ | |
965 | * This routine computes the shadow color from the background color | |
966 | * | |
967 | ****************************************************************************/ | |
968 | -Pixel GetShadow(Pixel background) | |
969 | +Pixel GetShadow(Pixel background) | |
970 | { | |
971 | XColor bg_color; | |
972 | XWindowAttributes attributes; | |
973 | unsigned int r,g,b; | |
974 | - | |
975 | + | |
976 | XGetWindowAttributes(dpy,Scr.Root,&attributes); | |
977 | - | |
978 | + | |
979 | bg_color.pixel = background; | |
980 | XQueryColor(dpy,attributes.colormap,&bg_color); | |
981 | - | |
982 | + | |
983 | r = bg_color.red % 0xffff; | |
984 | g = bg_color.green % 0xffff; | |
985 | b = bg_color.blue % 0xffff; | |
986 | - | |
987 | + | |
988 | r = r >>1; | |
989 | g = g >>1; | |
990 | b = b >>1; | |
991 | - | |
992 | + | |
993 | /* pure black: use gray */ | |
994 | if( r==0 && g== 0 && b==0) | |
995 | r = g = b = 0x7fff; | |
996 | @@ -1363,7 +1222,7 @@ | |
997 | nocolor("alloc shadow",""); | |
998 | bg_color.pixel = background; | |
999 | } | |
1000 | - | |
1001 | + | |
1002 | return bg_color.pixel; | |
1003 | } | |
1004 | ||
1005 | @@ -1372,19 +1231,19 @@ | |
1006 | * This routine computes the hilight color from the background color | |
1007 | * | |
1008 | ****************************************************************************/ | |
1009 | -Pixel GetHilite(Pixel background) | |
1010 | +Pixel GetHilite(Pixel background) | |
1011 | { | |
1012 | XColor bg_color, white_p; | |
1013 | XWindowAttributes attributes; | |
1014 | - | |
1015 | + | |
1016 | XGetWindowAttributes(dpy,Scr.Root,&attributes); | |
1017 | - | |
1018 | + | |
1019 | bg_color.pixel = background; | |
1020 | XQueryColor(dpy,attributes.colormap,&bg_color); | |
1021 | ||
1022 | white_p.pixel = GetColor(white); | |
1023 | XQueryColor(dpy,attributes.colormap,&white_p); | |
1024 | - | |
1025 | + | |
1026 | #ifndef min | |
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); | |
1033 | - | |
1034 | + | |
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 @@ | |
1039 | #ifdef max | |
1040 | #undef max | |
1041 | #endif | |
1042 | - | |
1043 | + | |
1044 | if(!XAllocColor(dpy,attributes.colormap,&bg_color)) | |
1045 | { | |
1046 | nocolor("alloc hilight",""); | |
1047 | @@ -1443,17 +1302,17 @@ | |
1048 | /* black and white - override user choices */ | |
1049 | ||
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 */ | |
1072 | ||
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; | |
1097 | - } else { | |
1098 | + } else { | |
1099 | nofont("fixed: that's bad..."); | |
1100 | exit(1); | |
1101 | } | |
1102 | @@ -1559,20 +1418,20 @@ | |
1103 | } | |
1104 | ||
1105 | /**************************************************************************** | |
1106 | - * | |
1107 | + * | |
1108 | * Prints an error message for font loading | |
1109 | * | |
1110 | - ****************************************************************************/ | |
1111 | + ****************************************************************************/ | |
1112 | void nofont(char *name) | |
1113 | { | |
1114 | afterstep_err("can't get font %s", name,NULL,NULL); | |
1115 | } | |
1116 | ||
1117 | /**************************************************************************** | |
1118 | - * | |
1119 | + * | |
1120 | * Processes a menu body definition | |
1121 | * | |
1122 | - ****************************************************************************/ | |
1123 | + ****************************************************************************/ | |
1124 | MenuRoot *ParseMenuBody(char *name,FILE *fd) | |
1125 | { | |
1126 | MenuRoot *mr; | |
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); | |
1130 | } | |
1131 | - | |
1132 | + | |
1133 | pline = fgets(newline,(sizeof newline)-1,fd); | |
1134 | if(pline == (char *)0)return NULL; | |
1135 | ||
1136 | @@ -1631,10 +1490,10 @@ | |
1137 | } | |
1138 | ||
1139 | /**************************************************************************** | |
1140 | + * | |
1141 | + * Parses a popup definition | |
1142 | * | |
1143 | - * Parses a popup definition | |
1144 | - * | |
1145 | - ****************************************************************************/ | |
1146 | + ****************************************************************************/ | |
1147 | void ParsePopupEntry(char *tline,FILE *fd, char **junk,int *junk2) | |
1148 | { | |
1149 | MenuRoot *mr=0; | |
1150 | @@ -1663,10 +1522,10 @@ | |
1151 | } | |
1152 | ||
1153 | /**************************************************************************** | |
1154 | - * | |
1155 | + * | |
1156 | * Parses a mouse binding | |
1157 | * | |
1158 | - ****************************************************************************/ | |
1159 | + ****************************************************************************/ | |
1160 | void ParseMouseEntry(char *tline,FILE *fd, char **junk,int *junk2) | |
1161 | { | |
1162 | char context[256],modifiers[256],function[256],*ptr; | |
1163 | @@ -1748,7 +1607,7 @@ | |
1164 | (func == F_WARP)||(func == F_MODULE)) | |
1165 | { | |
1166 | mi = (MenuItem *)safemalloc(sizeof(MenuItem)); | |
1167 | - | |
1168 | + | |
1169 | mi->next = (MenuItem *)NULL; | |
1170 | mi->prev = (MenuItem *)NULL; | |
1171 | mi->item_num = 0; | |
1172 | @@ -1770,7 +1629,7 @@ | |
1173 | mi->val1_unit = 1; | |
1174 | mi->val2_unit = 1; | |
1175 | } | |
1176 | - | |
1177 | + | |
1178 | temp = Scr.MouseButtonRoot; | |
1179 | Scr.MouseButtonRoot = (MouseButton *)safemalloc(sizeof(MouseButton)); | |
1180 | Scr.MouseButtonRoot->func = func; | |
1181 | @@ -1802,10 +1661,10 @@ | |
1182 | ||
1183 | ||
1184 | /**************************************************************************** | |
1185 | - * | |
1186 | + * | |
1187 | * Processes a line with a key binding | |
1188 | * | |
1189 | - ****************************************************************************/ | |
1190 | + ****************************************************************************/ | |
1191 | void ParseKeyEntry(char *tline, FILE *fd,char **junk,int *junk2) | |
1192 | { | |
1193 | char context[256],modifiers[256],function[256],*ptr; | |
1194 | @@ -1830,13 +1689,13 @@ | |
1195 | match_string(func_config,function,"bad key function:",fd); | |
1196 | ||
1197 | /* Make CirculateUp and CirculateDown \ 1take args. by Y.NOMURA */ | |
1198 | - | |
1199 | + | |
1200 | if ((func == F_CIRCULATE_UP) || (func == F_CIRCULATE_DOWN)|| | |
1201 | (func == F_WARP)) | |
1202 | ptr = stripcpy3(tline,False); | |
1203 | - | |
1204 | + | |
1205 | /* End of addition */ | |
1206 | - | |
1207 | + | |
1208 | if((func == F_EXEC)||(func == F_RESTART)||(func == F_MODULE)) | |
1209 | { | |
1210 | ptr = stripcpy3(tline,True); | |
1211 | @@ -1865,21 +1724,21 @@ | |
1212 | } | |
1213 | ||
1214 | /**************************************************************************** | |
1215 | - * | |
1216 | + * | |
1217 | * Sets menu/keybinding/mousebinding function to specified value | |
1218 | * | |
1219 | - ****************************************************************************/ | |
1220 | + ****************************************************************************/ | |
1221 | void set_func(char *text, FILE *fd, char **value,int *junk) | |
1222 | { | |
1223 | func = (unsigned long)value; | |
1224 | } | |
1225 | ||
1226 | /**************************************************************************** | |
1227 | - * | |
1228 | - * Turns a string context of context or modifier values into an array of | |
1229 | + * | |
1230 | + * Turns a string context of context or modifier values into an array of | |
1231 | * true/false values (bits) | |
1232 | * | |
1233 | - ****************************************************************************/ | |
1234 | + ****************************************************************************/ | |
1235 | void find_context(char *string, int *output, struct charstring *table) | |
1236 | { | |
1237 | int i=0,j=0; | |
1238 | @@ -1919,11 +1778,11 @@ | |
1239 | } | |
1240 | ||
1241 | /**************************************************************************** | |
1242 | - * | |
1243 | + * | |
1244 | * Matches text from config to a table of strings, calls routine | |
1245 | * indicated in table. | |
1246 | * | |
1247 | - ****************************************************************************/ | |
1248 | + ****************************************************************************/ | |
1249 | void match_string(struct config *table, char *text, char *error_msg, FILE *fd) | |
1250 | { | |
1251 | int j; | |
1252 | @@ -1949,21 +1808,21 @@ | |
1253 | } | |
1254 | } | |
1255 | ||
1256 | - | |
1257 | - | |
1258 | + | |
1259 | + | |
1260 | ||
1261 | /**************************************************************************** | |
1262 | - * | |
1263 | + * | |
1264 | * Generates the window for a menu | |
1265 | * | |
1266 | - ****************************************************************************/ | |
1267 | + ****************************************************************************/ | |
1268 | void MakeMenu(MenuRoot *mr) | |
1269 | { | |
1270 | MenuItem *cur; | |
1271 | unsigned long valuemask; | |
1272 | XSetWindowAttributes attributes; | |
1273 | int y; | |
1274 | - | |
1275 | + | |
1276 | /* lets first size the window accordingly */ | |
1277 | mr->width += 15; | |
1278 | if(mr->width2 > 0) | |
1279 | @@ -1995,7 +1854,7 @@ | |
1280 | mr->in_use = 0; | |
1281 | mr->height = y; | |
1282 | ||
1283 | -#ifndef NO_SAVEUNDERS | |
1284 | +#ifndef NO_SAVEUNDERS | |
1285 | valuemask = (CWBackPixel | CWEventMask | CWCursor | CWSaveUnder); | |
1286 | #else | |
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; | |
1295 | #endif | |
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); | |
1301 | - | |
1302 | + | |
1303 | return; | |
1304 | } | |
1305 | ||
1306 | @@ -2022,23 +1881,23 @@ | |
1307 | * Procedure: | |
1308 | * scanForHotkeys - Look for hotkey markers in a MenuItem | |
1309 | * (pete@tecc.co.uk) | |
1310 | - * | |
1311 | + * | |
1312 | * Inputs: | |
1313 | * it - MenuItem to scan | |
1314 | * which - +1 to look in it->item1 and -1 to look in it->item2. | |
1315 | * | |
1316 | ***********************************************************************/ | |
1317 | ||
1318 | -void scanForHotkeys(MenuItem *it, int which) | |
1319 | +void scanForHotkeys(MenuItem *it, int which) | |
1320 | { | |
1321 | char *start, *txt; | |
1322 | ||
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 */ | |
1327 | - if (*txt == '&') | |
1328 | + if (*txt == '&') | |
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 @@ | |
1336 | } | |
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... */ | |
1343 | } | |
1344 | @@ -2071,7 +1930,7 @@ | |
1345 | * func - the numeric function | |
1346 | * | |
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) | |
1351 | { | |
1352 | MenuItem *tmp; | |
1353 | @@ -2092,7 +1951,7 @@ | |
1354 | tmp->prev = menu->last; | |
1355 | } | |
1356 | menu->last = tmp; | |
1357 | - | |
1358 | + | |
1359 | tmp->item = item; | |
1360 | if (item != (char *)0) | |
1361 | { | |
1362 | @@ -2162,7 +2021,7 @@ | |
1363 | menu->width2 = width; | |
1364 | if((width==0)&&(tmp->strlen2>0)) | |
1365 | menu->width2 = 1; | |
1366 | - | |
1367 | + | |
1368 | tmp->item_num = menu->items++; | |
1369 | } | |
1370 | ||
1371 | @@ -2181,7 +2040,7 @@ | |
1372 | MenuRoot *NewMenuRoot(char *name) | |
1373 | { | |
1374 | MenuRoot *tmp; | |
1375 | - | |
1376 | + | |
1377 | tmp = (MenuRoot *) safemalloc(sizeof(MenuRoot)); | |
1378 | tmp->name = name; | |
1379 | tmp->first = NULL; | |
1380 | @@ -2191,7 +2050,7 @@ | |
1381 | tmp->width2 = 0; | |
1382 | #ifdef ENABLE_TEXTURE | |
1383 | tmp->titlebg = None; | |
1384 | - tmp->itembg = None; | |
1385 | + tmp->itembg = None; | |
1386 | #endif | |
1387 | tmp->w = None; | |
1388 | return (tmp); | |
1389 | @@ -2227,8 +2086,8 @@ | |
1390 | if ((keysym = XStringToKeysym(name)) == NoSymbol || | |
1391 | (keycode = XKeysymToKeycode(dpy, keysym)) == 0) | |
1392 | return; | |
1393 | - | |
1394 | - | |
1395 | + | |
1396 | + | |
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; | |
1402 | else | |
1403 | tmp->val2_unit = Scr.MyDisplayHeight; | |
1404 | - | |
1405 | + | |
1406 | tmp->menu = mr; | |
1407 | } | |
1408 | return; | |
1409 | } | |
1410 | ||
1411 | /**************************************************************************** | |
1412 | - * | |
1413 | + * | |
1414 | * Loads a single color | |
1415 | * | |
1416 | - ****************************************************************************/ | |
1417 | + ****************************************************************************/ | |
1418 | Pixel GetColor(char *name) | |
1419 | { | |
1420 | XColor color; | |
1421 | @@ -2271,11 +2130,11 @@ | |
1422 | ||
1423 | XGetWindowAttributes(dpy,Scr.Root,&attributes); | |
1424 | color.pixel = 0; | |
1425 | - if (!XParseColor (dpy, attributes.colormap, name, &color)) | |
1426 | + if (!XParseColor (dpy, attributes.colormap, name, &color)) | |
1427 | { | |
1428 | nocolor("parse",name); | |
1429 | } | |
1430 | - else if(!XAllocColor (dpy, attributes.colormap, &color)) | |
1431 | + else if(!XAllocColor (dpy, attributes.colormap, &color)) | |
1432 | { | |
1433 | nocolor("alloc",name); | |
1434 | } | |
1435 | @@ -2287,11 +2146,11 @@ | |
1436 | afterstep_err("can't %s color %s", note,name,NULL); | |
1437 | } | |
1438 | /**************************************************************************** | |
1439 | - * | |
1440 | + * | |
1441 | * Copies a string into a new, malloc'ed string | |
1442 | * Strips leading spaces and trailing spaces and new lines | |
1443 | * | |
1444 | - ****************************************************************************/ | |
1445 | + ****************************************************************************/ | |
1446 | char *stripcpy(char *source) | |
1447 | { | |
1448 | char *tmp,*ptr; | |
1449 | @@ -2311,10 +2170,10 @@ | |
1450 | ptr[len]=0; | |
1451 | return ptr; | |
1452 | } | |
1453 | - | |
1454 | + | |
1455 | ||
1456 | /**************************************************************************** | |
1457 | - * | |
1458 | + * | |
1459 | * Copies a string into a new, malloc'ed string | |
1460 | * Strips all data before the first quote and after the second | |
1461 | * | |
1462 | @@ -2337,13 +2196,13 @@ | |
1463 | if(!tab_sensitive) | |
1464 | while((*ptr!='"')&&(*ptr != 0)) | |
1465 | { | |
1466 | - ptr++; | |
1467 | + ptr++; | |
1468 | count++; | |
1469 | } | |
1470 | else if(tab_sensitive==1) | |
1471 | while((*ptr!='"')&&(*ptr != 0)&&(*ptr!='\t')) | |
1472 | { | |
1473 | - ptr++; | |
1474 | + ptr++; | |
1475 | count++; | |
1476 | } | |
1477 | else if(tab_sensitive==2) | |
1478 | @@ -2372,7 +2231,7 @@ | |
1479 | ||
1480 | ||
1481 | /**************************************************************************** | |
1482 | - * | |
1483 | + * | |
1484 | * Copies a string into a new, malloc'ed string | |
1485 | * Strips all data before the second quote. and strips trailing spaces and | |
1486 | * new lines | |
1487 | @@ -2394,7 +2253,7 @@ | |
1488 | source++; | |
1489 | return stripcpy(source); | |
1490 | } | |
1491 | - | |
1492 | + | |
1493 | void bad_binding(int num) | |
1494 | { | |
1495 | afterstep_err("bad binding in line %s",orig_tline,NULL,NULL); | |
1496 | @@ -2413,23 +2272,16 @@ | |
1497 | { | |
1498 | XGCValues gcv; | |
1499 | unsigned long gcm; | |
1500 | - | |
1501 | + | |
1502 | /* create GC's */ | |
1503 | - | |
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); | |
1509 | - | |
1510 | - gcm = GCLineWidth|GCForeground|GCBackground|GCFunction; | |
1511 | + gcm = GCLineWidth|GCForeground|GCBackground|GCFunction; | |
1512 | gcv.function = GXcopy; | |
1513 | gcv.line_width = 1; | |
1514 | gcv.foreground = Scr.StdColors.fore; | |
1515 | gcv.background = Scr.StdColors.back; | |
1516 | Scr.LineGC = XCreateGC(dpy, Scr.Root, gcm, &gcv); | |
1517 | ||
1518 | - gcm = GCFunction|GCLineWidth|GCForeground|GCSubwindowMode; | |
1519 | + gcm = GCFunction|GCLineWidth|GCForeground|GCSubwindowMode; | |
1520 | gcv.function = GXxor; | |
1521 | gcv.line_width = 0; | |
1522 | gcv.foreground = XORvalue; | |
1523 | @@ -2441,33 +2293,6 @@ | |
1524 | gcv.line_width = 0; | |
1525 | gcv.function = GXcopy; | |
1526 | gcv.plane_mask = AllPlanes; | |
1527 | - | |
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); | |
1532 | - | |
1533 | - gcv.foreground = GetColor(hiscolor); | |
1534 | - gcv.font = Scr.WindowFont.font->fid; | |
1535 | - Scr.HiFontShadowGC= XCreateGC(dpy, Scr.Root, gcm, &gcv); | |
1536 | - | |
1537 | - gcv.foreground = GetColor(hincolor); | |
1538 | - gcv.font = Scr.WindowFont.font->fid; | |
1539 | - Scr.HiFontGC= XCreateGC(dpy, Scr.Root, gcm, &gcv); | |
1540 | - | |
1541 | - gcv.foreground = GetColor(lorcolor); | |
1542 | - gcv.font = Scr.WindowFont.font->fid; | |
1543 | - Scr.LoFontReliefGC= XCreateGC(dpy, Scr.Root, gcm, &gcv); | |
1544 | - | |
1545 | - gcv.foreground = GetColor(loscolor); | |
1546 | - gcv.font = Scr.WindowFont.font->fid; | |
1547 | - Scr.LoFontShadowGC= XCreateGC(dpy, Scr.Root, gcm, &gcv); | |
1548 | - | |
1549 | - gcv.foreground = GetColor(loncolor); | |
1550 | - gcv.font = Scr.WindowFont.font->fid; | |
1551 | - Scr.LoFontGC= XCreateGC(dpy, Scr.Root, gcm, &gcv); | |
1552 | - } | |
1553 | - | |
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). | |
1559 | */ | |
1560 | gcv.graphics_exposures = False; | |
1561 | - | |
1562 | + | |
1563 | Scr.NormalGC = XCreateGC(dpy, Scr.Root, gcm, &gcv); | |
1564 | ||
1565 | - | |
1566 | + | |
1567 | /* GC for pager labels */ | |
1568 | Scr.FontGC = XCreateGC(dpy, Scr.Root, gcm, &gcv); | |
1569 | ||
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); | |
1576 | ||
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); | |
1581 | ||
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); | |
1588 | - | |
1589 | + | |
1590 | gcm=GCFunction|GCPlaneMask|GCGraphicsExposures|GCLineWidth|GCForeground| | |
1591 | GCBackground|GCFont; | |
1592 | gcv.fill_style = FillSolid; | |
1593 | @@ -2536,24 +2361,24 @@ | |
1594 | } | |
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); | |
1599 | ||
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); | |
1604 | ||
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); | |
1609 | ||
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); | |
1615 | ||
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); | |
1620 | ||
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); | |
1627 | - | |
1628 | } | |
1629 | ||
1630 | /*********************************************************************** | |
1631 | @@ -2571,7 +2395,7 @@ | |
1632 | * SetOneStyle - add a window name to the no title list | |
1633 | * | |
1634 | * Inputs: | |
1635 | - * name - a pointer to the name of the window | |
1636 | + * name - a pointer to the name of the window | |
1637 | * | |
1638 | ***********************************************************************/ | |
1639 | #ifndef PRUNE | |
1640 | @@ -2613,8 +2437,8 @@ | |
1641 | free (p); | |
1642 | } | |
1643 | AddToList(name,icon_name,new_flags,0,desknumber,0,0,NULL,NULL,0,0); | |
1644 | -} | |
1645 | -#endif | |
1646 | +} | |
1647 | +#endif | |
1648 | ||
1649 | #ifdef M4 | |
1650 | ||
1651 | @@ -2646,11 +2470,11 @@ | |
1652 | static char *cp = NULL; | |
1653 | static int maxsize = 0; | |
1654 | int n; | |
1655 | - | |
1656 | + | |
1657 | /* The char * storage only lasts for 1 call... */ | |
1658 | ||
1659 | /* Get space to hold everything, if needed */ | |
1660 | - | |
1661 | + | |
1662 | n = EXTRA + strlen(name) + strlen(def); | |
1663 | if (n > maxsize) { | |
1664 | maxsize = n; | |
1665 | @@ -2674,7 +2498,7 @@ | |
1666 | } | |
1667 | else | |
1668 | strcpy(cp, "define("); | |
1669 | - | |
1670 | + | |
1671 | strcat(cp, name); | |
1672 | ||
1673 | /* Tack on "," and 2 sets of starting quotes */ | |
1674 | @@ -2697,14 +2521,14 @@ | |
1675 | } | |
1676 | ||
1677 | strcat(cp, "dnl\n"); | |
1678 | - | |
1679 | + | |
1680 | return(cp); | |
1681 | } | |
1682 | ||
1683 | static char *MkNum(char *name,int def) | |
1684 | { | |
1685 | char num[20]; | |
1686 | - | |
1687 | + | |
1688 | sprintf(num, "%d", def); | |
1689 | return(MkDef(name, num)); | |
1690 | } | |
1691 | @@ -2731,7 +2555,7 @@ | |
1692 | } | |
1693 | strcat(tmp_name, "/steprcXXXXX"); | |
1694 | mktemp(tmp_name); | |
1695 | - | |
1696 | + | |
1697 | if (*tmp_name == '\0') | |
1698 | { | |
1699 | perror("mktemp failed in m4_defs"); | |
1700 | @@ -2753,7 +2577,7 @@ | |
1701 | perror("Cannot open pipe to m4"); | |
1702 | exit(0377); | |
1703 | } | |
1704 | - | |
1705 | + | |
1706 | mygethostname(client,MAXHOSTNAME); | |
1707 | ||
1708 | mygetostype (ostype, sizeof ostype); | |
1709 | @@ -2775,7 +2599,7 @@ | |
1710 | /* TWM_TYPE is afterstep, for completeness */ | |
1711 | ||
1712 | fputs(MkDef("TWM_TYPE", "afterstep"), tmpf); | |
1713 | - | |
1714 | + | |
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 @@ | |
1719 | ||
1720 | fputs(MkNum("BITS_PER_RGB", visual->bits_per_rgb), tmpf); | |
1721 | ||
1722 | - switch(visual->class) | |
1723 | + switch(visual->class) | |
1724 | { | |
1725 | case(StaticGray): | |
1726 | vc = "StaticGray"; | |
1727 | @@ -2830,11 +2654,11 @@ | |
1728 | vc = "NonStandard"; | |
1729 | break; | |
1730 | } | |
1731 | - | |
1732 | + | |
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); | |
1737 | - else | |
1738 | + else | |
1739 | fputs(MkDef("COLOR", "No"), tmpf); | |
1740 | fputs(MkDef("AFTER_VERSION", VERSION), tmpf); | |
1741 | ||
1742 | @@ -2867,18 +2691,18 @@ | |
1743 | fputs(MkDef("OPTIONS", options), tmpf); | |
1744 | ||
1745 | fputs(MkDef("AFTERDIR", AFTERDIR), tmpf); | |
1746 | - | |
1747 | + | |
1748 | /* | |
1749 | * At this point, we've sent the definitions to m4. Just include | |
1750 | * the steprc file now. | |
1751 | */ | |
1752 | - | |
1753 | + | |
1754 | fprintf(tmpf, "%sinclude(%s%s%s)\n", | |
1755 | (m4_prefix) ? "m4_": "", | |
1756 | m4_startquote, | |
1757 | config_file, | |
1758 | m4_endquote); | |
1759 | - | |
1760 | + | |
1761 | pclose(tmpf); | |
1762 | return(tmp_name); | |
1763 | } | |
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 | |
1767 | @@ -221,8 +221,8 @@ | |
1768 | char *text=NULL; | |
1769 | ||
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 @@ | |
1779 | cnt = i; | |
1780 | } | |
1781 | } | |
1782 | - | |
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); */ | |
1787 | } | |
1788 | } | |
1789 | } | |
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 | |
1793 | @@ -46,8 +46,6 @@ | |
1794 | ***********************************************************************/ | |
1795 | #include "../configure.h" | |
1796 | ||
1797 | - | |
1798 | - | |
1799 | #include <stdio.h> | |
1800 | #include <signal.h> | |
1801 | #include <string.h> | |
1802 | @@ -56,8 +54,6 @@ | |
1803 | #include <sys/types.h> | |
1804 | #include <sys/time.h> | |
1805 | ||
1806 | - | |
1807 | - | |
1808 | #include "afterstep.h" | |
1809 | #include "menus.h" | |
1810 | #include "misc.h" | |
1811 | @@ -67,11 +63,6 @@ | |
1812 | #include "stepgfx.h" | |
1813 | #endif | |
1814 | ||
1815 | - | |
1816 | -#ifdef SHAPE | |
1817 | -#include <X11/extensions/shape.h> | |
1818 | -#endif /* SHAPE */ | |
1819 | - | |
1820 | short menu_on=0; | |
1821 | Bool IgnoreRelease = 1; | |
1822 | int BottomOfPage=0; | |
1823 | @@ -187,17 +178,6 @@ | |
1824 | menu->titlebg = None; | |
1825 | } | |
1826 | break; | |
1827 | - case 128: | |
1828 | - XCopyArea(dpy, Scr.MenuTitle, menu->titlebg, Scr.NormalGC, 0, 0, menu->width-2, menu->first->y_height-2, 0,0); | |
1829 | - break; | |
1830 | - case 129: | |
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); | |
1836 | - break; | |
1837 | - | |
1838 | default: | |
1839 | XFreePixmap(dpy, menu->titlebg); | |
1840 | menu->titlebg = None; | |
1841 | @@ -206,10 +186,6 @@ | |
1842 | Textures.Mtype=0; | |
1843 | } | |
1844 | } | |
1845 | - if(Textures.Mtype==128) | |
1846 | - XSetWindowBackgroundPixmap(dpy, menu->w, Scr.MenuTitle); | |
1847 | - | |
1848 | - | |
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; | |
1854 | } | |
1855 | break; | |
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; } | |
1861 | - break; | |
1862 | default: | |
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); | |
1869 | - | |
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, | |
1874 | y_offset+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); | |
1882 | text_y += 4; | |
1883 | } | |
1884 | else | |
1885 | @@ -375,15 +340,14 @@ | |
1886 | else { | |
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); | |
1893 | } else | |
1894 | #endif | |
1895 | XClearArea(dpy, mr->w, 0,y_offset,mr->width,y_height,0); | |
1896 | } | |
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, | |
1903 | @@ -394,8 +358,8 @@ | |
1904 | /* end hack */ | |
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, | |
1909 | + | |
1910 | + XDrawLine( dpy, mr->w, Scr.LineGC, 0, y_height+y_offset-1, | |
1911 | mr->width, y_height+y_offset-1); | |
1912 | } | |
1913 | #else | |
1914 | @@ -408,8 +372,8 @@ | |
1915 | */ | |
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, | |
1920 | + | |
1921 | + XDrawLine( dpy, mr->w, Scr.LineGC, 0, y_height+y_offset-1, | |
1922 | mr->width, y_height+y_offset-1); | |
1923 | /* | |
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); | |
1932 | - else | |
1933 | - XDrawLine( dpy, mr->w, Scr.MenuStippleGC, 0, y_offset-1, 1600, y_offset-1); | |
1934 | - } | |
1935 | + if (y_offset > 30) | |
1936 | + XDrawLine( dpy, mr->w, Scr.LineGC, 0, y_offset-1, 1600, y_offset-1); | |
1937 | + else | |
1938 | + XDrawLine( dpy, mr->w, Scr.MenuStippleGC, 0, y_offset-1, 1600, y_offset-1); | |
1939 | return; | |
1940 | } | |
1941 | ||
1942 | @@ -494,15 +456,13 @@ | |
1943 | void DrawTrianglePattern(Window w,GC GC1,GC GC2,GC GC3,int l,int u,int r,int b) | |
1944 | { | |
1945 | int m; | |
1946 | - if(Scr.MenuArrow==None) { | |
1947 | - m = (u + b)/2; | |
1948 | ||
1949 | - XDrawLine(dpy,w,GC1,l,u,l,b); | |
1950 | + m = (u + b)/2; | |
1951 | ||
1952 | - XDrawLine(dpy,w,GC2,l,b,r,m); | |
1953 | - XDrawLine(dpy,w,GC3,r,m,l,u); | |
1954 | - } | |
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); | |
1957 | + | |
1958 | + XDrawLine(dpy,w,GC2,l,b,r,m); | |
1959 | + XDrawLine(dpy,w,GC3,r,m,l,u); | |
1960 | } | |
1961 | ||
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 | |
1966 | @@ -305,7 +305,6 @@ | |
1967 | void ButtonStyle(); | |
1968 | void IconStyle(); | |
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 | |
1977 | @@ -157,7 +157,6 @@ | |
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 */ | |
1981 | - GC MaskGC; | |
1982 | GC HiReliefGC; /* GC for highlighted window relief */ | |
1983 | GC HiShadowGC; /* GC for highlighted window shadow */ | |
1984 | GC BevelReliefGC; | |
1985 | @@ -175,15 +174,6 @@ | |
1986 | GC StickyShadowGC; /* GC for unselected sticky window shadow */ | |
1987 | GC FontGC; /* GC for non-standard fonts */ | |
1988 | ||
1989 | - GC HiFontReliefGC; | |
1990 | - GC HiFontShadowGC; | |
1991 | - GC HiFontGC; | |
1992 | - GC LoFontGC; | |
1993 | - GC LoFontShadowGC; | |
1994 | - GC LoFontReliefGC; | |
1995 | - int TitleTextType; | |
1996 | - int TitleTextY; | |
1997 | - | |
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 */ | |
2005 | - Pixmap MenuTitle; | |
2006 | - Pixmap MenuTitleMask; | |
2007 | - Pixmap MenuArrow; | |
2008 | - Pixmap MenuArrowMask; | |
2009 | - Pixmap MenuItem; | |
2010 | Pixmap TitleGradient; /* gradient for the focused title text */ | |
2011 | #endif | |
2012 | long next_focus_sequence; /* keep track of previously focused windows */ | |
2013 | @@ -241,12 +226,8 @@ | |
2014 | MenuRoot *InitFunction; | |
2015 | MenuRoot *RestartFunction; | |
2016 | ||
2017 | - int ButtonType; | |
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]; | |
2025 |