~compiz-team/compiz/compiz.fix_1077866

« back to all changes in this revision

Viewing changes to debian/patches/workaround_broken_drivers.patch

first packaging

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: compiz-0.9.7.0~bzr2995/plugins/opengl/src/screen.cpp
 
2
===================================================================
 
3
--- compiz-0.9.7.0~bzr2995.orig/plugins/opengl/src/screen.cpp   2012-02-09 16:32:07.000000000 +0100
 
4
+++ compiz-0.9.7.0~bzr2995/plugins/opengl/src/screen.cpp        2012-02-10 17:09:17.029015287 +0100
 
5
@@ -25,6 +25,11 @@
 
6
  *          David Reveman <davidr@novell.com>
 
7
  */
 
8
 
 
9
+#ifndef _GNU_SOURCE
 
10
+#define _GNU_SOURCE
 
11
+#endif
 
12
+#include <errno.h>
 
13
+
 
14
 #include "privates.h"
 
15
 
 
16
 #include <dlfcn.h>
 
17
@@ -83,9 +88,24 @@
 
18
 
 
19
 CompOutput *targetOutput = NULL;
 
20
 
 
21
+class DetectionWorkaround
 
22
+{
 
23
+    public:
 
24
+
 
25
+        DetectionWorkaround ()
 
26
+        {
 
27
+            program_invocation_short_name[0] = 'C';
 
28
+        }
 
29
+        ~DetectionWorkaround ()
 
30
+        {
 
31
+            program_invocation_short_name[0] = 'c';
 
32
+        }
 
33
+};
 
34
+
 
35
 bool
 
36
 GLScreen::glInitContext (XVisualInfo *visinfo)
 
37
 {
 
38
+    DetectionWorkaround workaround;
 
39
     Display             *dpy = screen->dpy ();
 
40
     const char          *glExtensions;
 
41
     GLfloat             globalAmbient[]  = { 0.1f, 0.1f,  0.1f, 0.1f };
 
42
@@ -309,6 +329,7 @@
 
43
     int                         defaultDepth, nvisinfo, nElements, value, i;
 
44
     const char          *glxExtensions;
 
45
     XWindowAttributes    attr;
 
46
+    DetectionWorkaround workaround;
 
47
     CompOption::Vector o (0);
 
48
 
 
49
     if (!XGetWindowAttributes (dpy, s->root (), &attr))