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

@ -3,8 +3,6 @@
// Copyright (c) 2013 Richard Grenville <pyxlcy@gmail.com>
#pragma once
#include <stdbool.h>
#include <X11/Xlib.h>
#include <X11/extensions/sync.h>
#include <xcb/damage.h>
// FIXME shouldn't need this
@ -98,8 +96,6 @@ struct win {
winmode_t mode;
/// Whether the window has been damaged at least once.
bool ever_damaged;
/// X Sync fence of drawable.
XSyncFence fence;
/// Whether the window was damaged after last paint.
bool pixmap_damaged;
/// Damage of the window.