← Back to team overview

compiz team mailing list archive

[Merge] lp:~sil2100/compiz/fix_770283 into lp:compiz

 

Łukasz Zemczak has proposed merging lp:~sil2100/compiz/fix_770283 into lp:compiz.

Requested reviews:
  compiz packagers (compiz)
Related bugs:
  Bug #770283 in compiz (Ubuntu): "[fglrx]title bar does not update on non-maximized windows"
  https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/770283

For more details, see:
https://code.launchpad.net/~sil2100/compiz/fix_770283/+merge/102831

The problem that is being fixed here is the fglrx LP: #770283 that's been causing so much trouble lately. We already got a dirty workaround merged as a distro patch, but just today we found the real cause! The driver is at fault here too, but not because of a bug, but an implementation difference. But because of this one-liner bug in compiz decor plugin, this implementation difference resulted in a nasty bug like this.

So, I'm recommending a fast remove of the workaround patch in regards of the ACTUAL REAL fix. I would like this to land in an SRU instead, if possible.
-- 
https://code.launchpad.net/~sil2100/compiz/fix_770283/+merge/102831
Your team compiz packagers is requested to review the proposed merge of lp:~sil2100/compiz/fix_770283 into lp:compiz.
=== modified file 'debian/changelog'
--- debian/changelog	2012-04-18 12:09:18 +0000
+++ debian/changelog	2012-04-20 11:09:17 +0000
@@ -1,8 +1,8 @@
 compiz (1:0.9.7.6-0ubuntu2) UNRELEASED; urgency=low
 
-  * debian/patches/workaround_770283.patch:
-    - Workaround a problem with fglrx not refreshing window decoration textures
-      on pixmap modification (LP: #770283)
+  * debian/patches/fix_770283.patch:
+    - Fix problem with window decorations not getting updated in fglrx systems,
+      caused by an old one-liner (LP: #770283)
 
  -- Łukasz 'sil2100' Zemczak <lukasz.zemczak@xxxxxxxxxxxxx>  Wed, 18 Apr 2012 13:06:05 +0200
 

=== added file 'debian/patches/fix_770283.patch'
--- debian/patches/fix_770283.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/fix_770283.patch	2012-04-20 11:09:17 +0000
@@ -0,0 +1,11 @@
+--- compiz-0.9.7.6.orig/plugins/decor/src/decor.cpp
++++ compiz-0.9.7.6/plugins/decor/src/decor.cpp
+@@ -2319,7 +2319,7 @@ DecorScreen::handleEvent (XEvent *event)
+ 				    dw->cWindow->damageOutputExtents ();
+ 			    }
+ 			}
+-			return;
++			break;
+ 		    }
+ 		}
+ 	    }

=== modified file 'debian/patches/series'
--- debian/patches/series	2012-04-18 12:09:18 +0000
+++ debian/patches/series	2012-04-20 11:09:17 +0000
@@ -2,4 +2,4 @@
 ccp_plugin.patch
 workaround_broken_drivers.patch
 fix_976467.patch
-workaround_770283.patch
+fix_770283.patch

=== removed file 'debian/patches/workaround_770283.patch'
--- debian/patches/workaround_770283.patch	2012-04-18 12:09:18 +0000
+++ debian/patches/workaround_770283.patch	1970-01-01 00:00:00 +0000
@@ -1,123 +0,0 @@
---- compiz-0.9.7.6.orig/plugins/decor/src/decor.cpp
-+++ compiz-0.9.7.6/plugins/decor/src/decor.cpp
-@@ -317,44 +317,66 @@ DecorTexture::DecorTexture (Pixmap pixma
-     pixmap (pixmap),
-     damage (None)
- {
-+    if (!bindTexture (pixmap))
-+	return;
-+
-+    damage = XDamageCreate (screen->dpy (), pixmap,
-+			     XDamageReportRawRectangles);
-+}
-+
-+/*
-+ * DecorTexture::~DecorTexture
-+ *
-+ * Remove damage handle on texture
-+ *
-+ */
-+
-+DecorTexture::~DecorTexture ()
-+{
-+    if (damage)
-+	XDamageDestroy (screen->dpy (), damage);
-+}
-+
-+/*
-+ * DecorTexture::indTexture
-+ *
-+ * This function actually takes and binds/rebinds the given Pixmap
-+ * to a texture (i.e. calls GLTexture::bindPixmapToTexture)
-+ *
-+ */
-+
-+bool
-+DecorTexture::bindTexture (Pixmap src)
-+{
-     unsigned int width, height, depth, ui;
-     Window	 root;
-     int		 i;
- 
-+    pixmap = src;
-+
-     if (!XGetGeometry (screen->dpy (), pixmap, &root,
- 		       &i, &i, &width, &height, &ui, &depth))
-     {
--        status = false;
--	return;
-+	status = false;
-+	return false;
-     }
- 
-+    // Explicitly clear the texture list before binding/rebinding
-+    textures.clear ();
-+
-     bindFailed = false;
-     textures = GLTexture::bindPixmapToTexture (pixmap, width, height, depth);
-     if (textures.size () != 1)
-     {
- 	bindFailed = true;
--        status = false;
--	return;
-+	status = false;
-+	return false;
-     }
- 
-     if (!DecorScreen::get (screen)->optionGetMipmap ())
- 	textures[0]->setMipmap (false);
- 
--    damage = XDamageCreate (screen->dpy (), pixmap,
--			     XDamageReportRawRectangles);
--}
--
--/*
-- * DecorTexture::~DecorTexture
-- *
-- * Remove damage handle on texture
-- *
-- */
--
--DecorTexture::~DecorTexture ()
--{
--    if (damage)
--	XDamageDestroy (screen->dpy (), damage);
-+    return true;
- }
- 
- /*
-@@ -2315,8 +2337,22 @@ DecorScreen::handleEvent (XEvent *event)
- 			    {
- 				DECOR_WINDOW (w);
- 
--				if (dw->wd && dw->wd->decor->texture == t)
-+				if (dw->wd && dw->wd->decor->texture == t) {
-+				    /* XXX FIXME: dirty fglrx workaround here! 
-+				       (LP #770283) */
-+				    /* If the damage is done on decoration, in case
-+				       of fglrx we need to rebind the texture to see 
-+				       actual Pixmap changes */
-+
-+				    XGrabServer (screen->dpy ());
-+				    XSync (screen->dpy (), false);
-+
-+				    t->bindTexture (t->pixmap);
-+
-+				    XUngrabServer (screen->dpy ());
-+				    XSync (screen->dpy (), false);
- 				    dw->cWindow->damageOutputExtents ();
-+				}
- 			    }
- 			}
- 			return;
---- compiz-0.9.7.6.orig/plugins/decor/src/decor.h
-+++ compiz-0.9.7.6/plugins/decor/src/decor.h
-@@ -79,6 +79,8 @@ class DecorTexture {
- 	DecorTexture (Pixmap pixmap);
- 	~DecorTexture ();
- 
-+	bool bindTexture (Pixmap src);
-+
-     public:
- 	bool            status;
- 	int             refCount;


Follow ups