aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authortg <tg@FreeBSD.org>1997-11-04 21:14:17 +0800
committertg <tg@FreeBSD.org>1997-11-04 21:14:17 +0800
commit77116d014093fbd8c3b2654aceeff55265df2b4d (patch)
tree5690627e49306d65923396398a3bfc2baa674be0 /graphics
parentc090530f55b567b90ef3c0e572e252cdc57e119e (diff)
downloadfreebsd-ports-gnome-77116d014093fbd8c3b2654aceeff55265df2b4d.tar.gz
freebsd-ports-gnome-77116d014093fbd8c3b2654aceeff55265df2b4d.tar.zst
freebsd-ports-gnome-77116d014093fbd8c3b2654aceeff55265df2b4d.zip
Set window gravity correctly. Minor cleanup while I was at it.
PR: 2920 Submitted by: John Rochester <jr@cs.mun.ca>
Diffstat (limited to 'graphics')
-rw-r--r--graphics/xv/Makefile4
-rw-r--r--graphics/xv/files/patch-af58
-rw-r--r--graphics/xv/files/patch-ag47
-rw-r--r--graphics/xv/pkg-plist1
4 files changed, 109 insertions, 1 deletions
diff --git a/graphics/xv/Makefile b/graphics/xv/Makefile
index 785c59b95d22..1f9966b9c9c2 100644
--- a/graphics/xv/Makefile
+++ b/graphics/xv/Makefile
@@ -3,7 +3,7 @@
# Date created: 30 October 1994
# Whom: smace
#
-# $Id: Makefile,v 1.13 1996/11/18 00:29:59 ache Exp $
+# $Id: Makefile,v 1.14 1997/07/03 07:37:08 asami Exp $
#
DISTNAME= xv-3.10a
@@ -17,6 +17,8 @@ DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
PATCH_SITES= ftp://ftp.cis.upenn.edu/pub/xv/
PATCHFILES= xv-3.10a.JPEG-patch # xv-3.10a.TIFF-patch (for tiff3.4)
+MAINTAINER= ports@FreeBSD.ORG
+
LIB_DEPENDS= jpeg\\.7\\.:${PORTSDIR}/graphics/jpeg \
tiff\\.3\\.3:${PORTSDIR}/graphics/tiff
diff --git a/graphics/xv/files/patch-af b/graphics/xv/files/patch-af
new file mode 100644
index 000000000000..eb55dc32ef5c
--- /dev/null
+++ b/graphics/xv/files/patch-af
@@ -0,0 +1,58 @@
+--- xv.c.orig Sat Mar 8 16:29:05 1997
++++ xv.c Sat Mar 8 16:38:48 1997
+@@ -3197,9 +3197,17 @@
+ hints.flags = 0;
+ if ((i&XValue || i&YValue)) hints.flags = USPosition;
+
+- if (i&XValue && i&XNegative) x = vrWIDE - eWIDE - abs(x);
+- if (i&YValue && i&YNegative) y = vrHIGH - eHIGH - abs(y);
+-
++ hints.win_gravity = NorthWestGravity;
++ if (i&XValue && i&XNegative) {
++ hints.win_gravity = NorthEastGravity;
++ x = vrWIDE - (eWIDE + 2 * bwidth) - abs(x);
++ }
++ if (i&YValue && i&YNegative) {
++ hints.win_gravity = (hints.win_gravity == NorthWestGravity) ?
++ SouthWestGravity : SouthEastGravity;
++ y = vrHIGH - (eHIGH + 2 * bwidth) - abs(y);
++ }
++
+ if (x+eWIDE > vrWIDE) x = vrWIDE - eWIDE; /* keep on screen */
+ if (y+eHIGH > vrHIGH) y = vrHIGH - eHIGH;
+
+@@ -3218,7 +3226,7 @@
+ hints.x = x; hints.y = y;
+ hints.width = eWIDE; hints.height = eHIGH;
+ hints.max_width = maxWIDE; hints.max_height = maxHIGH;
+- hints.flags |= USSize | PMaxSize;
++ hints.flags |= USSize | PMaxSize | PWinGravity;
+
+ xswa.bit_gravity = StaticGravity;
+ xswa.background_pixel = bg;
+@@ -3267,10 +3275,6 @@
+ }
+ }
+
+-
+- XSetStandardProperties(theDisp,mainW,"","",None,NULL,0,&hints);
+- setWinIconNames(name);
+-
+ xwmh.input = True;
+ xwmh.flags = InputHint;
+
+@@ -3295,12 +3299,12 @@
+ }
+ }
+ }
+- XSetWMHints(theDisp, mainW, &xwmh);
+
+ classh.res_name = "xv";
+ classh.res_class = "XVroot";
+- XSetClassHint(theDisp, mainW, &classh);
+
++ XmbSetWMProperties(theDisp, mainW, NULL, NULL, NULL, 0, &hints, &xwmh, &classh);
++ setWinIconNames(name);
+
+ if (nodecor) { /* turn of image window decorations (in MWM) */
+ Atom mwm_wm_hints;
diff --git a/graphics/xv/files/patch-ag b/graphics/xv/files/patch-ag
new file mode 100644
index 000000000000..e5c99aa5334e
--- /dev/null
+++ b/graphics/xv/files/patch-ag
@@ -0,0 +1,47 @@
+--- xvmisc.c.orig Fri Jan 13 23:41:34 1995
++++ xvmisc.c Sat Mar 8 16:05:19 1997
+@@ -97,10 +97,18 @@
+ if (!usesize || !(i&WidthValue)) w = defw;
+ if (!usesize || !(i&HeightValue)) h = defh;
+
+- hints.flags |= USSize;
++ hints.flags |= USSize | PWinGravity;
+
+- if (i&XValue && i&XNegative) x = dispWIDE - w - abs(x);
+- if (i&YValue && i&YNegative) y = dispHIGH - h - abs(y);
++ hints.win_gravity = NorthWestGravity;
++ if (i&XValue && i&XNegative) {
++ hints.win_gravity = NorthEastGravity;
++ x = dispWIDE - (w + 2 * bwidth) - abs(x);
++ }
++ if (i&YValue && i&YNegative) {
++ hints.win_gravity = (hints.win_gravity == NorthWestGravity) ?
++ SouthWestGravity : SouthEastGravity;
++ y = dispHIGH - (h + 2 * bwidth) - abs(y);
++ }
+
+
+ #define VROOT_TRANS
+@@ -136,19 +144,18 @@
+ if (!win) return(win); /* leave immediately if couldn't create */
+
+
+- XSetStandardProperties(theDisp, win, name, name, None, NULL, 0, &hints);
+-
+ xwmh.input = True;
+ xwmh.flags = InputHint;
+ if (iconPix) { xwmh.icon_pixmap = iconPix; xwmh.flags |= IconPixmapHint; }
+- XSetWMHints(theDisp, win, &xwmh);
+
+ if (clname && strlen(clname)) {
+ classh.res_name = "xv";
+ classh.res_class = clname;
+- XSetClassHint(theDisp, win, &classh);
+ StoreDeleteWindowProp(win);
+ }
++
++ XmbSetWMProperties(theDisp, win, name, name, NULL, 0, &hints, &xwmh,
++ clname ? &classh : NULL);
+
+ return(win);
+ }
diff --git a/graphics/xv/pkg-plist b/graphics/xv/pkg-plist
index 3c88fa2c3471..e4089f5a183b 100644
--- a/graphics/xv/pkg-plist
+++ b/graphics/xv/pkg-plist
@@ -10,3 +10,4 @@ man/man1/xcmap.1.gz
man/man1/xvpictoppm.1.gz
share/doc/xv/README
share/doc/xv/xvdocs.ps
+@dirrm share/doc/xv