mirror of https://github.com/jumpserver/jumpserver
perf: fix rdp file resolution value
parent
c1c3236a30
commit
4b28b079dc
|
@ -123,13 +123,15 @@ class RDPFileClientProtocolURLMixin:
|
||||||
# rdp_options['domain:s'] = token.account_ad_domain
|
# rdp_options['domain:s'] = token.account_ad_domain
|
||||||
|
|
||||||
# 设置宽高
|
# 设置宽高
|
||||||
height = self.request.query_params.get('height')
|
|
||||||
width = self.request.query_params.get('width')
|
resolution_value = token.connect_options.get('resolution', 'auto')
|
||||||
if width and height:
|
if resolution_value != 'auto':
|
||||||
rdp_options['desktopwidth:i'] = width
|
width, height = resolution_value.split('x')
|
||||||
rdp_options['desktopheight:i'] = height
|
if width and height:
|
||||||
rdp_options['winposstr:s'] = f'0,1,0,0,{width},{height}'
|
rdp_options['desktopwidth:i'] = width
|
||||||
rdp_options['dynamic resolution:i'] = '0'
|
rdp_options['desktopheight:i'] = height
|
||||||
|
rdp_options['winposstr:s'] = f'0,1,0,0,{width},{height}'
|
||||||
|
rdp_options['dynamic resolution:i'] = '0'
|
||||||
|
|
||||||
color_quality = self.request.query_params.get('rdp_color_quality')
|
color_quality = self.request.query_params.get('rdp_color_quality')
|
||||||
color_quality = color_quality if color_quality else os.getenv('JUMPSERVER_COLOR_DEPTH', RDPColorQuality.HIGH)
|
color_quality = color_quality if color_quality else os.getenv('JUMPSERVER_COLOR_DEPTH', RDPColorQuality.HIGH)
|
||||||
|
|
Loading…
Reference in New Issue