Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-10-16 15:22:05 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-10-16 15:22:05 (GMT)
commit781988589a012c07959dc391d87b9a4b33b8fae1 (patch)
treecbb6bc0f765579652a0099e25600cd1bb81eeee7 /sugar
parentf98956acda4402520e517c5d2985b54dc60d2049 (diff)
Add a fullscreen option to the emulator
Diffstat (limited to 'sugar')
-rw-r--r--sugar/emulator.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/sugar/emulator.py b/sugar/emulator.py
index 78d39d2..f1f0b3d 100644
--- a/sugar/emulator.py
+++ b/sugar/emulator.py
@@ -77,9 +77,13 @@ class MatchboxProcess(Process):
return 'Matchbox'
class XephyrProcess(Process):
- def __init__(self):
+ def __init__(self, fullscreen):
self._display = get_display_number()
- cmd = 'Xephyr :%d -ac -screen 800x600' % (self._display)
+ cmd = 'Xephyr :%d -ac ' % (self._display)
+ if fullscreen:
+ cmd += '-fullscreen '
+ else:
+ cmd += '-screen 800x600 '
Process.__init__(self, cmd)
def get_name(self):
@@ -102,11 +106,14 @@ class XnestProcess(Process):
Process.start(self)
os.environ['DISPLAY'] = ":%d" % (self._display)
-class Emulator:
+class Emulator(object):
"""The OLPC emulator"""
+ def __init__(self, fullscreen):
+ self._fullscreen = fullscreen
+
def start(self):
try:
- process = XephyrProcess()
+ process = XephyrProcess(self._fullscreen)
process.start()
except:
try: