Skip to content

Commit

Permalink
#1309: show bit depth on session info
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@15027 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Feb 9, 2017
1 parent 1c04127 commit 4621aaf
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/xpra/client/gtk_base/session_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,24 +641,26 @@ def show_opengl_state(self):
if self.client.opengl_enabled:
glinfo = "%s / %s" % (self.client.opengl_props.get("vendor", ""), self.client.opengl_props.get("renderer", ""))
display_mode = self.client.opengl_props.get("display_mode", [])
bit_depth = self.client.opengl_props.get("depth", 0)
info = []
if bit_depth:
info.append("%i-bit" % bit_depth)
if "DOUBLE" in display_mode:
buffering = "double buffering"
info.append("double buffering")
elif "SINGLE" in display_mode:
buffering = "single buffering"
info.append("single buffering")
else:
buffering = "unknown"
if buffering!="unknown":
if "ALPHA" in display_mode:
buffering += " with"
else:
buffering += " without"
buffering += " transparency"
info.append("unknown buffering")
if "ALPHA" in display_mode:
info.append("with transparency")
else:
info.append("without transparency")
else:
#info could be telling us that the gl bindings are missing:
glinfo = self.client.opengl_props.get("info", "disabled")
buffering = "n/a"
info = ["n/a"]
self.client_opengl_label.set_text(glinfo)
self.opengl_buffering.set_text(buffering)
self.opengl_buffering.set_text(" ".join(info))

def populate_features(self):
size_info = ""
Expand Down

0 comments on commit 4621aaf

Please sign in to comment.