summaryrefslogtreecommitdiff
path: root/x11/xworld
diff options
context:
space:
mode:
authorwennmach <wennmach>2000-08-18 08:46:13 +0000
committerwennmach <wennmach>2000-08-18 08:46:13 +0000
commit3d104adf13f8e72ebb244d10f823f8c8236e55c3 (patch)
treedef29db295e0413fedf998a2fc61ff2fa76bd3d1 /x11/xworld
parent4309998cfb3a4d48be66de51f350a4a766d9f644 (diff)
downloadpkgsrc-3d104adf13f8e72ebb244d10f823f8c8236e55c3.tar.gz
Some window managers don't honour our X size hint for a square window geometry.
Don't exit in this case, select min(width, height) as size.
Diffstat (limited to 'x11/xworld')
-rw-r--r--x11/xworld/files/patch-sum3
-rw-r--r--x11/xworld/patches/patch-ae29
2 files changed, 31 insertions, 1 deletions
diff --git a/x11/xworld/files/patch-sum b/x11/xworld/files/patch-sum
index 93ffde2bd91..e8123b2722a 100644
--- a/x11/xworld/files/patch-sum
+++ b/x11/xworld/files/patch-sum
@@ -1,6 +1,7 @@
-$NetBSD: patch-sum,v 1.5 2000/08/17 18:38:00 fredb Exp $
+$NetBSD: patch-sum,v 1.6 2000/08/18 08:46:13 wennmach Exp $
MD5 (patch-aa) = 77c1d0c6752a84a93f7fb566c6ba3a6e
MD5 (patch-ab) = 7a372dfcb44f68a52e65eed100883f7d
MD5 (patch-ac) = 5d1eab63a888564e347b8687a2ff6876
MD5 (patch-ad) = 3b92140a80b821e161cae0372140bab5
+MD5 (patch-ae) = 6c97d0d546917a422f8947aedcf58cf3
diff --git a/x11/xworld/patches/patch-ae b/x11/xworld/patches/patch-ae
new file mode 100644
index 00000000000..e80e52c41d5
--- /dev/null
+++ b/x11/xworld/patches/patch-ae
@@ -0,0 +1,29 @@
+$NetBSD: patch-ae,v 1.1 2000/08/18 08:46:14 wennmach Exp $
+
+Some window managers don't honour our X size hint for a square window geometry.
+Don't exit in this case, select min(width, height) as size.
+
+--- xworld.c.orig Fri Aug 18 10:01:18 2000
++++ xworld.c Fri Aug 18 10:01:23 2000
+@@ -63,6 +63,8 @@
+ #define BORDER 5
+ #define SLEEP 120
+
++#define MIN(x,y) (((x)<(y))?(x):(y))
++
+ char *MainTitle[] = {"Hello, world"};
+ char *IconTitle[] = {"xworld"};
+
+@@ -451,8 +453,12 @@
+ ConfigureEvent = (XConfigureEvent *)&event;
+ size = ConfigureEvent->width;
+ if (ConfigureEvent->height != size) {
++#if 0
+ fprintf(stderr, "xworld: error: width != height\n");
+ exit(1);
++#else
++ size = MIN(size, ConfigureEvent->height);
++#endif
+ }
+ if (size != old_size) {
+ old_size = size;