Skip to content

Commit

Permalink
#1569 if all the opengl backends we try have failed, just log warning…
Browse files Browse the repository at this point in the history
… and continue

git-svn-id: https://xpra.org/svn/Xpra/trunk@16952 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Sep 22, 2017
1 parent 430b43c commit 1338b16
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/xpra/client/gtk_base/gtk_client_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,7 @@ def err(msg, e):
else:
backends = enable_opengl.split(",")
opengllog("init_opengl: backend options: %s", backends)
gl_client_window_module = None
for impl in backends:
opengllog("attempting to load %s OpenGL backend", impl)
GL_CLIENT_WINDOW_MODULE = "xpra.client.gl.gtk%s.%sgl_client_window" % (gtk_version(), impl)
Expand All @@ -751,7 +752,7 @@ def err(msg, e):
gl_client_window_module = __import__(GL_CLIENT_WINDOW_MODULE, {}, {}, ["GLClientWindow", "check_support"])
except ImportError as e:
opengllog("cannot import %s", GL_CLIENT_WINDOW_MODULE, exc_info=True)
opengllog.warn("Warning: cannot import %s module", impl)
opengllog.warn("Warning: cannot import %s OpenGL module", impl)
opengllog.warn(" %s", e)
continue
opengllog("%s=%s", GL_CLIENT_WINDOW_MODULE, gl_client_window_module)
Expand All @@ -760,6 +761,11 @@ def err(msg, e):
opengllog("check_support(%s)=%s", force_enable, self.opengl_props)
if self.opengl_props:
break
if not gl_client_window_module:
opengllog.warn("Warning: no OpenGL backends found")
self.client_supports_opengl = False
self.opengl_props["info"] = "disabled: no supported backends - tried: %s" % backends
return
opengllog("init_opengl: found props %s", self.opengl_props)
self.GLClientWindowClass = gl_client_window_module.GLClientWindow
self.client_supports_opengl = True
Expand Down

0 comments on commit 1338b16

Please sign in to comment.