Ver código fonte

Use bgcol as window background pixel; fixed issue #89

master
Bert Münnich 12 anos atrás
pai
commit
593da23cf3
2 arquivos alterados com 7 adições e 2 exclusões
  1. +1
    -1
      Makefile
  2. +6
    -1
      window.c

+ 1
- 1
Makefile Ver arquivo

@@ -1,4 +1,4 @@
VERSION = git-20130406 VERSION = git-20130414


PREFIX = /usr/local PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man MANPREFIX = $(PREFIX)/share/man


+ 6
- 1
window.c Ver arquivo

@@ -165,6 +165,8 @@ void win_open(win_t *win)
{ {
win_env_t *e; win_env_t *e;
XClassHint classhint; XClassHint classhint;
XSetWindowAttributes attr;
unsigned long attr_mask;
XColor col; XColor col;
char none_data[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; char none_data[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
Pixmap none; Pixmap none;
@@ -211,9 +213,12 @@ void win_open(win_t *win)
win->y = (e->scrh - win->h) / 2; win->y = (e->scrh - win->h) / 2;
} }


attr.background_pixel = win->bgcol;
attr_mask = CWBackPixel;

win->xwin = XCreateWindow(e->dpy, RootWindow(e->dpy, e->scr), win->xwin = XCreateWindow(e->dpy, RootWindow(e->dpy, e->scr),
win->x, win->y, win->w, win->h, 0, win->x, win->y, win->w, win->h, 0,
e->depth, InputOutput, e->vis, 0, None); e->depth, InputOutput, e->vis, attr_mask, &attr);
if (win->xwin == None) if (win->xwin == None)
die("could not create window"); die("could not create window");


||||||
x
 
000:0
Carregando…
Cancelar
Salvar