1
--- compiz-0.9.7.6.orig/plugins/decor/src/decor.cpp
2
+++ compiz-0.9.7.6/plugins/decor/src/decor.cpp
3
@@ -317,44 +317,66 @@ DecorTexture::DecorTexture (Pixmap pixma
7
+ if (!bindTexture (pixmap))
10
+ damage = XDamageCreate (screen->dpy (), pixmap,
11
+ XDamageReportRawRectangles);
15
+ * DecorTexture::~DecorTexture
17
+ * Remove damage handle on texture
21
+DecorTexture::~DecorTexture ()
24
+ XDamageDestroy (screen->dpy (), damage);
28
+ * DecorTexture::indTexture
30
+ * This function actually takes and binds/rebinds the given Pixmap
31
+ * to a texture (i.e. calls GLTexture::bindPixmapToTexture)
36
+DecorTexture::bindTexture (Pixmap src)
38
unsigned int width, height, depth, ui;
44
if (!XGetGeometry (screen->dpy (), pixmap, &root,
45
&i, &i, &width, &height, &ui, &depth))
53
+ // Explicitly clear the texture list before binding/rebinding
57
textures = GLTexture::bindPixmapToTexture (pixmap, width, height, depth);
58
if (textures.size () != 1)
67
if (!DecorScreen::get (screen)->optionGetMipmap ())
68
textures[0]->setMipmap (false);
70
- damage = XDamageCreate (screen->dpy (), pixmap,
71
- XDamageReportRawRectangles);
75
- * DecorTexture::~DecorTexture
77
- * Remove damage handle on texture
81
-DecorTexture::~DecorTexture ()
84
- XDamageDestroy (screen->dpy (), damage);
89
@@ -2315,8 +2337,22 @@ DecorScreen::handleEvent (XEvent *event)
93
- if (dw->wd && dw->wd->decor->texture == t)
94
+ if (dw->wd && dw->wd->decor->texture == t) {
95
+ /* XXX FIXME: dirty fglrx workaround here!
97
+ /* If the damage is done on decoration, in case
98
+ of fglrx we need to rebind the texture to see
99
+ actual Pixmap changes */
101
+ XGrabServer (screen->dpy ());
102
+ XSync (screen->dpy (), false);
104
+ t->bindTexture (t->pixmap);
106
+ XUngrabServer (screen->dpy ());
107
+ XSync (screen->dpy (), false);
108
dw->cWindow->damageOutputExtents ();
113
--- compiz-0.9.7.6.orig/plugins/decor/src/decor.h
114
+++ compiz-0.9.7.6/plugins/decor/src/decor.h
115
@@ -79,6 +79,8 @@ class DecorTexture {
116
DecorTexture (Pixmap pixmap);
119
+ bool bindTexture (Pixmap src);