1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 12:58:08 +01:00

- More cleanups for obsoleted xxx_gc's and xxx_pixel's in WScreen

This commit is contained in:
dan
2002-10-18 04:04:41 +00:00
parent 5230a57599
commit 7be0a97998
4 changed files with 8 additions and 19 deletions

View File

@@ -2999,8 +2999,6 @@ setClipTitleColor(WScreen *scr, WDefaultEntry *entry, XColor *color, long index)
scr->clip_title_color[index] = WMCreateRGBColor(scr->wmscreen, color->red,
color->green, color->blue,
True);
wFreeColor(scr, color->pixel);
#ifdef GRADIENT_CLIP_ARROW
if (index == CLIP_NORMAL) {
RImage *image;
@@ -3024,6 +3022,8 @@ setClipTitleColor(WScreen *scr, WDefaultEntry *entry, XColor *color, long index)
}
#endif /* GRADIENT_CLIP_ARROW */
wFreeColor(scr, color->pixel);
return REFRESH_ICON_TITLE_COLOR;
}
@@ -3038,9 +3038,6 @@ setWTitleColor(WScreen *scr, WDefaultEntry *entry, XColor *color, long index)
WMCreateRGBColor(scr->wmscreen, color->red, color->green, color->blue,
True);
if (index == WS_UNFOCUSED)
XSetForeground(dpy, scr->info_text_gc, color->pixel);
wFreeColor(scr, color->pixel);
return REFRESH_WINDOW_TITLE_COLOR;

View File

@@ -352,7 +352,7 @@ paintClipButtons(WAppIcon *clipIcon, Bool lpushed, Bool rpushed)
int pt = CLIP_BUTTON_SIZE*ICON_SIZE/64;
int tp = ICON_SIZE - pt;
int as = pt - 15; /* 15 = 5+5+5 */
GC gc = scr->clip_title_gc;
GC gc = scr->draw_gc; /* maybe use WMColorGC() instead here? */
WMColor *color;
#ifdef GRADIENT_CLIP_ARROW
Bool collapsed = clipIcon->dock->collapsed;

View File

@@ -351,22 +351,14 @@ allocGCs(WScreen *scr)
scr->copy_gc = XCreateGC(dpy, scr->w_win, GCForeground|GCBackground
|GCGraphicsExposures, &gcv);
/* clip title GC */
scr->clip_title_gc = XCreateGC(dpy, scr->w_win, GCGraphicsExposures, &gcv);
/* move/size display GC */
gcv.graphics_exposures = False;
gcm = GCGraphicsExposures;
scr->info_text_gc = XCreateGC(dpy, scr->w_win, gcm, &gcv);
/* misc drawing GC */
gcv.graphics_exposures = False;
gcm = GCGraphicsExposures;
scr->draw_gc = XCreateGC(dpy, scr->w_win, gcm, &gcv);
assert (scr->stipple_bitmap!=None);
/* mono GC */
scr->mono_gc = XCreateGC(dpy, scr->stipple_bitmap, gcm, &gcv);
}

View File

@@ -145,9 +145,9 @@ typedef struct _WScreen {
WMColor *gray;
WMColor *darkGray;
/* shortcuts for the pixels of the above colors. just for convenience */
WMPixel black_pixel;
WMPixel white_pixel;
WMPixel light_pixel;
WMPixel dark_pixel;
@@ -171,6 +171,7 @@ typedef struct _WScreen {
WMColor *clip_title_color[2]; /* clip title text */
WMColor *mtext_color; /* menu item text */
WMColor *dtext_color; /* disabled menu item text */
WMPixel line_pixel;
WMPixel frame_border_pixel; /* frame border */
@@ -191,8 +192,7 @@ typedef struct _WScreen {
WMColor *icon_title_color; /* icon title color */
GC clip_title_gc; /* clip title */
GC info_text_gc; /* for size/position display */
GC icon_select_gc;
GC frame_gc; /* gc for resize/move frame (root) */