[X2Go-Commits] python-x2go.git - build-main (branch) updated: 0.4.0.8-14-g732635e
X2Go dev team
git-admin at x2go.org
Wed Jan 8 15:15:17 CET 2014
The branch, build-main has been updated
via 732635efb177910d23b544d2e05e09559c8af5ff (commit)
from 058bc7b3d319e91a07c39804aaa9e118dc116334 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
debian/changelog | 7 +++++++
x2go/utils.py | 9 ++++++---
2 files changed, 13 insertions(+), 3 deletions(-)
The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 8c6ee9e..de471fb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
python-x2go (0.4.0.9-0~x2go1) UNRELEASED; urgency=low
+ [ Mike Gabriel ]
* New upstream version (0.4.0.9):
- Agent channels in Paramiko can raise an EOFError if the connection
has got disrupted. Ignoring this.
@@ -16,6 +17,12 @@ python-x2go (0.4.0.9-0~x2go1) UNRELEASED; urgency=low
- Rewrite passwords that are not string/unicode to an empty string.
- No Unicode chars in log messages. Eliminated one more in checkhosts.py.
+ [ Kenneth Pedersen ]
+ * New upstream version (0.4.0.9):
+ - Color depth detection: Stop using win32api.GetSystemMetrics(2) which actually
+ returns the width of a vertical scroll bar in pixels. Instead, create a screen
+ display context and query it for the color depth. (Fixes: #330).
+
-- Mike Gabriel <mike.gabriel at das-netzwerkteam.de> Wed, 07 Aug 2013 12:18:46 +0200
python-x2go (0.4.0.8-0~x2go1) unstable; urgency=low
diff --git a/x2go/utils.py b/x2go/utils.py
index e8d80bc..c6db2de 100644
--- a/x2go/utils.py
+++ b/x2go/utils.py
@@ -46,8 +46,9 @@ if _X2GOCLIENT_OS != 'Windows':
from defaults import X_DISPLAY as _X_DISPLAY
if _X2GOCLIENT_OS == 'Windows':
- import win32api
import win32gui
+ import win32print
+ import win32con
def is_in_nx3packmethods(method):
@@ -555,8 +556,10 @@ def local_color_depth():
return 24
else:
- return win32api.GetSystemMetrics(2)
-
+ # This gets the color depth of the primary monitor. All monitors need not have the same color depth.
+ dc = win32gui.GetDC(None)
+ _depth = win32print.GetDeviceCaps(dc, win32con.BITSPIXEL) * win32print.GetDeviceCaps(dc, win32con.PLANES)
+ win32gui.ReleaseDC(None, dc)
def is_color_depth_ok(depth_session, depth_local):
"""\
hooks/post-receive
--
python-x2go.git (Python X2Go Client API)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-x2go.git" (Python X2Go Client API).
More information about the x2go-commits
mailing list