Try harder to support wide screen

This commit is contained in:
Marco Pesenti Gritti
2007-01-31 11:49:56 -05:00
parent dade0b6931
commit c1c5a78ca8
2 changed files with 21 additions and 11 deletions
+9 -5
View File
@@ -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)