Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2007-01-27 13:31:13 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2007-01-27 13:31:13 (GMT)
commit204aac8658020eb9a2b0014c17012abe6ae83ab9 (patch)
tree405140e20c7527306cb252a576fda925b5375970
parent37c6c1e9fa9b42d7a65f2234eac61307352887c2 (diff)
Drop Xnest support. Start fullscreen if widht <= 900.
-rwxr-xr-xsugar-emulator2
-rw-r--r--sugar/emulator.py23
2 files changed, 3 insertions, 22 deletions
diff --git a/sugar-emulator b/sugar-emulator
index aeb5443..4be7de5 100755
--- a/sugar-emulator
+++ b/sugar-emulator
@@ -78,7 +78,7 @@ if len(sys.argv) == 1:
else:
program = sys.argv[1]
-fullscreen = (gtk.gdk.screen_width() <= 1200 and
+fullscreen = (gtk.gdk.screen_width() <= 1200 or
gtk.gdk.screen_height() <= 900)
emulator = Emulator(fullscreen)
diff --git a/sugar/emulator.py b/sugar/emulator.py
index 664e379..fe9539d 100644
--- a/sugar/emulator.py
+++ b/sugar/emulator.py
@@ -95,20 +95,6 @@ class XephyrProcess(Process):
os.environ['DISPLAY'] = ":%d" % (self._display)
os.environ['SUGAR_XEPHYR_PID'] = '%d' % self.pid
-
-class XnestProcess(Process):
- def __init__(self):
- self._display = get_display_number()
- cmd = 'Xnest :%d -ac -geometry 800x600' % (self._display)
- Process.__init__(self, cmd)
-
- def get_name(self):
- return 'Xnest'
-
- def start(self, standard_output=False):
- Process.start(self)
- os.environ['DISPLAY'] = ":%d" % (self._display)
-
class Emulator(object):
"""The OLPC emulator"""
def __init__(self, fullscreen):
@@ -119,13 +105,8 @@ class Emulator(object):
process = XephyrProcess(self._fullscreen)
process.start()
except:
- try:
- process = XnestProcess()
- process.start()
- except:
- print 'Cannot run the emulator. You need to install \
- Xephyr or Xnest.'
- sys.exit(0)
+ print 'Cannot run the emulator. You need to install Xephyr'
+ sys.exit(0)
process = MatchboxProcess()
process.start()