mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 13:28:05 +01:00
- More cleanups for obsoleted xxx_gc's and xxx_pixel's in WScreen
This commit is contained in:
@@ -2999,8 +2999,6 @@ setClipTitleColor(WScreen *scr, WDefaultEntry *entry, XColor *color, long index)
|
|||||||
scr->clip_title_color[index] = WMCreateRGBColor(scr->wmscreen, color->red,
|
scr->clip_title_color[index] = WMCreateRGBColor(scr->wmscreen, color->red,
|
||||||
color->green, color->blue,
|
color->green, color->blue,
|
||||||
True);
|
True);
|
||||||
wFreeColor(scr, color->pixel);
|
|
||||||
|
|
||||||
#ifdef GRADIENT_CLIP_ARROW
|
#ifdef GRADIENT_CLIP_ARROW
|
||||||
if (index == CLIP_NORMAL) {
|
if (index == CLIP_NORMAL) {
|
||||||
RImage *image;
|
RImage *image;
|
||||||
@@ -3024,6 +3022,8 @@ setClipTitleColor(WScreen *scr, WDefaultEntry *entry, XColor *color, long index)
|
|||||||
}
|
}
|
||||||
#endif /* GRADIENT_CLIP_ARROW */
|
#endif /* GRADIENT_CLIP_ARROW */
|
||||||
|
|
||||||
|
wFreeColor(scr, color->pixel);
|
||||||
|
|
||||||
return REFRESH_ICON_TITLE_COLOR;
|
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,
|
WMCreateRGBColor(scr->wmscreen, color->red, color->green, color->blue,
|
||||||
True);
|
True);
|
||||||
|
|
||||||
if (index == WS_UNFOCUSED)
|
|
||||||
XSetForeground(dpy, scr->info_text_gc, color->pixel);
|
|
||||||
|
|
||||||
wFreeColor(scr, color->pixel);
|
wFreeColor(scr, color->pixel);
|
||||||
|
|
||||||
return REFRESH_WINDOW_TITLE_COLOR;
|
return REFRESH_WINDOW_TITLE_COLOR;
|
||||||
|
|||||||
@@ -352,7 +352,7 @@ paintClipButtons(WAppIcon *clipIcon, Bool lpushed, Bool rpushed)
|
|||||||
int pt = CLIP_BUTTON_SIZE*ICON_SIZE/64;
|
int pt = CLIP_BUTTON_SIZE*ICON_SIZE/64;
|
||||||
int tp = ICON_SIZE - pt;
|
int tp = ICON_SIZE - pt;
|
||||||
int as = pt - 15; /* 15 = 5+5+5 */
|
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;
|
WMColor *color;
|
||||||
#ifdef GRADIENT_CLIP_ARROW
|
#ifdef GRADIENT_CLIP_ARROW
|
||||||
Bool collapsed = clipIcon->dock->collapsed;
|
Bool collapsed = clipIcon->dock->collapsed;
|
||||||
|
|||||||
@@ -351,14 +351,6 @@ allocGCs(WScreen *scr)
|
|||||||
scr->copy_gc = XCreateGC(dpy, scr->w_win, GCForeground|GCBackground
|
scr->copy_gc = XCreateGC(dpy, scr->w_win, GCForeground|GCBackground
|
||||||
|GCGraphicsExposures, &gcv);
|
|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 */
|
/* misc drawing GC */
|
||||||
gcv.graphics_exposures = False;
|
gcv.graphics_exposures = False;
|
||||||
gcm = GCGraphicsExposures;
|
gcm = GCGraphicsExposures;
|
||||||
|
|||||||
@@ -145,9 +145,9 @@ typedef struct _WScreen {
|
|||||||
WMColor *gray;
|
WMColor *gray;
|
||||||
WMColor *darkGray;
|
WMColor *darkGray;
|
||||||
|
|
||||||
|
/* shortcuts for the pixels of the above colors. just for convenience */
|
||||||
WMPixel black_pixel;
|
WMPixel black_pixel;
|
||||||
WMPixel white_pixel;
|
WMPixel white_pixel;
|
||||||
|
|
||||||
WMPixel light_pixel;
|
WMPixel light_pixel;
|
||||||
WMPixel dark_pixel;
|
WMPixel dark_pixel;
|
||||||
|
|
||||||
@@ -171,6 +171,7 @@ typedef struct _WScreen {
|
|||||||
WMColor *clip_title_color[2]; /* clip title text */
|
WMColor *clip_title_color[2]; /* clip title text */
|
||||||
WMColor *mtext_color; /* menu item text */
|
WMColor *mtext_color; /* menu item text */
|
||||||
WMColor *dtext_color; /* disabled menu item text */
|
WMColor *dtext_color; /* disabled menu item text */
|
||||||
|
|
||||||
WMPixel line_pixel;
|
WMPixel line_pixel;
|
||||||
WMPixel frame_border_pixel; /* frame border */
|
WMPixel frame_border_pixel; /* frame border */
|
||||||
|
|
||||||
@@ -191,8 +192,7 @@ typedef struct _WScreen {
|
|||||||
|
|
||||||
|
|
||||||
WMColor *icon_title_color; /* icon title color */
|
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 icon_select_gc;
|
||||||
|
|
||||||
GC frame_gc; /* gc for resize/move frame (root) */
|
GC frame_gc; /* gc for resize/move frame (root) */
|
||||||
|
|||||||
Reference in New Issue
Block a user