mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 12:58:08 +01:00
Draw window borders with correct colormap.
Using window-supplied depth, visual and colormap information has the side effect of causing window borders to be draw using inconsistent colormap entries. Allocate entries from each window's colormap when drawing its border. Force setting the border when the window is first created so it's guaranteed to be drawn in a consistent state.
This commit is contained in:
committed by
Carlos R. Mafra
parent
9ab2b642a6
commit
b796928504
@@ -1863,7 +1863,10 @@ void wSelectWindow(WWindow *wwin, Bool flag)
|
||||
|
||||
if (flag) {
|
||||
wwin->flags.selected = 1;
|
||||
XSetWindowBorder(dpy, wwin->frame->core->window, scr->white_pixel);
|
||||
if (wwin->frame->selected_border_pixel)
|
||||
XSetWindowBorder(dpy, wwin->frame->core->window, *wwin->frame->selected_border_pixel);
|
||||
else
|
||||
XSetWindowBorder(dpy, wwin->frame->core->window, scr->white_pixel);
|
||||
|
||||
if (!HAS_BORDER(wwin)) {
|
||||
XSetWindowBorderWidth(dpy, wwin->frame->core->window, FRAME_BORDER_WIDTH);
|
||||
@@ -1874,7 +1877,10 @@ void wSelectWindow(WWindow *wwin, Bool flag)
|
||||
WMAddToArray(scr->selected_windows, wwin);
|
||||
} else {
|
||||
wwin->flags.selected = 0;
|
||||
XSetWindowBorder(dpy, wwin->frame->core->window, scr->frame_border_pixel);
|
||||
if (wwin->frame->border_pixel)
|
||||
XSetWindowBorder(dpy, wwin->frame->core->window, *wwin->frame->border_pixel);
|
||||
else
|
||||
XSetWindowBorder(dpy, wwin->frame->core->window, scr->frame_border_pixel);
|
||||
|
||||
if (!HAS_BORDER(wwin)) {
|
||||
XSetWindowBorderWidth(dpy, wwin->frame->core->window, 0);
|
||||
|
||||
Reference in New Issue
Block a user