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.
This commit is contained in:
Richard Grenville
2013-03-18 11:48:28 +08:00
parent b6a99334ce
commit 1a88e3d0c5
6 changed files with 128 additions and 42 deletions

View File

@ -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