diff -Nurd -x'*~' fluxbox-1.3.7.orig/Makefile.in fluxbox-1.3.7/Makefile.in
--- fluxbox-1.3.7.orig/Makefile.in	2015-02-08 05:44:52.000000000 -0500
+++ fluxbox-1.3.7/Makefile.in	2015-12-01 00:27:00.000000000 -0500
@@ -1136,11 +1136,11 @@
 @IMLIB2_TRUE@	src/FbTk/ImageImlib2.cc
 
 libFbTk_a_CPPFLAGS = \
-	$(FREETYPE2_CFLAGS) \
-	$(FRIBIDI_CFLAGS) \
 	$(AM_CPPFLAGS) \
 	-I$(src_incdir) \
-	-I$(nls_incdir)
+	-I$(nls_incdir) \
+	$(FREETYPE2_CFLAGS) \
+	$(FRIBIDI_CFLAGS)
 
 libFbTk_a_SOURCES = \
 	$(imlib2_SOURCE) \
@@ -1305,12 +1305,12 @@
 @SLIT_SRC_TRUE@	src/SlitTheme.hh
 
 fluxbox_CPPFLAGS = \
-	$(FRIBIDI_CFLAGS) \
-	$(XRANDR_CFLAGS) \
 	$(AM_CPPFLAGS) \
 	-I$(src_incdir) \
 	-I$(fbtk_incdir) \
-	-I$(nls_incdir)
+	-I$(nls_incdir) \
+	$(FRIBIDI_CFLAGS) \
+	$(XRANDR_CFLAGS)
 
 fluxbox_LDADD = \
 	$(LDADD) \
diff -Nurd -x'*~' fluxbox-1.3.7.orig/src/fluxbox.cc fluxbox-1.3.7/src/fluxbox.cc
--- fluxbox-1.3.7.orig/src/fluxbox.cc	2015-02-08 05:44:45.000000000 -0500
+++ fluxbox-1.3.7/src/fluxbox.cc	2015-11-30 23:29:54.000000000 -0500
@@ -1316,7 +1316,7 @@
         FocusControl::setFocusedWindow(0);
 }
 
-bool Fluxbox::validateClient(const WinClient *client) const {
+bool Fluxbox::validateClient(WinClient *client) const {
     WinClientMap::const_iterator it =
         find_if(m_window_search.begin(),
                 m_window_search.end(),
diff -Nurd -x'*~' fluxbox-1.3.7.orig/src/fluxbox.hh fluxbox-1.3.7/src/fluxbox.hh
--- fluxbox-1.3.7.orig/src/fluxbox.hh	2015-02-08 05:44:45.000000000 -0500
+++ fluxbox-1.3.7/src/fluxbox.hh	2015-11-30 23:29:37.000000000 -0500
@@ -103,7 +103,7 @@
     WinClient *searchWindow(Window);
     BScreen *searchScreen(Window w);
     bool validateWindow(Window win) const;
-    bool validateClient(const WinClient *client) const;
+    bool validateClient(WinClient *client) const;
 
     // Not currently implemented until we decide how it'll be used
     //WinClient *searchGroup(Window);
diff -Nurd -x'*~' fluxbox-1.3.7.orig/util/fbsetbg fluxbox-1.3.7/util/fbsetbg
--- fluxbox-1.3.7.orig/util/fbsetbg	2015-02-08 05:44:45.000000000 -0500
+++ fluxbox-1.3.7/util/fbsetbg	2015-11-30 23:33:00.000000000 -0500
@@ -49,7 +49,8 @@
 
 
 WHOAMI=`whoami`
-[ "$WHOAMI" = root ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin
+# fink's init.sh sets modern/platform-correct X11 (X11R6 is obsolete)
+[ "$WHOAMI" = root ] && PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin && . @PREFIX@/bin/init.sh
 
 command="`basename \"$0\"`"
 
diff -Nurd -x'*~' fluxbox-1.3.7.orig/util/fluxbox-generate_menu.in fluxbox-1.3.7/util/fluxbox-generate_menu.in
--- fluxbox-1.3.7.orig/util/fluxbox-generate_menu.in	2015-02-08 05:44:45.000000000 -0500
+++ fluxbox-1.3.7/util/fluxbox-generate_menu.in	2015-11-30 23:38:07.000000000 -0500
@@ -275,6 +275,7 @@
     # echo -n "for $temp_icon"
     eval doSearchLoop $USER_ICONPATHS \
       "$FB_ICONDIR" \
+      "@PREFIX@/share/${execname%% *}" \
       "/usr/share/${execname%% *}" \
       ${OTHER_ICONPATHS} \
 
@@ -558,7 +559,8 @@
 
 
 WHOAMI=`whoami`
-[ "$WHOAMI" = root ] && PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
+# fink's init.sh sets modern/platform-correct X11 (X11R6 is obsolete)
+[ "$WHOAMI" = root ] && PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin && . @PREFIX@/bin/init.sh
 
 # Check for Imlib2-support
 if @pkgprefix@fluxbox@pkgsuffix@@EXEEXT@ -info 2> /dev/null | grep -q "^IMLIB"; then
@@ -1327,6 +1329,14 @@
         -g) GNOMEMENU=yes; shift;;
         -in) NO_ICON=yes; shift;;
         -is) OTHER_ICONPATHS="
+                @PREFIX@/share/icons,
+                @PREFIX@/share/pixmaps,
+                @PREFIX@/share/icons/default/16x16,
+                @PREFIX@/share/icons/kde/16x16,
+                @PREFIX@/share/icons/default.kde/16x16,
+                @PREFIX@/share/icons/gnome/16x16,
+                @PREFIX@/share/icons/hicolor/16x16,
+                @PREFIX@/share/icons/locolor/16x16,
                 /usr/share/icons
                 /usr/share/icons/mini
                 /usr/share/pixmaps
@@ -1346,10 +1356,10 @@
             "
             shift;;
         -ds) OTHER_DESKTOP_PATHS="
-                /usr/share/mimelnk 
-                /usr/share/applications
-                /usr/share/xsessions 
-                /usr/share/services 
+                @PREFIX@/share/mimelnk 
+                @PREFIX@/share/applications
+                @PREFIX@/share/xsessions 
+                @PREFIX@/share/services 
             "
             # /usr/share/apps \
             shift;;
@@ -1426,7 +1436,7 @@
 
 
 # gnome prefix
-for GNOME_PREFIX in "${GNOME_PREFIX}" /usr/local /usr/X11R6 /usr /opt "${PREFIX}"; do
+for GNOME_PREFIX in "${GNOME_PREFIX}" @PREFIX@ /usr/local /opt/X11 /usr/X11 /usr/X11R6 /usr /opt "${PREFIX}"; do
     if [ -n "${GNOME_PREFIX}" -a -d "$GNOME_PREFIX/share/gnome" ]; then
         break;
     fi
@@ -1434,7 +1444,7 @@
 # Will remain $PREFIX if all else fails
 
 # kde prefix
-for KDE_PREFIX in "${KDE_PREFIX}" /usr/local /usr/X11R6 /usr /opt "${PREFIX}"; do
+for KDE_PREFIX in "${KDE_PREFIX}" @PREFIX@ /usr/local /opt/X11 /usr/X11 /usr/X11R6 /usr /opt "${PREFIX}"; do
     if [ -n "${KDE_PREFIX}" -a -d "$KDE_PREFIX/share/applnk" ]; then
         break;
     fi
diff -Nurd -x'*~' fluxbox-1.3.7.orig/util/fluxbox-remote.cc fluxbox-1.3.7/util/fluxbox-remote.cc
--- fluxbox-1.3.7.orig/util/fluxbox-remote.cc	2015-02-08 05:44:45.000000000 -0500
+++ fluxbox-1.3.7/util/fluxbox-remote.cc	2018-01-16 16:45:53.000000000 -0500
@@ -73,7 +73,7 @@
     if (strcmp(cmd, "result") == 0) {
         XTextProperty text_prop;
         if (XGetTextProperty(disp, root, &text_prop, atom_result) != 0
-            && text_prop.value > 0
+            && text_prop.value != 0
             && text_prop.nitems > 0) {
 
             printf("%s", text_prop.value);
