mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 22:28:02 +01:00
Make window border colours configurable.
Use the new preferences FrameBorderColor and FrameSelectedBorderColor to set the border colour of frame windows and selected frame windows respectively.
This commit is contained in:
committed by
Carlos R. Mafra
parent
c3a2438fac
commit
dee30d06ac
@@ -104,8 +104,6 @@ WFrameWindow *wFrameWindowCreate(WScreen * scr, int wlevel, int x, int y,
|
||||
fwin->depth = depth;
|
||||
fwin->visual = visual;
|
||||
fwin->colormap = colormap;
|
||||
allocFrameBorderPixel(fwin->colormap, FRAME_BORDER_COLOR, &fwin->border_pixel);
|
||||
allocFrameBorderPixel(fwin->colormap, FRAME_SELECTED_BORDER_COLOR, &fwin->selected_border_pixel);
|
||||
|
||||
fwin->core = wCoreCreateTopLevel(scr, x, y, width, height, (flags & WFF_BORDER)
|
||||
? FRAME_BORDER_WIDTH : 0, fwin->depth, fwin->visual, fwin->colormap, scr->frame_border_pixel);
|
||||
@@ -415,8 +413,17 @@ void wFrameWindowUpdateBorders(WFrameWindow * fwin, int flags)
|
||||
|
||||
checkTitleSize(fwin);
|
||||
|
||||
if (fwin->border_pixel)
|
||||
XSetWindowBorder(dpy, fwin->core->window, *fwin->border_pixel);
|
||||
allocFrameBorderPixel(fwin->colormap, WMGetColorRGBDescription(scr->frame_border_color), &fwin->border_pixel);
|
||||
allocFrameBorderPixel(fwin->colormap, WMGetColorRGBDescription(scr->frame_selected_border_color), &fwin->selected_border_pixel);
|
||||
|
||||
if (flags & WFF_SELECTED) {
|
||||
if (fwin->selected_border_pixel)
|
||||
XSetWindowBorder(dpy, fwin->core->window, *fwin->selected_border_pixel);
|
||||
}
|
||||
else {
|
||||
if (fwin->border_pixel)
|
||||
XSetWindowBorder(dpy, fwin->core->window, *fwin->border_pixel);
|
||||
}
|
||||
}
|
||||
|
||||
void wFrameWindowDestroy(WFrameWindow * fwin)
|
||||
|
||||
Reference in New Issue
Block a user