diff --git a/x11-wm/blackbox/Makefile b/x11-wm/blackbox/Makefile index c4097601a3f0..73b775d435b8 100644 --- a/x11-wm/blackbox/Makefile +++ b/x11-wm/blackbox/Makefile @@ -1,55 +1,55 @@ PORTNAME= blackbox PORTVERSION= 0.70.1 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= x11-wm MASTER_SITES= SF/${PORTNAME}wm/${PORTNAME}wm/Blackbox%20${PORTVERSION} MAINTAINER= A.J.Caines@halplant.com COMMENT= Small and fast window manager for X11R6 WWW= http://blackboxwm.sourceforge.net/ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE USES= pathfix pkgconfig iconv xorg USE_CXXSTD= c++14 USE_XORG= x11 xft GNU_CONFIGURE= yes LDFLAGS+= ${ICONV_LIB} PORTDOCS= README.bbtools README.bsetbg OPTIONS_DEFINE= TOOLS_ONLY DOCS TOOLS_ONLY_DESC= Do not install window manager, only tools TOOLS_ONLY_MAKE_ARGS= SUBDIRS="doc lib util" bin_PROGRAMS=bsetroot TOOLS_ONLY_INSTALL_TARGET= -C util install # XXX dirty hack :( TOOLS_ONLY_VARS= PKGNAMESUFFIX=-tools \ COMMENT+="(tools only)" TOOLS_ONLY_VARS_OFF= PORTDOCS+="AUTHORS COMPLIANCE ChangeLog README RELNOTES TODO" MANPAGES= bsetbg.1 bsetroot.1 .include .if ${ARCH} == armv6 || ${ARCH} == armv7 || ${ARCH} == powerpc EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src_Toolbar.cc .endif post-patch: # Fix the build with libX11 > 1.40 @${REINPLACE_CMD} -e 's/_XUTIL_H_/_X11&/' ${WRKSRC}/lib/Util.hh post-install: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S#^#${WRKSRC}/#} ${STAGEDIR}${DOCSDIR} post-install-TOOLS_ONLY-on: @${REINPLACE_CMD} -E '/[^s]\/blackbox|bstyleconvert|lib|include/d' \ ${TMPPLIST} ${INSTALL_MAN} ${MANPAGES:S#^#${WRKSRC}/doc/#} ${STAGEDIR}${MANPREFIX}/man/man1 .include diff --git a/x11-wm/blackbox/files/patch-src_Screen.cc b/x11-wm/blackbox/files/patch-src_Screen.cc index 4bb2df4678be..edab37f53e0b 100644 --- a/x11-wm/blackbox/files/patch-src_Screen.cc +++ b/x11-wm/blackbox/files/patch-src_Screen.cc @@ -1,19 +1,43 @@ --- src/Screen.cc.orig 2005-10-18 08:07:22 UTC +++ src/Screen.cc @@ -1870,11 +1870,12 @@ void BScreen::clientMessageEvent(const XClientMessageE if (event->message_type == _blackbox->ewmh().numberOfDesktops()) { unsigned int number = event->data.l[0]; - if (number > workspaceCount()) { - for (; number != workspaceCount(); --number) + unsigned int wsCount = workspaceCount(); + if (number > wsCount) { + for (; number != wsCount; --number) addWorkspace(); - } else if (number < workspaceCount()) { - for (; number != workspaceCount(); ++number) + } else if (number < wsCount) { + for (; number != wsCount; ++number) removeLastWorkspace(); } } else if (event->message_type == _blackbox->ewmh().desktopNames()) { +@@ -1927,12 +1928,12 @@ void BScreen::toggleFocusModel(FocusModel model) { + + void BScreen::toggleFocusModel(FocusModel model) { + std::for_each(windowList.begin(), windowList.end(), +- std::mem_fun(&BlackboxWindow::ungrabButtons)); ++ std::mem_fn(&BlackboxWindow::ungrabButtons)); + + _blackbox->resource().setFocusModel(model); + + std::for_each(windowList.begin(), windowList.end(), +- std::mem_fun(&BlackboxWindow::grabButtons)); ++ std::mem_fn(&BlackboxWindow::grabButtons)); + } + + +@@ -1976,7 +1977,7 @@ void BScreen::updateClientListHint(void) const { + bt::EWMH::WindowList clientList(windowList.size()); + + std::transform(windowList.begin(), windowList.end(), clientList.begin(), +- std::mem_fun(&BlackboxWindow::clientWindow)); ++ std::mem_fn(&BlackboxWindow::clientWindow)); + + _blackbox->ewmh().setClientList(screen_info.rootWindow(), clientList); + } diff --git a/x11-wm/blackbox/files/patch-src_blackbox.cc b/x11-wm/blackbox/files/patch-src_blackbox.cc index 0fbb12cbe04c..7821c234a12c 100644 --- a/x11-wm/blackbox/files/patch-src_blackbox.cc +++ b/x11-wm/blackbox/files/patch-src_blackbox.cc @@ -1,28 +1,53 @@ --- src/blackbox.cc.orig 2005-10-18 11:33:25 UTC +++ src/blackbox.cc @@ -27,6 +27,8 @@ #include "Slit.hh" #include "Window.hh" +#include + #include #include #include @@ -36,6 +38,7 @@ #include #include #include +#include #include // #define FOCUS_DEBUG +@@ -113,7 +116,7 @@ void Blackbox::shutdown(void) { + XSetInputFocus(XDisplay(), PointerRoot, RevertToPointerRoot, XTime()); + + std::for_each(screen_list, screen_list + screen_list_count, +- std::mem_fun(&BScreen::shutdown)); ++ std::mem_fn(&BScreen::shutdown)); + + XSync(XDisplay(), false); + +@@ -367,7 +370,7 @@ void Blackbox::timeout(bt::Timer *) { + menuTimestamps.clear(); + + std::for_each(screen_list, screen_list + screen_list_count, +- std::mem_fun(&BScreen::reconfigure)); ++ std::mem_fn(&BScreen::reconfigure)); + + bt::Font::clearCache(); + bt::PixmapCache::clearCache(); @@ -422,7 +425,7 @@ Blackbox::Blackbox(char **m_argv, const char *dpy_name if (managed == 0) { fprintf(stderr, "%s: no managable screens found, exiting...\n", applicationName().c_str()); - ::exit(3); + std::exit(3); } screen_list_count = managed; +@@ -620,5 +623,5 @@ void Blackbox::rereadMenu(void) { + menuTimestamps.clear(); + + std::for_each(screen_list, screen_list + screen_list_count, +- std::mem_fun(&BScreen::rereadMenu)); ++ std::mem_fn(&BScreen::rereadMenu)); + }