diff options
author | Thomas Gellekum <tg@FreeBSD.org> | 1997-11-04 13:14:17 +0000 |
---|---|---|
committer | Thomas Gellekum <tg@FreeBSD.org> | 1997-11-04 13:14:17 +0000 |
commit | bd383db4a17396199cb4b5410bd5ee1191f43eaa (patch) | |
tree | 4f654aad083d7dcd47a8ae8b108cfbc02d22d7f8 /graphics/xv/files/patch-ag | |
parent | Install ppmcmap.h since some other program needs this file. (diff) |
Set window gravity correctly. Minor cleanup while I was at it.
PR: 2920
Submitted by: John Rochester <jr@cs.mun.ca>
Notes
Notes:
svn path=/head/; revision=8483
Diffstat (limited to 'graphics/xv/files/patch-ag')
-rw-r--r-- | graphics/xv/files/patch-ag | 47 |
1 files changed, 47 insertions, 0 deletions
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); + } |