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.
This commit is contained in:
Richard Grenville
2014-03-11 07:22:23 +08:00
parent 8a5becf617
commit 9950d08ab7
2 changed files with 16 additions and 0 deletions

View File

@@ -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;
}
@@ -1788,6 +1793,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.
*