[sugar] strange xephyr window size
Joshua N Pritikin
jpritikin
Fri Feb 16 05:15:00 EST 2007
On Fri, Feb 16, 2007 at 03:25:22PM +0530, Joshua N Pritikin wrote:
> xwininfo reports:
>
> Width: 957
> Height: 718
>
> My display is 1280x768
In other words, how about this:
diff --git a/sugar-emulator b/sugar-emulator
index 01c7b39..60061d3 100755
--- a/sugar-emulator
+++ b/sugar-emulator
@@ -43,13 +43,12 @@ else:
program = sys.argv[1]
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)
+if gtk.gdk.screen_width() <= 1200 and gtk.gdk.screen_height() <= 900:
+ fullscreen = True
else:
fullscreen = False
- height = min(900, gtk.gdk.screen_height() - 50)
- width = height * 4 / 3
+ width = min(1200, gtk.gdk.screen_width())
+ height = min(900, gtk.gdk.screen_height() - 40)
emulator = Emulator(width, height, fullscreen)
emulator.start()
More information about the Sugar-devel
mailing list