diff options
author | wennmach <wennmach@pkgsrc.org> | 2000-08-18 08:46:13 +0000 |
---|---|---|
committer | wennmach <wennmach@pkgsrc.org> | 2000-08-18 08:46:13 +0000 |
commit | 45a94bc8f1bb5a85ea1cfb8cac01000360d35d8b (patch) | |
tree | def29db295e0413fedf998a2fc61ff2fa76bd3d1 /x11/xworld | |
parent | edf4cd57c6006b3f534581ce79f86589e475ad56 (diff) | |
download | pkgsrc-45a94bc8f1bb5a85ea1cfb8cac01000360d35d8b.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-sum | 3 | ||||
-rw-r--r-- | x11/xworld/patches/patch-ae | 29 |
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; |