From 2391ba44de0e385b4b663705ff47f0a12fba4026 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 19 Sep 2017 14:34:02 +0000 Subject: [PATCH] * rename GLContextManager to GtkGLExtContext since it is tied to this library * don't reimport glib git-svn-id: https://xpra.org/svn/Xpra/trunk@16926 3bb7dfac-3a0b-4e04-842a-767bc560f471 --- src/xpra/client/gl/gtk_base/gtk_compat.py | 8 ++++---- src/xpra/client/gl/gtk_base/gtkgl_check.py | 4 ++-- src/xpra/client/gl/gtk_base/gtkgl_window_backing_base.py | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/xpra/client/gl/gtk_base/gtk_compat.py b/src/xpra/client/gl/gtk_base/gtk_compat.py index 19cd917ac4..93ecbeddf1 100644 --- a/src/xpra/client/gl/gtk_base/gtk_compat.py +++ b/src/xpra/client/gl/gtk_base/gtk_compat.py @@ -39,7 +39,7 @@ def Config_new_by_mode(display_mode): log("no configuration for mode: %s", e) return None - class GLContextManager(object): + class GtkGLExtContext(object): def __init__(self, widget): self.widget = widget @@ -52,7 +52,7 @@ def __exit__(self, exc_type, exc_val, exc_tb): #GtkGLExt.widget_end_gl(self.widget, False) pass def __repr__(self): - return "gtk3.GLContextManager(%s)" % self.widget + return "gtk3.GtkGLExtContext(%s)" % self.widget else: import gtk @@ -83,7 +83,7 @@ def v(x): "gdkgl" : v(gdkgl.query_version()) } - class GLContextManager(object): + class GtkGLExtContext(object): def __init__(self, widget): self.widget = widget @@ -99,7 +99,7 @@ def __exit__(self, *_args): self.gldrawable.gl_end() def __repr__(self): - return "gtk2.GLContextManager(%s)" % self.widget + return "gtk2.GtkGLExtContext(%s)" % self.widget def GLDrawingArea(glconfig): assert glconfig, "missing GLConfig" diff --git a/src/xpra/client/gl/gtk_base/gtkgl_check.py b/src/xpra/client/gl/gtk_base/gtkgl_check.py index b59da072cd..9ac5ade7cd 100755 --- a/src/xpra/client/gl/gtk_base/gtkgl_check.py +++ b/src/xpra/client/gl/gtk_base/gtkgl_check.py @@ -140,8 +140,8 @@ def check_functions(*functions): #sanity checks: OpenGL version and fragment program support: def check_GL_support(widget, force_enable=False): - from xpra.client.gl.gtk_base.gtk_compat import GLContextManager - with GLContextManager(widget): + from xpra.client.gl.gtk_base.gtk_compat import GtkGLExtContext + with GtkGLExtContext(widget): return check_PyOpenGL_support(force_enable) def check_support(force_enable=False, check_colormap=False): diff --git a/src/xpra/client/gl/gtk_base/gtkgl_window_backing_base.py b/src/xpra/client/gl/gtk_base/gtkgl_window_backing_base.py index 8d61e01a28..b7680fd835 100644 --- a/src/xpra/client/gl/gtk_base/gtkgl_window_backing_base.py +++ b/src/xpra/client/gl/gtk_base/gtkgl_window_backing_base.py @@ -21,7 +21,7 @@ from xpra.gtk_common.gtk_util import POINTER_MOTION_MASK, POINTER_MOTION_HINT_MASK from xpra.client.gl.gl_window_backing_base import GLWindowBackingBase -from xpra.client.gl.gtk_base.gtk_compat import Config_new_by_mode, MODE_DOUBLE, GLContextManager, GLDrawingArea +from xpra.client.gl.gtk_base.gtk_compat import Config_new_by_mode, MODE_DOUBLE, GtkGLExtContext, GLDrawingArea from xpra.client.gl.gtk_base.gtkgl_check import get_DISPLAY_MODE from xpra.client.gl.gl_check import GL_ALPHA_SUPPORTED, CAN_DOUBLE_BUFFER @@ -29,7 +29,7 @@ class GTKGLWindowBackingBase(GLWindowBackingBase): def idle_add(self, *args, **kwargs): - import_glib().idle_add(*args, **kwargs) + glib.idle_add(*args, **kwargs) def init_gl_config(self, window_alpha): #setup gl config: @@ -95,7 +95,7 @@ def gl_context(self): log.error("Error: invalid OpenGL backing size: %ix%i", w, h) return None try: - context = GLContextManager(b) + context = GtkGLExtContext(b) except Exception as e: log.error("Error: %s", e) return None