diff options
author | Thorsten Wißmann <edu@thorsten-wissmann.de> | 2012-08-10 12:08:10 +0200 |
---|---|---|
committer | Thorsten Wißmann <edu@thorsten-wissmann.de> | 2012-08-10 12:15:32 +0200 |
commit | 6c6c57ba324aede10b83b0d3e35d360abe56d43b (patch) | |
tree | 3dc6cb63f749048bd7f302cc3479c81a7a8b3806 /src/utils.c | |
parent | a19bb0d4ea5e91c5d3f55e21c928a01e957b50a1 (diff) |
Draw double border with depth of window
Do not draw the double border pixmap with the default depth but with the
depth of the specific window. This fixes this error for rxvt-unicode
windows with a different depth, e.g.:
Diffstat (limited to 'src/utils.c')
-rw-r--r-- | src/utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils.c b/src/utils.c index ad2df425..f8bf3f42 100644 --- a/src/utils.c +++ b/src/utils.c @@ -336,7 +336,7 @@ void set_window_double_border(Display *dpy, Window win, int ibw, int width = wa.width; int height = wa.height; - unsigned int depth = DefaultDepth(dpy, DefaultScreen(dpy)); + unsigned int depth = wa.depth; int full_width = width + 2 * bw; int full_height = height + 2 * bw; @@ -367,7 +367,7 @@ void set_window_double_border(Display *dpy, Window win, int ibw, { full_width - ibw, full_height - ibw, ibw, ibw } }; - Pixmap pix = XCreatePixmap(dpy, g_root, full_width, full_height, depth); + Pixmap pix = XCreatePixmap(dpy, win, full_width, full_height, depth); GC gc = XCreateGC(dpy, pix, 0, NULL); /* outer border */ |