|
|
|
@ -760,7 +760,7 @@ class fillVars(glob_attr):
|
|
|
|
|
else:
|
|
|
|
|
return ""
|
|
|
|
|
|
|
|
|
|
def get_hr_x11_video_drv(self):
|
|
|
|
|
def get_os_x11_video_drv(self):
|
|
|
|
|
"""Get video driver used by xorg"""
|
|
|
|
|
xorg_modules_dir = '/usr/lib/xorg/modules/drivers'
|
|
|
|
|
xorg_conf = '/etc/X11/xorg.conf'
|
|
|
|
@ -828,27 +828,27 @@ class fillVars(glob_attr):
|
|
|
|
|
else:
|
|
|
|
|
return ""
|
|
|
|
|
|
|
|
|
|
def get_hr_x11_height(self):
|
|
|
|
|
def get_os_x11_height(self):
|
|
|
|
|
"""Получить высоту экрана в пикселах"""
|
|
|
|
|
resolution = self.getX11Resolution()
|
|
|
|
|
if resolution:
|
|
|
|
|
self.Set('hr_x11_width',resolution[0])
|
|
|
|
|
self.Set('os_x11_width',resolution[0])
|
|
|
|
|
return resolution[1]
|
|
|
|
|
return "768"
|
|
|
|
|
|
|
|
|
|
def get_hr_x11_width(self):
|
|
|
|
|
def get_os_x11_width(self):
|
|
|
|
|
"""Получить ширину экрана в пикселах"""
|
|
|
|
|
resolution = self.getX11Resolution()
|
|
|
|
|
if resolution:
|
|
|
|
|
self.Set('hr_x11_height',resolution[1])
|
|
|
|
|
self.Set('os_x11_height',resolution[1])
|
|
|
|
|
return resolution[0]
|
|
|
|
|
return "1024"
|
|
|
|
|
|
|
|
|
|
def get_hr_x11_standart(self):
|
|
|
|
|
def get_os_x11_standart(self):
|
|
|
|
|
"""Получить ближайший стандартный размер изображения к текущему разрешению"""
|
|
|
|
|
#Стандартные разрешения
|
|
|
|
|
widthVal = self.Get('hr_x11_width')
|
|
|
|
|
heightVal = self.Get('hr_x11_height')
|
|
|
|
|
widthVal = self.Get('os_x11_width')
|
|
|
|
|
heightVal = self.Get('os_x11_height')
|
|
|
|
|
if not widthVal or not heightVal:
|
|
|
|
|
return ""
|
|
|
|
|
width = int(widthVal)
|
|
|
|
@ -900,10 +900,10 @@ class fillVars(glob_attr):
|
|
|
|
|
else:
|
|
|
|
|
return "%sx%s"%(stWidth,stHeight)
|
|
|
|
|
|
|
|
|
|
def get_hr_x11_composite(self):
|
|
|
|
|
def get_os_x11_composite(self):
|
|
|
|
|
"""Включен ли композитный режим видеокарты on/off"""
|
|
|
|
|
defaultCompositeOn = ["nvidia","intel"]
|
|
|
|
|
if self.Get('hr_x11_video_drv') in defaultCompositeOn:
|
|
|
|
|
if self.Get('os_x11_video_drv') in defaultCompositeOn:
|
|
|
|
|
defaultComposite = "on"
|
|
|
|
|
else:
|
|
|
|
|
defaultComposite = "off"
|
|
|
|
|