Refactor the XSync fence code

Use a temporary fence everytime. Convert the Xlib XSync functions to use
xcb_sync_*.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2018-12-30 07:06:47 +00:00
parent bc0382d962
commit 80847dd3fa
11 changed files with 85 additions and 86 deletions

View File

@ -743,7 +743,11 @@ void get_cfg(options_t *opt, int argc, char *const *argv, bool shadow_enable,
opt->write_pid_path = strdup(optarg);
break;
P_CASEBOOL(311, vsync_use_glfinish);
P_CASEBOOL(312, xrender_sync);
case 312:
// --xrender-sync
log_warn("Please use --xrender-sync-fence instead of --xrender-sync");
opt->xrender_sync_fence = true;
break;
P_CASEBOOL(313, xrender_sync_fence);
P_CASEBOOL(315, no_fading_destroyed_argb);
P_CASEBOOL(316, force_win_blend);
@ -799,9 +803,6 @@ void get_cfg(options_t *opt, int argc, char *const *argv, bool shadow_enable,
if (opt->blur_background_frame)
opt->blur_background = true;
if (opt->xrender_sync_fence)
opt->xrender_sync = true;
// Other variables determined by options
// Determine whether we need to track focus changes