aboutsummaryrefslogtreecommitdiff
blob: 40e296b8c56802fdb132b60c991d6a8d45427269 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
diff -ur gerbv-1.0.0/ChangeLog gerbv-1.0.0.new/ChangeLog
--- gerbv-1.0.0/ChangeLog	2004-12-27 23:31:10.000000000 +0000
+++ gerbv-1.0.0.new/ChangeLog	2005-01-02 01:54:21.074734456 +0000
@@ -269,6 +269,10 @@
 	* src/gerber.c: Doesn't warn anymore if a gerber file requests an
 	  image rotate on zero degrees. Reported by Balaji V.
 
+2003-03-03  Jeffrey W. Baker <jwbaker@acm.org>
+ 	
+	* src/gerbv.c: fix initial window size for multihead systems.
+
 2003-03-02  Stefan Petersen  <spe@stacken.kth.se>
 
 	* src/draw_amacro.c: Aperture macro primitive 1 is a filled circle.
diff -ur gerbv-1.0.0/src/gerbv.c gerbv-1.0.0.new/src/gerbv.c
--- gerbv-1.0.0/src/gerbv.c	2004-09-24 20:12:25.000000000 +0100
+++ gerbv-1.0.0.new/src/gerbv.c	2005-01-02 01:53:21.241830440 +0000
@@ -2485,7 +2485,7 @@
     GtkWidget *hbox;
     GtkWidget *menubar;
     GtkStyle  *textStyle;
-    gint      screen_width, width, height;
+    gint      width, height;
     int       read_opt;
     int       i;
     int       req_width = -1, req_height = -1, req_x = 0, req_y = 0;
@@ -2611,9 +2610,14 @@
 	width = req_width;
 	height = req_height;
     } else {
-	screen_width = gdk_screen_width();
-	width = screen_width * 3/4;
-	height = width * 3/4;
+	GdkScreen *screen;
+	int nmonitors;
+
+	screen = gdk_screen_get_default();
+	nmonitors = gdk_screen_get_n_monitors(screen);
+
+	width = gdk_screen_get_width(screen) * 3/4 / nmonitors;
+	height = gdk_screen_get_height(screen) * 3/4 / nmonitors;
     }
 
     /*