Merge lp:~sil2100/compiz/fix_770283 into lp:~compiz/compiz/ubuntu

Proposed by Łukasz Zemczak on 2012-04-20
Status: Rejected
Rejected by: Sam Spilsbury on 2012-05-18
Proposed branch: lp:~sil2100/compiz/fix_770283
Merge into: lp:~compiz/compiz/ubuntu
Diff against target: 171 lines (+22/-124)
4 files modified
debian/changelog (+10/-0)
debian/patches/fix_770283.patch (+11/-0)
debian/patches/series (+1/-1)
debian/patches/workaround_770283.patch (+0/-123)
To merge this branch: bzr merge lp:~sil2100/compiz/fix_770283
Reviewer Review Type Date Requested Status
Sam Spilsbury Resubmit on 2012-05-18
Didier Roche 2012-04-20 Needs Fixing on 2012-04-23
Daniel van Vugt (community) Approve on 2012-04-23
Review via email: mp+102831@code.launchpad.net

Commit Message

The workaround for the fglrx problem is no longer needed (LP: #770283)! We have a real fix now.

Description of the Change

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.

To post a comment you must log in.
Daniel van Vugt (vanvugt) wrote :

Yep, that's the one line fix we have accepted upstream.

review: Approve
lp:~sil2100/compiz/fix_770283 updated on 2012-04-23
779. By Łukasz Zemczak on 2012-04-23

Merged ogra's changes with the proposed MRQ

Didier Roche (didrocks) wrote :

The diff is wrong, you need an additional entry to the changelog.

review: Needs Fixing
lp:~sil2100/compiz/fix_770283 updated on 2012-04-23
780. By Łukasz Zemczak on 2012-04-23

Starting version 1:0.9.7.6-0ubuntu3.

Sam Spilsbury (smspillaz) wrote :

Fix is upstream now. Resubmit against packaging if required

review: Resubmit

Unmerged revisions

780. By Łukasz Zemczak on 2012-04-23

Starting version 1:0.9.7.6-0ubuntu3.

779. By Łukasz Zemczak on 2012-04-23

Merged ogra's changes with the proposed MRQ

778. By Łukasz Zemczak on 2012-04-20

The workaround for the fglrx problem is no longer needed! We have an actual fix now!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-04-20 16:29:12 +0000
3+++ debian/changelog 2012-04-23 12:56:17 +0000
4@@ -1,3 +1,13 @@
5+compiz (1:0.9.7.6-0ubuntu3) UNRELEASED; urgency=low
6+
7+ * debian/patches/fix_770283.patch:
8+ - Fix problem with window decorations not getting updated in fglrx systems,
9+ caused by an old one-liner (LP: #770283).
10+ * Removed debian/patches/workaround_770283.patch as workaround no longer
11+ needed.
12+
13+ -- Łukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com> Mon, 23 Apr 2012 14:49:45 +0200
14+
15 compiz (1:0.9.7.6-0ubuntu2) precise-proposed; urgency=low
16
17 [ Łukasz 'sil2100' Zemczak ]
18
19=== added file 'debian/patches/fix_770283.patch'
20--- debian/patches/fix_770283.patch 1970-01-01 00:00:00 +0000
21+++ debian/patches/fix_770283.patch 2012-04-23 12:56:17 +0000
22@@ -0,0 +1,11 @@
23+--- compiz-0.9.7.6.orig/plugins/decor/src/decor.cpp
24++++ compiz-0.9.7.6/plugins/decor/src/decor.cpp
25+@@ -2319,7 +2319,7 @@ DecorScreen::handleEvent (XEvent *event)
26+ dw->cWindow->damageOutputExtents ();
27+ }
28+ }
29+- return;
30++ break;
31+ }
32+ }
33+ }
34
35=== modified file 'debian/patches/series'
36--- debian/patches/series 2012-04-18 12:09:18 +0000
37+++ debian/patches/series 2012-04-23 12:56:17 +0000
38@@ -2,4 +2,4 @@
39 ccp_plugin.patch
40 workaround_broken_drivers.patch
41 fix_976467.patch
42-workaround_770283.patch
43+fix_770283.patch
44
45=== removed file 'debian/patches/workaround_770283.patch'
46--- debian/patches/workaround_770283.patch 2012-04-18 12:09:18 +0000
47+++ debian/patches/workaround_770283.patch 1970-01-01 00:00:00 +0000
48@@ -1,123 +0,0 @@
49---- compiz-0.9.7.6.orig/plugins/decor/src/decor.cpp
50-+++ compiz-0.9.7.6/plugins/decor/src/decor.cpp
51-@@ -317,44 +317,66 @@ DecorTexture::DecorTexture (Pixmap pixma
52- pixmap (pixmap),
53- damage (None)
54- {
55-+ if (!bindTexture (pixmap))
56-+ return;
57-+
58-+ damage = XDamageCreate (screen->dpy (), pixmap,
59-+ XDamageReportRawRectangles);
60-+}
61-+
62-+/*
63-+ * DecorTexture::~DecorTexture
64-+ *
65-+ * Remove damage handle on texture
66-+ *
67-+ */
68-+
69-+DecorTexture::~DecorTexture ()
70-+{
71-+ if (damage)
72-+ XDamageDestroy (screen->dpy (), damage);
73-+}
74-+
75-+/*
76-+ * DecorTexture::indTexture
77-+ *
78-+ * This function actually takes and binds/rebinds the given Pixmap
79-+ * to a texture (i.e. calls GLTexture::bindPixmapToTexture)
80-+ *
81-+ */
82-+
83-+bool
84-+DecorTexture::bindTexture (Pixmap src)
85-+{
86- unsigned int width, height, depth, ui;
87- Window root;
88- int i;
89-
90-+ pixmap = src;
91-+
92- if (!XGetGeometry (screen->dpy (), pixmap, &root,
93- &i, &i, &width, &height, &ui, &depth))
94- {
95-- status = false;
96-- return;
97-+ status = false;
98-+ return false;
99- }
100-
101-+ // Explicitly clear the texture list before binding/rebinding
102-+ textures.clear ();
103-+
104- bindFailed = false;
105- textures = GLTexture::bindPixmapToTexture (pixmap, width, height, depth);
106- if (textures.size () != 1)
107- {
108- bindFailed = true;
109-- status = false;
110-- return;
111-+ status = false;
112-+ return false;
113- }
114-
115- if (!DecorScreen::get (screen)->optionGetMipmap ())
116- textures[0]->setMipmap (false);
117-
118-- damage = XDamageCreate (screen->dpy (), pixmap,
119-- XDamageReportRawRectangles);
120--}
121--
122--/*
123-- * DecorTexture::~DecorTexture
124-- *
125-- * Remove damage handle on texture
126-- *
127-- */
128--
129--DecorTexture::~DecorTexture ()
130--{
131-- if (damage)
132-- XDamageDestroy (screen->dpy (), damage);
133-+ return true;
134- }
135-
136- /*
137-@@ -2315,8 +2337,22 @@ DecorScreen::handleEvent (XEvent *event)
138- {
139- DECOR_WINDOW (w);
140-
141-- if (dw->wd && dw->wd->decor->texture == t)
142-+ if (dw->wd && dw->wd->decor->texture == t) {
143-+ /* XXX FIXME: dirty fglrx workaround here!
144-+ (LP #770283) */
145-+ /* If the damage is done on decoration, in case
146-+ of fglrx we need to rebind the texture to see
147-+ actual Pixmap changes */
148-+
149-+ XGrabServer (screen->dpy ());
150-+ XSync (screen->dpy (), false);
151-+
152-+ t->bindTexture (t->pixmap);
153-+
154-+ XUngrabServer (screen->dpy ());
155-+ XSync (screen->dpy (), false);
156- dw->cWindow->damageOutputExtents ();
157-+ }
158- }
159- }
160- return;
161---- compiz-0.9.7.6.orig/plugins/decor/src/decor.h
162-+++ compiz-0.9.7.6/plugins/decor/src/decor.h
163-@@ -79,6 +79,8 @@ class DecorTexture {
164- DecorTexture (Pixmap pixmap);
165- ~DecorTexture ();
166-
167-+ bool bindTexture (Pixmap src);
168-+
169- public:
170- bool status;
171- int refCount;

Subscribers

People subscribed via source and target branches

to all changes: