# this patch enables fast translucent menus in fvwm. this is a
# minor tweak of a patch posted to fvwm-user mailing list by Olivier
# Chapuis in <20030827135125.GA6370@snoopy.folie>.
cd ${S}; epatch ${FILESDIR}/fvwm-translucent-menus.diff.gz

# fixing #51287, the fvwm-menu-xlock script is not compatible
# with the xlockmore implementation in portage.
cd ${S}; epatch ${FILESDIR}/fvwm-menu-xlock-xlockmore-compat.diff

# with use vanilla, fvwm will be built without extras patches
if ! use vanilla; then
cd ${WORKDIR}; unpack ${A}

# Those patches have not effects until they're not used in the
# configuration
EPATCH_SUFFIX="patch"
EPATCH_FORCE="yes"
EPATCH_SOURCE="${WORKDIR}/patchset"
cd "${S}"; epatch

# Those patches have immediate and irreversible effets
EXTRAS="${WORKDIR}/patchset/extras"
if use first-item-under-pointer; then
cd "${S}"; epatch ${EXTRAS}/FirstItemUnderPointer.patch
fi
if use thin-geometry-proxy; then
cd "${S}"; epatch ${EXTRAS}/ThinGeometryProxy.patch
fi
if use flux-corner; then
cd "${S}"; epatch ${EXTRAS}/FluxCorner.patch
fi
fi

# use readline in FvwmConsole.
if use readline; then
myconf="${myconf} --without-termcap-library"
fi

# FvwmGtk can be built as a gnome application, or a Gtk+ application.
if ! use gtk; then
myconf="${myconf} --disable-gtk --without-gnome"
else
einfo "ATTN: You can safely ignore any imlib related configure errors."
myconf="${myconf} --with-imlib-prefix=${T}"
myconf="${myconf} --without-gnome"
fi

# set the local maintainer for fvwm-bug.
# taviso is not maintainer of this ebuild
# export FVWM_BUGADDR="taviso@gentoo.org"

# fvwm-convert-2.6 is just a stub, contains no code - remove it for now.
# fvwm-convert-2.2 has a man page, but the script is no longer distributed.
rm -f ${D}/usr/bin/fvwm-convert-2.6 ${D}/usr/share/man/man1/fvwm-convert-2.6.1
rm -f ${D}/usr/share/man/man1/fvwm-convert-2.2.1

fvwm comes with NO WARRANTY, to the extent permitted by law. You may
redistribute copies of fvwm under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

- New MenuStyle options TitleFont, TitleColorset and
HilightTitleBack.
- New command PressButton in module FvwmButtons for being able
to emulate button press via other means than the mouse.
- New wrap options to EdgeScroll command for wrapping with pixel
distances.
- New Style option UnderMousePlacement.
- Unused arguments to Style options generate warnings.
- The name style names match against can be augmented by the
X-resource "fvwmstyle".
- New options, Reverse and UseStack, to All command.
- WindowShade can now reshade windows using the Last direction.
- Positional parameters to complex functions can now be expanded
using $[n], $[n-m], $[n-] and $[*] expressions.

* Bug Fixes:

- Fixed detection of running non-ICCCM2 wm (bug #3151).
- Fixed drawing of menus with the sidepic on the right.
- EdgeScroll no longer divides pixel distances >1000 by 1000.
(bug #3162)
- The configure script can now cope with four-part version
numbers when detecting some libraries.
- The WarpToWindow command followed by Move in a complex
function now uses the correct pointer position.
- The menu style TitleWarp does no longer warp the pointer for
root menus (as it is documented).
- Fixed detection of safe system version of mkstemp.

COLORSETS
[...]
Shape, TiledShape and AspectShape take a file name as an argument, search the ImagePath and use it as the shape bitmap. Tiled-
Shape produces repeated copies of the bitmap with no scaling, Shape causes the bitmap to be stretched to fit whatever object the
colorset is applied to and AspectShape stretches to fit but retains the bitmap aspect ratio. If the file is a pixmap in xpm for-
mat, the shape mask of the pixmap is used.

Warning: Due to the way X11 implements shapes you cannot take back making windows shaped. You may have to restart fvwm or the
shaped application.

This rounds the corners of the window to match the clearlooks shape. To use it for every corner, use RoundedCorners. RoundedCornersTop / RoundedCornersBottom can be used to round the top or bottom side on it's own. SlightlyRoundedCorners makes it less rounded, like plastik.
Example: