Fri Jan 7 17:32:12 2022 UTC ()
fluxbox: add an upstream patch to fix window sizing edge cases


(gutteridge)
diff -r1.72 -r1.73 pkgsrc/wm/fluxbox/Makefile
diff -r1.38 -r1.39 pkgsrc/wm/fluxbox/distinfo
diff -r1.2 -r1.3 pkgsrc/wm/fluxbox/patches/patch-bj

cvs diff -r1.72 -r1.73 pkgsrc/wm/fluxbox/Makefile (expand / switch to unified diff)

--- pkgsrc/wm/fluxbox/Makefile 2020/09/25 12:25:10 1.72
+++ pkgsrc/wm/fluxbox/Makefile 2022/01/07 17:32:12 1.73
@@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
1# $NetBSD: Makefile,v 1.72 2020/09/25 12:25:10 nia Exp $ 1# $NetBSD: Makefile,v 1.73 2022/01/07 17:32:12 gutteridge Exp $
2 2
3DISTNAME= fluxbox-1.3.7 3DISTNAME= fluxbox-1.3.7
4PKGREVISION= 5 4PKGREVISION= 6
5CATEGORIES= wm x11 5CATEGORIES= wm x11
6MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=fluxbox/} 6MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=fluxbox/}
7EXTRACT_SUFX= .tar.bz2 7EXTRACT_SUFX= .tar.bz2
8 8
9MAINTAINER= sborrill@NetBSD.org 9MAINTAINER= sborrill@NetBSD.org
10HOMEPAGE= http://fluxbox.sourceforge.net/ 10HOMEPAGE= http://fluxbox.sourceforge.net/
11COMMENT= Window Manager for X based on Blackbox 11COMMENT= Window Manager for X based on Blackbox
12LICENSE= mit 12LICENSE= mit
13 13
14USE_LANGUAGES= c c++ 14USE_LANGUAGES= c c++
15GNU_CONFIGURE= YES 15GNU_CONFIGURE= YES
16USE_TOOLS+= gmake pkg-config 16USE_TOOLS+= gmake pkg-config
17USE_LIBTOOL= YES 17USE_LIBTOOL= YES

cvs diff -r1.38 -r1.39 pkgsrc/wm/fluxbox/distinfo (expand / switch to unified diff)

--- pkgsrc/wm/fluxbox/distinfo 2021/10/26 11:25:12 1.38
+++ pkgsrc/wm/fluxbox/distinfo 2022/01/07 17:32:12 1.39
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1$NetBSD: distinfo,v 1.38 2021/10/26 11:25:12 nia Exp $ 1$NetBSD: distinfo,v 1.39 2022/01/07 17:32:12 gutteridge Exp $
2 2
3BLAKE2s (fluxbox-1.3.7.tar.bz2) = c3dfa1e8b204c4874ba372af05402b7a277bb1ebac2e7cc15c92c608ea26bdf7 3BLAKE2s (fluxbox-1.3.7.tar.bz2) = c3dfa1e8b204c4874ba372af05402b7a277bb1ebac2e7cc15c92c608ea26bdf7
4SHA512 (fluxbox-1.3.7.tar.bz2) = c40cc765f5d542210e18dca21b98b97a048c6685b605a68e2c64f4e886329f4e6d3a3a7e76b3ca0ce488242f38d0ee2a4d6dfebc9ce97d37c68f84c3948aac8c 4SHA512 (fluxbox-1.3.7.tar.bz2) = c40cc765f5d542210e18dca21b98b97a048c6685b605a68e2c64f4e886329f4e6d3a3a7e76b3ca0ce488242f38d0ee2a4d6dfebc9ce97d37c68f84c3948aac8c
5Size (fluxbox-1.3.7.tar.bz2) = 911098 bytes 5Size (fluxbox-1.3.7.tar.bz2) = 911098 bytes
6SHA1 (patch-aa) = e237a1b172c95fe5f251ab8795ed63c1888be83b 6SHA1 (patch-aa) = e237a1b172c95fe5f251ab8795ed63c1888be83b
7SHA1 (patch-af) = 871c9ce0bdfecda2c4180bd33b21186111ddecac 7SHA1 (patch-af) = 871c9ce0bdfecda2c4180bd33b21186111ddecac
8SHA1 (patch-bd) = 75532deb83a0f7e8c91f43acb0299d46d69496ba 8SHA1 (patch-bd) = 75532deb83a0f7e8c91f43acb0299d46d69496ba
9SHA1 (patch-be) = 0c8c0cfa12bbfeca28d76b12b488777b589bb43a 9SHA1 (patch-be) = 0c8c0cfa12bbfeca28d76b12b488777b589bb43a
10SHA1 (patch-bf) = 7da25f4e9a0e738da7c24264a91e6ab036d5acf2 10SHA1 (patch-bf) = 7da25f4e9a0e738da7c24264a91e6ab036d5acf2
11SHA1 (patch-bg) = 8f4decdb2ff611dcc1af64145801fac35f83e25a 11SHA1 (patch-bg) = 8f4decdb2ff611dcc1af64145801fac35f83e25a
12SHA1 (patch-bj) = 9b0ac35028644b142073a498bc3d59324c51d349 12SHA1 (patch-bj) = baf714907cce1f71e69f85c80d8f98efeeeaf86f
13SHA1 (patch-bk) = ae0c9857dd0cd203c8ae3f4bf5a0c7126cf48c92 13SHA1 (patch-bk) = ae0c9857dd0cd203c8ae3f4bf5a0c7126cf48c92
14SHA1 (patch-data_keys) = 79820ca4fd89227e24ae71bb1278f49b3930af85 14SHA1 (patch-data_keys) = 79820ca4fd89227e24ae71bb1278f49b3930af85
15SHA1 (patch-src_fluxbox.cc) = a652d685cd80896b45bfa7b2dfd5e98b2561e326 15SHA1 (patch-src_fluxbox.cc) = a652d685cd80896b45bfa7b2dfd5e98b2561e326
16SHA1 (patch-util_fluxbox-remote.cc) = fa2389ad36f41a6080a43ad1755cd5ad904a27cf 16SHA1 (patch-util_fluxbox-remote.cc) = fa2389ad36f41a6080a43ad1755cd5ad904a27cf

