Comment 2 for bug 526686

Revision history for this message
Frédéric Bourqui (fbourqui) wrote :

--- utils.py 2010-05-07 12:42:32.000000000 +0200
***************
*** 155,161 ****
      pipe = os.popen('xrandr')
      data = pipe.read()
      pipe.close()
! matches = re.search('current (\d+) x (\d+)', data)
      return matches.group(1) + 'x' + matches.group(2)

  def set_resolution(resolution):
--- 155,161 ----
      pipe = os.popen('xrandr')
      data = pipe.read()
      pipe.close()
! matches = re.search('\*\s*\d+\s+(\d+) x (\d+)', data)
      return matches.group(1) + 'x' + matches.group(2)

  def set_resolution(resolution):