~vanvugt/compiz/fix-1089250

« back to all changes in this revision

Viewing changes to debian/patches/workaround_broken_drivers.patch

  • Committer: Daniel van Vugt
  • Date: 2012-12-07 09:46:56 UTC
  • mto: This revision was merged to the branch mainline in revision 3516.
  • Revision ID: daniel.van.vugt@canonical.com-20121207094656-f46ib63tfiy50rw6
Upstream workaround_broken_drivers.patch so all users, not just Ubuntu, can
have properly working fglrx support (including GLSL!). (LP: #1026920)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Index: ubuntu_quantal_trunk/plugins/opengl/src/screen.cpp
2
 
===================================================================
3
 
--- ubuntu_quantal_trunk.orig/plugins/opengl/src/screen.cpp     2012-08-22 18:07:44.344116000 +0800
4
 
+++ ubuntu_quantal_trunk/plugins/opengl/src/screen.cpp  2012-08-22 18:09:37.269159461 +0800
5
 
@@ -37,6 +37,21 @@
6
 
 #include <dlfcn.h>
7
 
 #include <math.h>
8
 
 
9
 
+class DetectionWorkaround
10
 
+{
11
 
+    public:
12
 
+
13
 
+        DetectionWorkaround ()
14
 
+        {
15
 
+            program_invocation_short_name[0] = 'C';
16
 
+        }
17
 
+        ~DetectionWorkaround ()
18
 
+        {
19
 
+            program_invocation_short_name[0] = 'c';
20
 
+        }
21
 
+};
22
 
+
23
 
+
24
 
 using namespace compiz::opengl;
25
 
 
26
 
 namespace GL {
27
 
@@ -274,6 +289,8 @@
28
 
 bool
29
 
 GLScreen::glInitContext (XVisualInfo *visinfo)
30
 
 {
31
 
+    DetectionWorkaround workaround;
32
 
+
33
 
     #ifdef USE_GLES
34
 
     Display             *xdpy;
35
 
     Window               overlay;
36
 
@@ -814,6 +831,8 @@
37
 
     PluginClassHandler<GLScreen, CompScreen, COMPIZ_OPENGL_ABI> (s),
38
 
     priv (new PrivateGLScreen (this))
39
 
 {
40
 
+    DetectionWorkaround workaround;
41
 
+
42
 
     XVisualInfo                 *visinfo = NULL;
43
 
 #ifndef USE_GLES
44
 
     Display             *dpy = s->dpy ();