aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Stevens <nilix@nilfm.cc>2021-11-16 21:25:43 -0700
committerDerek Stevens <nilix@nilfm.cc>2021-11-16 21:25:43 -0700
commit4d0f0f62daafdba27a5de4c58c925463a2eeede5 (patch)
treeff04bde640034338b65ccbfab7e3172317f4a895
parent30a50ad90eaed4080d96b822bf0d67bff6a1137a (diff)
make OPACITY and TRANSPARENTLIST optional (must be used together), bump version to 1.2.0v1.2.0
-rw-r--r--client.c2
-rw-r--r--config.def.h5
-rw-r--r--event.c2
-rw-r--r--main.c2
4 files changed, 8 insertions, 3 deletions
diff --git a/client.c b/client.c
index 2ee2da3..89c4443 100644
--- a/client.c
+++ b/client.c
@@ -365,6 +365,7 @@ int isterminalwindow(Client* c) {
return 0;
}
+#if defined(OPACITY) && defined(TRANSPARENTLIST)
int istransparent(Client* c) {
static char* transnames[] = TRANSPARENTLIST;
char** t = transnames;
@@ -377,6 +378,7 @@ int istransparent(Client* c) {
}
return 0;
}
+#endif
void ensureactive() {
if (!current)
diff --git a/config.def.h b/config.def.h
index 2ce4caa..e57efa9 100644
--- a/config.def.h
+++ b/config.def.h
@@ -3,7 +3,8 @@
**********************/
/***************
- * LOOK & FEEL * [All of these are required options]
+ * LOOK & FEEL * [All of these are required options except OPACITY and
+ *TRANSPARENTLIST]
**************/
/* Border colors */
@@ -38,7 +39,7 @@
#define SMENUBGCOL 0x1F9B92
/* You must use a compositor (eg xcompmgr, picom) for the next 2 settings
- * to have any effect!
+ * to have any effect, and each setting doesn't work without the other
*/
/* From 0 - 255, the opacity of windows marked 'transparent' */
diff --git a/event.c b/event.c
index cbd54fd..0fccb42 100644
--- a/event.c
+++ b/event.c
@@ -283,6 +283,7 @@ void newwindow(XCreateWindowEvent* e) {
if (c->parent == None)
c->parent = c->screen->root;
}
+#if defined(OPACITY) && defined(TRANSPARENTLIST)
if (istransparent(c)) {
/* We need to set the atom on both the window and its parent */
const Atom alpha_atom = XInternAtom(dpy, "_NET_WM_WINDOW_OPACITY", 0);
@@ -306,6 +307,7 @@ void newwindow(XCreateWindowEvent* e) {
(unsigned char*)&opacity,
1);
}
+#endif
if (kbLaunch) {
usleep(100000);
diff --git a/main.c b/main.c
index 20aa0a0..305a10e 100644
--- a/main.c
+++ b/main.c
@@ -21,7 +21,7 @@
#include "patchlevel.h"
char* version[] = {
- "ryudo version 1.1.0\nCopyright (c) 1994-1996 David Hogan,\n(c) 2004 Russ "
+ "ryudo version 1.2.0\nCopyright (c) 1994-1996 David Hogan,\n(c) 2004 Russ "
"Cox,\n(c) 2019-2021 Derek Stevens",
0};