Improvement: --unredir-if-possible-exclude & --unredir-if-possible-delay

- Add --unredir-if-possible-exclude, to exclude certain windows when
  evaluating --unredir-if-possible. (#140)

- Add --unredir-if-possible-delay, to add some delay before
  unredirecting screen. (#138, #140)

- Code clean-up.
This commit is contained in:
Richard Grenville
2013-09-04 22:00:51 +08:00
parent 5350127b72
commit 4acbd56722
4 changed files with 158 additions and 58 deletions

View File

@ -324,6 +324,14 @@ ms_to_tv(int timeout) {
};
}
/**
* Whether an event is DamageNotify.
*/
static inline bool
isdamagenotify(session_t *ps, const XEvent *ev) {
return ps->damage_event + XDamageNotify == ev->type;
}
/**
* Create a XTextProperty of a single string.
*/
@ -1205,6 +1213,9 @@ timeout_get_poll_time(session_t *ps);
static void
timeout_clear(session_t *ps);
static bool
tmout_unredir_callback(session_t *ps, timeout_t *tmout);
static bool
mainloop(session_t *ps);