The branch, master has been updated via b5f0772583dda128584dd65b76f525577745c137 (commit) from 53ef90396c4951ab6f29ab4fe255cf24bd93879d (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 ----------------------------------------------------------------- commit b5f0772583dda128584dd65b76f525577745c137 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Sep 28 17:34:40 2012 +0200 Add support for starting maximized session windows. ----------------------------------------------------------------------- Summary of changes: debian/changelog | 1 + x2go/defaults.py | 2 +- x2go/utils.py | 33 +++++++++++++++++++++++++++++---- 3 files changed, 31 insertions(+), 5 deletions(-) The diff of changes is: diff --git a/debian/changelog b/debian/changelog index 1698a0c..9af05ee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ python-x2go (0.2.0.11-0~x2go1) UNRELEASED; urgency=low - Implementation of session profile parameters ,,sshproxysameuser'' and ,,sshproxysameauth''. - Fixing typos in __doc__ strings. + - Add support for starting maximized session windows. * /debian/rules: + Allow package build on systems with missing dh_python2. diff --git a/x2go/defaults.py b/x2go/defaults.py index d08f146..96115f3 100644 --- a/x2go/defaults.py +++ b/x2go/defaults.py @@ -300,7 +300,7 @@ X2GO_SESSIONPROFILE_DEFAULTS = { 'useexports': True, 'fstunnel': True, 'export': '', 'usemimebox': False, 'mimeboxextensions': '', 'mimeboxaction': 'OPEN', 'fullscreen': False, - 'width': 800,'height': 600,'dpi': 96,'setdpi': False, 'xinerama': False, 'multidisp': False, + 'width': 800,'height': 600, 'maxdim': False, 'dpi': 96, 'setdpi': False, 'xinerama': False, 'multidisp': False, 'usekbd': True, 'layout': 'us', 'type': 'pc105/us', 'variant': '', 'sound': False, 'soundsystem': 'pulse', 'startsoundsystem': False, 'soundtunnel':True, 'defsndport':True, 'sndport':4713, 'name': 'NEW_PROFILE', 'icon': ':icons/128x128/x2gosession.png', diff --git a/x2go/utils.py b/x2go/utils.py index 6e2fd05..93c755a 100644 --- a/x2go/utils.py +++ b/x2go/utils.py @@ -272,13 +272,16 @@ def _convert_SessionProfileOptions_2_SessionParams(options): if _shared_folder.split(":")[-1] == "1": _params['share_local_folders'].append(":".join(_shared_folder.split(":")[:-1])) - if not options['fullscreen']: - _params['geometry'] = '%sx%s' % (options['width'], options['height']) - else: + if options['fullscreen']: _params['geometry'] = 'fullscreen' + elif options['maxdim']: + _params['geometry'] = '%sx%s' % get_workarea_geometry() + else: + _params['geometry'] = '%sx%s' % (options['width'], options['height']) del _params['width'] del _params['height'] del _params['fullscreen'] + del _params['maxdim'] if not options['sound']: _params['snd_system'] = 'none' @@ -507,7 +510,6 @@ def xkb_rules_names(): } return _rn_dict - def local_color_depth(): """\ Detect the current local screen's color depth. @@ -601,6 +603,29 @@ def find_session_window(session_name): return window +def get_workarea_geometry(): + """\ + Get the geometry of the current screen's work area by + wrapping around + + xprop -root '_NET_WORKAREA' + + @return: a (<width>, <height>) tuple will be returned + @rtype: C{tuple} + + """ + if _X2GOCLIENT_OS != 'Windows': + p = subprocess.Popen(['xprop', '-root', '_NET_WORKAREA',], stdout=subprocess.PIPE, ) + _list = p.stdout.read().rstrip('\n').split(',') + if len(_list) == 4: + return (_list[2].strip(), _list[3].strip()) + else: + return None + else: + + return None + + def set_session_window_title(session_window, session_title): """\ Set title of session window. 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).