summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Grenville <pyxlcy@gmail.com>2014-07-29 09:29:26 +0800
committerRichard Grenville <pyxlcy@gmail.com>2014-07-29 09:29:26 +0800
commit66b420aa62d28af6f6e7b064f58db446829b4f6a (patch)
treebd92a7b7fdfc4b9a294c59ab1674c54def12a262
parentd8f0aba7b5e0896ae2cba51a728b33e515682563 (diff)
downloadtdebase-66b420aa62d28af6f6e7b064f58db446829b4f6a.tar.gz
tdebase-66b420aa62d28af6f6e7b064f58db446829b4f6a.zip
Misc: Fix compilation with NO_VSYNC_OPENGL_GLSL / NO_C2
Fix compilation with NO_VSYNC_OPENGL_GLSL / NO_C2.
-rw-r--r--compton.c7
-rw-r--r--opengl.c2
2 files changed, 9 insertions, 0 deletions
diff --git a/compton.c b/compton.c
index 65d9fa752..f249b1881 100644
--- a/compton.c
+++ b/compton.c
@@ -2587,6 +2587,7 @@ win_update_opacity_rule(session_t *ps, win *w) {
if (IsViewable != w->a.map_state)
return;
+#ifdef CONFIG_C2
// If long is 32-bit, unfortunately there's no way could we express "unset",
// so we just entirely don't distinguish "unset" and OPAQUE
opacity_t opacity = OPAQUE;
@@ -2602,6 +2603,7 @@ win_update_opacity_rule(session_t *ps, win *w) {
else if (OPAQUE != w->opacity_set)
wid_rm_opacity_prop(ps, w->id);
w->opacity_set = opacity;
+#endif
}
/**
@@ -5162,6 +5164,7 @@ parse_geometry_end:
*/
static inline bool
parse_rule_opacity(session_t *ps, const char *src) {
+#ifdef CONFIG_C2
// Find opacity value
char *endptr = NULL;
long val = strtol(src, &endptr, 0);
@@ -5186,6 +5189,10 @@ parse_rule_opacity(session_t *ps, const char *src) {
// Parse pattern
// I hope 1-100 is acceptable for (void *)
return c2_parsed(ps, &ps->o.opacity_rules, endptr, (void *) val);
+#else
+ printf_errf("(\"%s\"): Condition support not compiled in.", src);
+ return false;
+#endif
}
#ifdef CONFIG_LIBCONFIG
diff --git a/opengl.c b/opengl.c
index 965356593..800ebd585 100644
--- a/opengl.c
+++ b/opengl.c
@@ -104,12 +104,14 @@ glx_init(session_t *ps, bool need_render) {
ps->psglx = cmalloc(1, glx_session_t);
memcpy(ps->psglx, &CGLX_SESSION_DEF, sizeof(glx_session_t));
+#ifdef CONFIG_VSYNC_OPENGL_GLSL
for (int i = 0; i < MAX_BLUR_PASS; ++i) {
glx_blur_pass_t *ppass = &ps->psglx->blur_passes[i];
ppass->unifm_factor_center = -1;
ppass->unifm_offset_x = -1;
ppass->unifm_offset_y = -1;
}
+#endif
}
glx_session_t *psglx = ps->psglx;