cvs diff -r1.2 -r1.3 pkgsrc/wm/fluxbox/patches/patch-bj (expand / switch to unified diff)

--- pkgsrc/wm/fluxbox/patches/patch-bj 2012/04/17 20:08:06 1.2
+++ pkgsrc/wm/fluxbox/patches/patch-bj 2022/01/07 17:32:12 1.3
@@ -1,18 +1,49 @@ @@ -1,18 +1,49 @@
1$NetBSD: patch-bj,v 1.2 2012/04/17 20:08:06 bsiegert Exp $ 1$NetBSD: patch-bj,v 1.3 2022/01/07 17:32:12 gutteridge Exp $
2 2
3--- src/Window.cc.orig Sat Oct 29 13:45:51 2011 3Fix builds with the SunPro compiler.
 4
 5Handle oversized windows: prevent both opposing edges from being offscreen.
 6https://github.com/fluxbox/fluxbox/commit/299e098f5f6fc6d33684b3d4e80185c8a7899664
 7
 8--- src/Window.cc.orig 2015-02-08 10:44:45.373187009 +0000
4+++ src/Window.cc 9+++ src/Window.cc
5@@ -185,9 +185,10 @@ void lowerFluxboxWindow(FluxboxWindow &w 10@@ -166,9 +166,10 @@ void lowerFluxboxWindow(FluxboxWindow &w
6 win.screen().layerManager().lock(); 11 win.screen().layerManager().lock();
7  12
8 // lower the windows from the top down, so they don't change stacking order 13 // lower the windows from the top down, so they don't change stacking order
9- const WinClient::TransientList& transients = win.winClient().transientList(); 14- const WinClient::TransientList& transients = win.winClient().transientList();
10- WinClient::TransientList::const_reverse_iterator it = transients.rbegin(); 15- WinClient::TransientList::const_reverse_iterator it = transients.rbegin();
11- WinClient::TransientList::const_reverse_iterator it_end = transients.rend(); 16- WinClient::TransientList::const_reverse_iterator it_end = transients.rend();
12+ // XXX: I'd rather use a const_reverse_iterator here, but sunpro has problems with it. 17+ // XXX: I'd rather use a const_reverse_iterator here, but sunpro has problems with it.
13+ WinClient::TransientList& transients = win.winClient().transientList(); 18+ WinClient::TransientList& transients = win.winClient().transientList();
14+ WinClient::TransientList::reverse_iterator it = transients.rbegin(); 19+ WinClient::TransientList::reverse_iterator it = transients.rbegin();
15+ WinClient::TransientList::reverse_iterator it_end = transients.rend(); 20+ WinClient::TransientList::reverse_iterator it_end = transients.rend();
16 for (; it != it_end; ++it) { 21 for (; it != it_end; ++it) {
17 if ((*it)->fbwindow() && !(*it)->fbwindow()->isIconic()) 22 if ((*it)->fbwindow() && !(*it)->fbwindow()->isIconic())
18 // TODO: should we also check if it is the active client? 23 // TODO: should we also check if it is the active client?
 24@@ -478,6 +479,25 @@ void FluxboxWindow::init() {
 25
 26 fluxbox.attachSignals(*this);
 27
 28+ if (!m_state.fullscreen) {
 29+ unsigned int new_width = 0, new_height = 0;
 30+ if (m_client->width() >= screen().width()) {
 31+ m_state.maximized |= WindowState::MAX_HORZ;
 32+ new_width = 2 * screen().width() / 3;
 33+ }
 34+ if (m_client->height() >= screen().height()) {
 35+ m_state.maximized |= WindowState::MAX_VERT;
 36+ new_height = 2 * screen().height() / 3;
 37+ }
 38+ if (new_width || new_height) {
 39+ const int maximized = m_state.maximized;
 40+ m_state.maximized = WindowState::MAX_NONE;
 41+ resize(new_width ? new_width : width(), new_height ? new_height : height());
 42+ m_placed = false;
 43+ m_state.maximized = maximized;
 44+ }
 45+ }
 46+
 47 // this window is managed, we are now allowed to modify actual state
 48 m_initialized = true;
 49