From: Enrico Tassi Date: Tue, 11 May 2010 07:21:34 +0000 (+0000) Subject: little workaround for multiple screens, gdk support not bound by lablgtk2 X-Git-Tag: make_still_working~2903 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=ef98db5ff416ef53004e57cc054e28abd1bf871e;p=helm.git little workaround for multiple screens, gdk support not bound by lablgtk2 --- diff --git a/helm/software/matita/matitaGui.ml b/helm/software/matita/matitaGui.ml index deef158a3..3cc3b2547 100644 --- a/helm/software/matita/matitaGui.ml +++ b/helm/software/matita/matitaGui.ml @@ -1032,8 +1032,11 @@ class gui () = (* focus *) self#sourceView#misc#grab_focus (); (* main win dimension *) - let width = Gdk.Screen.width () in - let height = Gdk.Screen.height () in + let width = Gdk.Screen.width ~screen:(Gdk.Screen.default ()) () in + let height = Gdk.Screen.height ~screen:(Gdk.Screen.default ()) () in + (* hack for xinerama, no proper support of monitors from lablgtk *) + let width = if width > 1600 then width / 2 else width in + let height = if height > 1200 then height / 2 else height in let main_w = width * 90 / 100 in let main_h = height * 80 / 100 in let script_w = main_w * 6 / 10 in