diff options
author | Richard Grenville <pyxlcy@gmail.com> | 2013-03-18 11:48:28 +0800 |
---|---|---|
committer | Richard Grenville <pyxlcy@gmail.com> | 2013-03-18 13:29:14 +0800 |
commit | 848103bc3447f814c51cb818836533e18e018bf5 (patch) | |
tree | 9a70634e2384200f06ff1f712136039f1ff4acef /compton.h | |
parent | 17f7d31a5282d55182aec8938d52e13379dcc2bb (diff) | |
download | tdebase-848103bc3447f814c51cb818836533e18e018bf5.tar.gz tdebase-848103bc3447f814c51cb818836533e18e018bf5.zip |
Bug fix: GLX: ARGB texture too dark & Jitter when resize & others
- GLX backend: Fix a bug that ARGB windows / shadows are rendered too
dark. Thanks to derhass in FreeNode/##opengl for help.
- GLX backend: Fix a problem that during window resize the content looks
jittering, by letting compton fetch pixmap sizes with XGetGeometry()
instead of relying on window width/height, which could be inaccurate
during window resize. Negative effect on performance. Thanks to M4he
for reporting. (#7)
- Add .desktop file. Thanks to quequotion for providing it. (#97)
- Avoid checking presence of window pixmap, because they may not exist
with very old X Composite implementations.
- Add workaround for a strange window restack issue when compton
receieves a ConfigureNotify with non-existent new above window.
- Add debugging function hexdump(). Extra sanity checks on various
places.
Diffstat (limited to 'compton.h')
-rw-r--r-- | compton.h | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -162,7 +162,9 @@ free_wincondlst(c2_lptr_t **pcondlst) { */ static inline bool paint_isvalid(session_t *ps, const paint_t *ppaint) { - if (!ppaint || !ppaint->pixmap) + // Don't check for presence of Pixmap here, because older X Composite doesn't + // provide it + if (!ppaint) return false; if (BKEND_XRENDER == ps->o.backend && !ppaint->pict) @@ -179,13 +181,15 @@ paint_isvalid(session_t *ps, const paint_t *ppaint) { * Bind texture in paint_t if we are using GLX backend. */ static inline bool -paint_bind_tex(session_t *ps, paint_t *ppaint, int wid, int hei, int depth, - bool force) { +paint_bind_tex(session_t *ps, paint_t *ppaint, + unsigned wid, unsigned hei, unsigned depth, bool force) { #ifdef CONFIG_VSYNC_OPENGL - // TODO: Make sure we have the same Pixmap binded? - if (BKEND_GLX == ps->o.backend - && (force || !glx_tex_binded(ppaint->ptex, ppaint->pixmap))) { - return glx_bind_pixmap(ps, &ppaint->ptex, ppaint->pixmap, wid, hei, depth); + if (BKEND_GLX == ps->o.backend) { + if (!ppaint->pixmap) + return false; + + if (force || !glx_tex_binded(ppaint->ptex, ppaint->pixmap)) + return glx_bind_pixmap(ps, &ppaint->ptex, ppaint->pixmap, wid, hei, depth); } #endif |