summaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorRichard Grenville <pyxlcy@gmail.com>2014-03-11 07:22:23 +0800
committerRichard Grenville <pyxlcy@gmail.com>2014-03-11 07:22:23 +0800
commitf01576deb4f747f72e85795dcca8c43b43d22e5e (patch)
tree8bb693dbf1b2b21052f9b59aa033b23e3259dd78 /common.h
parentecd5b3393f0e9af9a230f06294cb6131cebf69d6 (diff)
downloadtdebase-f01576deb4f747f72e85795dcca8c43b43d22e5e.tar.gz
tdebase-f01576deb4f747f72e85795dcca8c43b43d22e5e.zip
Misc: xr-glx-hybrid alias & minor fixes
- Add "xr-glx-hybrid" as an alias of "xr_glx_hybrid". (#163) - Clear damage history in expose_root() and when root window size changes. Unfortunately this doesn't fix #181.
Diffstat (limited to 'common.h')
-rw-r--r--common.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/common.h b/common.h
index 7786f82b8..e87651c9e 100644
--- a/common.h
+++ b/common.h
@@ -1499,6 +1499,11 @@ parse_backend(session_t *ps, const char *str) {
ps->o.backend = BKEND_XR_GLX_HYBRID;
return true;
}
+ // cju wants to use dashes
+ if (!strcasecmp(str, "xr-glx-hybrid")) {
+ ps->o.backend = BKEND_XR_GLX_HYBRID;
+ return true;
+ }
printf_errf("(\"%s\"): Invalid backend argument.", str);
return false;
}
@@ -1789,6 +1794,15 @@ free_region(session_t *ps, XserverRegion *p) {
}
/**
+ * Free all regions in ps->all_damage_last .
+ */
+static inline void
+free_all_damage_last(session_t *ps) {
+ for (int i = 0; i < CGLX_MAX_BUFFER_AGE; ++i)
+ free_region(ps, &ps->all_damage_last[i]);
+}
+
+/**
* Crop a rectangle by another rectangle.
*
* psrc and pdst cannot be the same.