head 1.3; access; symbols pkgsrc-2021Q1:1.2.0.44 pkgsrc-2021Q1-base:1.2 pkgsrc-2020Q4:1.2.0.42 pkgsrc-2020Q4-base:1.2 pkgsrc-2020Q3:1.2.0.40 pkgsrc-2020Q3-base:1.2 pkgsrc-2020Q2:1.2.0.36 pkgsrc-2020Q2-base:1.2 pkgsrc-2020Q1:1.2.0.16 pkgsrc-2020Q1-base:1.2 pkgsrc-2019Q4:1.2.0.38 pkgsrc-2019Q4-base:1.2 pkgsrc-2019Q3:1.2.0.34 pkgsrc-2019Q3-base:1.2 pkgsrc-2019Q2:1.2.0.32 pkgsrc-2019Q2-base:1.2 pkgsrc-2019Q1:1.2.0.30 pkgsrc-2019Q1-base:1.2 pkgsrc-2018Q4:1.2.0.28 pkgsrc-2018Q4-base:1.2 pkgsrc-2018Q3:1.2.0.26 pkgsrc-2018Q3-base:1.2 pkgsrc-2018Q2:1.2.0.24 pkgsrc-2018Q2-base:1.2 pkgsrc-2018Q1:1.2.0.22 pkgsrc-2018Q1-base:1.2 pkgsrc-2017Q4:1.2.0.20 pkgsrc-2017Q4-base:1.2 pkgsrc-2017Q3:1.2.0.18 pkgsrc-2017Q3-base:1.2 pkgsrc-2017Q2:1.2.0.14 pkgsrc-2017Q2-base:1.2 pkgsrc-2017Q1:1.2.0.12 pkgsrc-2017Q1-base:1.2 pkgsrc-2016Q4:1.2.0.10 pkgsrc-2016Q4-base:1.2 pkgsrc-2016Q3:1.2.0.8 pkgsrc-2016Q3-base:1.2 pkgsrc-2016Q2:1.2.0.6 pkgsrc-2016Q2-base:1.2 pkgsrc-2016Q1:1.2.0.4 pkgsrc-2016Q1-base:1.2 pkgsrc-2015Q4:1.2.0.2 pkgsrc-2015Q4-base:1.2 pkgsrc-2015Q3:1.1.0.32 pkgsrc-2015Q3-base:1.1 pkgsrc-2015Q2:1.1.0.30 pkgsrc-2015Q2-base:1.1 pkgsrc-2015Q1:1.1.0.28 pkgsrc-2015Q1-base:1.1 pkgsrc-2014Q4:1.1.0.26 pkgsrc-2014Q4-base:1.1 pkgsrc-2014Q3:1.1.0.24 pkgsrc-2014Q3-base:1.1 pkgsrc-2014Q2:1.1.0.22 pkgsrc-2014Q2-base:1.1 pkgsrc-2014Q1:1.1.0.20 pkgsrc-2014Q1-base:1.1 pkgsrc-2013Q4:1.1.0.18 pkgsrc-2013Q4-base:1.1 pkgsrc-2013Q3:1.1.0.16 pkgsrc-2013Q3-base:1.1 pkgsrc-2013Q2:1.1.0.14 pkgsrc-2013Q2-base:1.1 pkgsrc-2013Q1:1.1.0.12 pkgsrc-2013Q1-base:1.1 pkgsrc-2012Q4:1.1.0.10 pkgsrc-2012Q4-base:1.1 pkgsrc-2012Q3:1.1.0.8 pkgsrc-2012Q3-base:1.1 pkgsrc-2012Q2:1.1.0.6 pkgsrc-2012Q2-base:1.1 pkgsrc-2012Q1:1.1.0.4 pkgsrc-2012Q1-base:1.1 pkgsrc-2011Q4:1.1.0.2 pkgsrc-2011Q4-base:1.1; locks; strict; comment @// @; 1.3 date 2021.06.10.12.48.49; author nia; state dead; branches; next 1.2; commitid Em8IzcSKkW6PkAWC; 1.2 date 2015.11.17.15.59.13; author he; state Exp; branches; next 1.1; commitid BKxofHBufkPkHsJy; 1.1 date 2011.11.25.22.21.28; author joerg; state Exp; branches; next ; desc @@ 1.3 log @Make wm/blackbox the latest version, remove weird versioned packages concept ok'd by gutteridge @ text @$NetBSD: patch-src_Netclient.cpp,v 1.2 2015/11/17 15:59:13 he Exp $ Fix LP64 problem with the X11 protocol handling, from FreeBSD. --- src/Netclient.cpp.orig 2008-12-22 01:10:19.000000000 +0000 +++ src/Netclient.cpp @@@@ -141,6 +141,7 @@@@ bool Netclient::getValue(Window win, Ato int result; unsigned long maxread = nelements; bool ret = False; + int bsize; // try get the first element result = XGetWindowProperty(_display.XDisplay(), win, atom, 0l, 1l, False, @@@@ -149,18 +150,19 @@@@ bool Netclient::getValue(Window win, Ato ret = (result == Success && ret_type == type && ret_size == size && nelements > 0); if (ret) { + bsize = (size == 32) ? sizeof(long) : size/8; if (ret_bytes == 0 || maxread <= nelements) { // we got the whole property's value - *value = new unsigned char[nelements * size/8 + 1]; - memcpy(*value, c_val, nelements * size/8 + 1); + *value = new unsigned char[nelements * bsize + 1]; + memcpy(*value, c_val, nelements * bsize + 1); } else { // get the entire property since it is larger than one long XFree(c_val); // the number of longs that need to be retreived to get the property's // entire value. The last + 1 is the first long that we retrieved above. int remain = (ret_bytes - 1)/sizeof(long) + 1 + 1; - if (remain > size/8 * (signed)maxread) // dont get more than the max - remain = size/8 * (signed)maxread; + if (remain > bsize * (signed)maxread) // dont get more than the max + remain = bsize * (signed)maxread; result = XGetWindowProperty(_display.XDisplay(), win, atom, 0l, remain, False, type, &ret_type, &ret_size, &nelements, &ret_bytes, &c_val); @@@@ -174,8 +176,8 @@@@ bool Netclient::getValue(Window win, Ato if (! ret) return getValue(win, atom, type, maxread, value, size); - *value = new unsigned char[nelements * size/8 + 1]; - memcpy(*value, c_val, nelements * size/8 + 1); + *value = new unsigned char[nelements * bsize + 1]; + memcpy(*value, c_val, nelements * bsize + 1); } } if (c_val) XFree(c_val); @ 1.2 log @Update bbkeys to version 0.9.1. Pkgsrc changes: * Add a bugfix patch for an LP64 problem in the X11 protocol handling, from FreeBSD ports tree * Add a patch to complete initialization of pointers, also from FreeBSD * Add dependency on libXft, it appears to be required Upstream changes: * Add sendToPreviousWorkspace and sendToNextWorkspace functions * Add new config option: followWindowOnSend, allows bbkeys to change workspace to the space it just sent a window to * Fix for underquoted definitions in configure.ac * Fix annoying behaviour when cycling through windows on all workspaces, no longer flip workspace when doing this * Add config option includeIconifiedWindowsInCycle to include iconified windows in window cycling list @ text @d1 1 a1 1 $NetBSD: patch-src_Netclient.cpp,v 1.1 2011/11/25 22:21:28 joerg Exp $ @ 1.1 log @Fix build with modern GCC @ text @d1 1 a1 1 $NetBSD$ d3 3 a5 1 --- src/Netclient.cpp.orig 2011-11-25 17:00:35.000000000 +0000 d7 5 a11 9 @@@@ -21,9 +21,9 @@@@ // DEALINGS IN THE SOFTWARE. // E_O_H_VR +#include // Methods, ideas, implementations taken from Openbox's XAtom class *sigh* - #include "Netclient.h" d13 37 a49 1 Netclient::Netclient (const bt::Display &display) @