summaryrefslogtreecommitdiffstats
path: root/drw.h
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2020-06-22 00:55:33 -0400
committerMalfurious <m@lfurio.us>2024-03-05 20:21:09 -0500
commit1533625373f1404709b8562d008008adc5d007c8 (patch)
tree07f1d51f3e9d8190a512c2bca9bea5748bb1681d /drw.h
parent48b85889b34d4b7198e305e36a0f6abac2444e61 (diff)
downloaddwm-1533625373f1404709b8562d008008adc5d007c8.tar.gz
dwm-1533625373f1404709b8562d008008adc5d007c8.zip
patch: alpha
Allow dwm to have translucent bars, while keeping all the text on it opaque, just like the alpha-patch for st. Fix transparent borders ----------------------- By default dwm might make windows' borders transparent when using composit window manager (e.g. xcompmgr, picom). Alpha patch allows to make borders opaque. If all you want is to make borders opaque, you don't care about statusbar opacity and/or have problems applying alpha patch, then you might use fixborders patch instead.
Diffstat (limited to 'drw.h')
-rw-r--r--drw.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/drw.h b/drw.h
index 6471431..94b8bbd 100644
--- a/drw.h
+++ b/drw.h
@@ -20,6 +20,9 @@ typedef struct {
Display *dpy;
int screen;
Window root;
+ Visual *visual;
+ unsigned int depth;
+ Colormap cmap;
Drawable drawable;
GC gc;
Clr *scheme;
@@ -27,7 +30,7 @@ typedef struct {
} Drw;
/* Drawable abstraction */
-Drw *drw_create(Display *dpy, int screen, Window win, unsigned int w, unsigned int h);
+Drw *drw_create(Display *dpy, int screen, Window win, unsigned int w, unsigned int h, Visual *visual, unsigned int depth, Colormap cmap);
void drw_resize(Drw *drw, unsigned int w, unsigned int h);
void drw_free(Drw *drw);
@@ -39,8 +42,8 @@ unsigned int drw_fontset_getwidth_clamp(Drw *drw, const char *text, unsigned int
void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h);
/* Colorscheme abstraction */
-void drw_clr_create(Drw *drw, Clr *dest, const char *clrname);
-Clr *drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount);
+void drw_clr_create(Drw *drw, Clr *dest, const char *clrname, unsigned int alpha);
+Clr *drw_scm_create(Drw *drw, const char *clrnames[], const unsigned int alphas[], size_t clrcount);
/* Cursor abstraction */
Cur *drw_cur_create(Drw *drw, int shape);