~darkxst/ubuntu/saucy/gnome-control-center/lp1218102

« back to all changes in this revision

Viewing changes to debian/patches/git_no_glxinfo.patch

  • Committer: Sebastien Bacher
  • Date: 2013-04-15 11:40:38 UTC
  • Revision ID: seb128@ubuntu.com-20130415114038-1z3c8g58758iynv5
Tags: 1:3.6.3-0ubuntu23
releasing version 1:3.6.3-0ubuntu23

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 
9
9
https://bugzilla.gnome.org/show_bug.cgi?id=691613
10
10
---
11
 
Index: gnome-control-center-3.6.3/configure.ac
12
 
===================================================================
13
 
--- gnome-control-center-3.6.3.orig/configure.ac        2013-03-25 17:49:48.060473367 +0100
14
 
+++ gnome-control-center-3.6.3/configure.ac     2013-03-25 17:49:48.000000000 +0100
 
11
--- a/configure.ac
 
12
+++ b/configure.ac
15
13
@@ -120,7 +120,7 @@
16
14
                   polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION
17
15
                   gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION)
21
19
                  polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
22
20
 PKG_CHECK_MODULES(KEYBOARD_PANEL, $COMMON_MODULES x11)
23
21
 PKG_CHECK_MODULES(MEDIA_PANEL, $COMMON_MODULES)
24
 
Index: gnome-control-center-3.6.3/panels/info/cc-info-panel.c
25
 
===================================================================
26
 
--- gnome-control-center-3.6.3.orig/panels/info/cc-info-panel.c 2013-03-25 17:49:48.060473367 +0100
27
 
+++ gnome-control-center-3.6.3/panels/info/cc-info-panel.c      2013-03-25 17:49:48.000000000 +0100
 
22
--- a/panels/info/cc-info-panel.c
 
23
+++ b/panels/info/cc-info-panel.c
28
24
@@ -36,6 +36,10 @@
29
25
 #include <glibtop/mem.h>
30
26
 #include <glibtop/sysinfo.h>
36
32
 #include "hostname-helper.h"
37
33
 #include "gsd-disk-space-helper.h"
38
34
 
39
 
@@ -301,54 +305,59 @@
 
35
@@ -301,54 +305,68 @@
40
36
 }
41
37
 
42
38
 static char *
99
95
+  GLXFBConfig *config;
100
96
+  GLXWindow glxwin;
101
97
+  GLXContext context;
 
98
+  XSetWindowAttributes win_attributes;
 
99
+  XVisualInfo *visualInfo;
102
100
+  char *renderer;
103
101
+
104
102
+  gdk_error_trap_push ();
113
111
+    gdk_error_trap_pop_ignored ();
114
112
+    return NULL;
115
113
+  }
 
114
+  visualInfo = glXGetVisualFromFBConfig (display, *config);
 
115
+  win_attributes.colormap = XCreateColormap (display, DefaultRootWindow(display),
 
116
+                                        visualInfo->visual, AllocNone );
116
117
+
117
 
+  window = XCreateSimpleWindow (display, DefaultRootWindow (display),
 
118
+  window = XCreateWindow (display, DefaultRootWindow (display),
118
119
+                                0, 0, /* x, y */
119
120
+                                1, 1, /* width, height */
120
 
+                                0, 0, 0  /* border_width, border, background */);
 
121
+                                0,   /* border_width */
 
122
+                                visualInfo->depth, InputOutput,
 
123
+                                visualInfo->visual, CWColormap, &win_attributes);
121
124
+  glxwin = glXCreateWindow (display, *config, window, NULL);
122
125
+
123
126
+  context = glXCreateNewContext (display, *config, GLX_RGBA_TYPE,
124
127
+                                 NULL, TRUE);
 
128
+  XFree (config);
125
129
+
126
130
+  glXMakeContextCurrent (display, glxwin, glxwin, context);
127
131
+  renderer = (char *) glGetString (GL_RENDERER);
131
135
+  glXDestroyContext (display, context);
132
136
+  glXDestroyWindow (display, glxwin);
133
137
+  XDestroyWindow (display, window);
 
138
+  XFree (visualInfo);
134
139
+
135
140
+  if (gdk_error_trap_pop () != Success) {
136
141
+    g_warning ("Failed to get OpenGL driver info");