From 987c43bbd37cd654bb183807c2ee2dde6eed018e Mon Sep 17 00:00:00 2001 From: Richard Grenville Date: Thu, 1 Nov 2012 10:43:15 +0800 Subject: Improvement: border_size & ConfigureNotify & VSync changes - Run XSync() before the final paint to catch VBlank better. Stolen from Xfwm4 VSync patch. - Add --vsync-aggressive that sends out the final painting request earlier, simulating xfwm4 VSync patch. But this thing does have the possibility of breaking VSync, I think... - Change handling of ConfigureNotify to avoid freeing w->extents and w->border_size if possible. - Change logic in paint_prepreprocess() to use win_get_region() for border_size generation instead of border_size() if the window is not shaped to try to avoid some BadRegion error messages when a window loses its border_size then is unmapped, about which Adys complained in #25. - Detect if w->border_size is None before using it in various places. Practically the effect is pretty limited because XFixesCreateRegionFromWindow() usually returns an invalid X ID instead of None on error. - Fix a bug that rounded corner detection could fail if the window size is changed by a ConfigureNotify immediately. --- compton.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'compton.h') diff --git a/compton.h b/compton.h index 8d17dbacf..9ec61fcbb 100644 --- a/compton.h +++ b/compton.h @@ -115,6 +115,8 @@ extern struct timeval time_start; // Window size is changed #define WFLAG_SIZE_CHANGE 0x0001 +// Window size/position is changed +#define WFLAG_POS_CHANGE 0x0002 /** * Types @@ -280,7 +282,7 @@ typedef struct _win { struct _win *prev_trans; } win; -typedef enum _vsync_t { +typedef enum { VSYNC_NONE, VSYNC_DRM, VSYNC_OPENGL, @@ -317,6 +319,8 @@ typedef struct _options { vsync_t vsync; /// Whether to enable double buffer. Bool dbe; + /// Whether to do VSync aggressively. + Bool vsync_aggressive; // Shadow Bool wintype_shadow[NUM_WINTYPES]; -- cgit v1.2.1