Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar-emulator
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2007-01-31 16:49:56 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2007-01-31 16:49:56 (GMT)
commitc1c5a78ca8d653fd2e65d5990239318f49a32b7a (patch)
tree059e9b1ca7c2c4b3a51cb6dac9e0f557daffdbd2 /sugar-emulator
parentdade0b6931812526b24b9f80e00181e412773967 (diff)
Try harder to support wide screen
Diffstat (limited to 'sugar-emulator')
-rwxr-xr-xsugar-emulator14
1 files changed, 9 insertions, 5 deletions
diff --git a/sugar-emulator b/sugar-emulator
index aa620af..2e186a2 100755
--- a/sugar-emulator
+++ b/sugar-emulator
@@ -78,12 +78,16 @@ if len(sys.argv) == 1:
else:
program = sys.argv[1]
-fullscreen = (gtk.gdk.screen_width() <= 1200 or
- gtk.gdk.screen_height() <= 900) and \
- (gtk.gdk.screen_width() / 4 * 3 ==
- gtk.gdk.screen_height())
+width = height = -1
+if gtk.gdk.screen_width() / 4 * 3 == gtk.gdk.screen_height():
+ fullscreen = (gtk.gdk.screen_width() <= 1200 or
+ gtk.gdk.screen_height() <= 900)
+else:
+ fullscreen = False
+ width = gtk.gdk.screen_width() - 50
+ height = width / 4 * 3
-emulator = Emulator(fullscreen)
+emulator = Emulator(width, height, fullscreen)
emulator.start()
os.execlp('dbus-launch', 'dbus-launch', '--exit-with-session', program)