Merge lp:~mc-return/compiz/compiz.merge-fix1042132-missing-text-transparency into lp:compiz/0.9.9

Proposed by MC Return on 2012-10-19
Status: Merged
Approved by: Daniel van Vugt on 2012-10-19
Approved revision: 3437
Merged at revision: 3438
Proposed branch: lp:~mc-return/compiz/compiz.merge-fix1042132-missing-text-transparency
Merge into: lp:compiz/0.9.9
Diff against target: 31 lines (+7/-0)
1 file modified
plugins/text/src/text.cpp (+7/-0)
To merge this branch: bzr merge lp:~mc-return/compiz/compiz.merge-fix1042132-missing-text-transparency
Reviewer Review Type Date Requested Status
Daniel van Vugt 2012-10-19 Approve on 2012-10-19
MC Return Resubmit on 2012-10-19
PS Jenkins bot continuous-integration Pending
Review via email:

Commit message

Re-added missing glEnable (GL_BLEND); and glDisable (GL_BLEND); calls to the OpenGL codepath to fix the text plugin's missing transparency.
Those got lost during the big GLES merge.
(LP: #1042132)

Description of the change

To test that it works, enable the shift-switcher and text plugins, open some windows and start the shift switcher.

Note: Workspacenames text still shows some flickering, but I am pretty sure I'll find the cause for this in the plugin workspacenames itself and it is unrelated to this fix.
Even with minor flickering this plugin now also looks much better with this fix applied.

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

For cleaner diffs and better compatibility with backporting in future, please use the exact syntax that we had prior to GLES. See the GLES merge:

review: Needs Fixing
3435. By MC Return on 2012-10-19

Trying to keep the .diff cleaner

3436. By MC Return on 2012-10-19

Removed newlines

MC Return (mc-return) :
review: Resubmit
3437. By MC Return on 2012-10-19

Restored the wasBlend checks also

Daniel van Vugt (vanvugt) wrote :

Confirmed fixed with shift and workspacenames.

A new rendering problem with workspacenames is now visible. The label darkens due to the new rendering method(s) (always swap buffers) from the GLES work. But that's a different bug for another day.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/text/src/text.cpp'
2--- plugins/text/src/text.cpp 2012-10-12 09:05:18 +0000
3+++ plugins/text/src/text.cpp 2012-10-19 08:06:21 +0000
4@@ -492,6 +492,7 @@
5 float y,
6 float alpha) const
7 {
8+ GLboolean wasBlend;
9 GLint oldBlendSrc, oldBlendDst;
10 GLushort colorData[4];
11 GLfloat textureData[8];
12@@ -510,6 +511,10 @@
13 #else
14 glGetIntegerv (GL_BLEND_SRC, &oldBlendSrc);
15 glGetIntegerv (GL_BLEND_DST, &oldBlendDst);
17+ wasBlend = glIsEnabled (GL_BLEND);
18+ if (!wasBlend)
19+ glEnable (GL_BLEND);
20 #endif
23@@ -564,6 +569,8 @@
24 glBlendFuncSeparate (oldBlendSrc, oldBlendDst,
25 oldBlendSrcAlpha, oldBlendDstAlpha);
26 #else
27+ if (!wasBlend)
28+ glDisable (GL_BLEND);
29 glBlendFunc (oldBlendSrc, oldBlendDst);
30 #endif
31 }


People subscribed via source and target branches