some focus changes. workspace contains a focused window instead of openbox class. this fixes a seg
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
-
for ac_prog in sed
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1243: checking for $ac_word" >&5
+echo "configure:1235: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_regex_cmd'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
{ echo "configure: error: error. sed is required to build the default menu file." 1>&2; exit 1; }
fi
-echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
-echo "configure:1277: checking how to run the C++ preprocessor" >&5
-if test -z "$CXXCPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:1269: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
- CXXCPP="${CXX-g++} -E"
+ # This must be in double quotes, not single quotes, because CPP may get
+ # substituted into the Makefile and "${CC-cc}" will confuse make.
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1290 "configure"
+#line 1284 "configure"
#include "confdefs.h"
-#include <stdlib.h>
+#include <assert.h>
+Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- CXXCPP=/lib/cpp
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+#line 1301 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+#line 1318 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP=/lib/cpp
fi
rm -f conftest*
- ac_cv_prog_CXXCPP="$CXXCPP"
-ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
fi
+rm -f conftest*
+fi
+rm -f conftest*
+ ac_cv_prog_CPP="$CPP"
+fi
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
fi
-CXXCPP="$ac_cv_prog_CXXCPP"
-echo "$ac_t""$CXXCPP" 1>&6
+echo "$ac_t""$CPP" 1>&6
-for ac_hdr in ctype.h dirent.h fcntl.h libgen.h locale.h nl_types.h process.h signal.h stdarg.h stdio.h string.h stdlib.h time.h unistd.h sys/param.h sys/select.h sys/signal.h sys/stat.h sys/time.h sys/types.h sys/wait.h sstream
+for ac_hdr in ctype.h dirent.h fcntl.h libgen.h locale.h nl_types.h process.h signal.h stdarg.h stdio.h string.h stdlib.h time.h unistd.h sys/param.h sys/select.h sys/signal.h sys/stat.h sys/time.h sys/types.h sys/wait.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1323: checking for $ac_hdr" >&5
+echo "configure:1352: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1328 "configure"
+#line 1357 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
done
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1360: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:1389: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1365 "configure"
+#line 1394 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:1374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
for ac_func in basename
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1398: checking for $ac_func" >&5
+echo "configure:1427: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1403 "configure"
+#line 1432 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for basename in -lgen""... $ac_c" 1>&6
-echo "configure:1451: checking for basename in -lgen" >&5
+echo "configure:1477: checking for basename in -lgen" >&5
ac_lib_var=`echo gen'_'basename | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lgen $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1459 "configure"
+#line 1485 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char basename();
basename()
; return 0; }
EOF
-if { (eval echo configure:1473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
for ac_func in getpid setlocale sigaction strftime strcasestr snprintf vsnprintf catopen catgets catclose
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1502: checking for $ac_func" >&5
+echo "configure:1525: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1507 "configure"
+#line 1530 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
done
echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
-echo "configure:1558: checking for t_open in -lnsl" >&5
+echo "configure:1578: checking for t_open in -lnsl" >&5
ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1566 "configure"
+#line 1586 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char t_open();
t_open()
; return 0; }
EOF
-if { (eval echo configure:1580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
-echo "configure:1601: checking for socket in -lsocket" >&5
+echo "configure:1618: checking for socket in -lsocket" >&5
ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1609 "configure"
+#line 1626 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char socket();
socket()
; return 0; }
EOF
-if { (eval echo configure:1623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:1649: checking for X" >&5
+echo "configure:1663: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 1711 "configure"
+#line 1725 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1785 "configure"
+#line 1799 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:1792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
case "`(uname -sr) 2>/dev/null`" in
"SunOS 5"*)
echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
-echo "configure:1898: checking whether -R must be followed by a space" >&5
+echo "configure:1912: checking whether -R must be followed by a space" >&5
ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
cat > conftest.$ac_ext <<EOF
-#line 1901 "configure"
+#line 1915 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_R_nospace=yes
else
else
LIBS="$ac_xsave_LIBS -R $x_libraries"
cat > conftest.$ac_ext <<EOF
-#line 1924 "configure"
+#line 1938 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_R_space=yes
else
# libraries were built with DECnet support. And karl@cs.umb.edu says
# the Alpha needs dnet_stub (dnet does not exist).
echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:1963: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:1977: checking for dnet_ntoa in -ldnet" >&5
ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ldnet $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1971 "configure"
+#line 1985 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char dnet_ntoa();
dnet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:1985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:2007: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:2018: checking for dnet_ntoa in -ldnet_stub" >&5
ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ldnet_stub $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2015 "configure"
+#line 2026 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char dnet_ntoa();
dnet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:2029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# The nsl library prevents programs from opening the X display
# on Irix 5.2, according to dickey@clark.net.
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:2058: checking for gethostbyname" >&5
+echo "configure:2066: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2063 "configure"
+#line 2071 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char gethostbyname();
; return 0; }
EOF
-if { (eval echo configure:2089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_gethostbyname=yes"
else
if test $ac_cv_func_gethostbyname = no; then
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:2110: checking for gethostbyname in -lnsl" >&5
+echo "configure:2115: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2118 "configure"
+#line 2123 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char gethostbyname();
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:2132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# -lsocket must be given before -lnsl if both are needed.
# We assume that if connect needs -lnsl, so does gethostbyname.
echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:2162: checking for connect" >&5
+echo "configure:2164: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2167 "configure"
+#line 2169 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char connect();
; return 0; }
EOF
-if { (eval echo configure:2193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_connect=yes"
else
if test $ac_cv_func_connect = no; then
echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:2214: checking for connect in -lsocket" >&5
+echo "configure:2213: checking for connect in -lsocket" >&5
ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2222 "configure"
+#line 2221 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char connect();
connect()
; return 0; }
EOF
-if { (eval echo configure:2236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:2260: checking for remove" >&5
+echo "configure:2256: checking for remove" >&5
if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2265 "configure"
+#line 2261 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char remove(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char remove();
; return 0; }
EOF
-if { (eval echo configure:2291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_remove=yes"
else
if test $ac_cv_func_remove = no; then
echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:2312: checking for remove in -lposix" >&5
+echo "configure:2305: checking for remove in -lposix" >&5
ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lposix $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2320 "configure"
+#line 2313 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char remove();
remove()
; return 0; }
EOF
-if { (eval echo configure:2334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:2358: checking for shmat" >&5
+echo "configure:2348: checking for shmat" >&5
if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2363 "configure"
+#line 2353 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shmat(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char shmat();
; return 0; }
EOF
-if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_shmat=yes"
else
if test $ac_cv_func_shmat = no; then
echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:2410: checking for shmat in -lipc" >&5
+echo "configure:2397: checking for shmat in -lipc" >&5
ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lipc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2418 "configure"
+#line 2405 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char shmat();
shmat()
; return 0; }
EOF
-if { (eval echo configure:2432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# libraries we check for below, so use a different variable.
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
-echo "configure:2465: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:2449: checking for IceConnectionNumber in -lICE" >&5
ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lICE $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2473 "configure"
+#line 2457 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char IceConnectionNumber();
IceConnectionNumber()
; return 0; }
EOF
-if { (eval echo configure:2487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
LDFLAGS="$LDFLAGS $LIBS $X_PRE_LIBS"
echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
-echo "configure:2523: checking for XOpenDisplay in -lX11" >&5
+echo "configure:2504: checking for XOpenDisplay in -lX11" >&5
ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lX11 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2531 "configure"
+#line 2512 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char XOpenDisplay();
XOpenDisplay()
; return 0; }
EOF
-if { (eval echo configure:2545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
SHAPE=""
echo $ac_n "checking whether to build support for the XShape extension""... $ac_c" 1>&6
-echo "configure:2574: checking whether to build support for the XShape extension" >&5
+echo "configure:2552: checking whether to build support for the XShape extension" >&5
# Check whether --enable-shape or --disable-shape was given.
if test "${enable_shape+set}" = set; then
enableval="$enable_shape"
if test x$enableval = "xyes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for XShapeCombineShape in -lXext""... $ac_c" 1>&6
-echo "configure:2586: checking for XShapeCombineShape in -lXext" >&5
+echo "configure:2564: checking for XShapeCombineShape in -lXext" >&5
ac_lib_var=`echo Xext'_'XShapeCombineShape | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lXext $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2594 "configure"
+#line 2572 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char XShapeCombineShape();
XShapeCombineShape()
; return 0; }
EOF
-if { (eval echo configure:2608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
-echo "configure:2624: checking for X11/extensions/shape.h" >&5
+echo "configure:2599: checking for X11/extensions/shape.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 2626 "configure"
+#line 2601 "configure"
#include "confdefs.h"
#include <X11/Xlib.h>
#include <X11/Xutil.h>
long foo = ShapeSet
; return 0; }
EOF
-if { (eval echo configure:2636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
SHAPE="-DSHAPE"; Xext_lib="-lXext"
SLIT=""
echo $ac_n "checking whether to include the Slit""... $ac_c" 1>&6
-echo "configure:2662: checking whether to include the Slit" >&5
+echo "configure:2637: checking whether to include the Slit" >&5
# Check whether --enable-slit or --disable-slit was given.
if test "${enable_slit+set}" = set; then
enableval="$enable_slit"
NEWWMSPEC=""
echo $ac_n "checking whether to include the new WM Spec (DOES NOTHING)""... $ac_c" 1>&6
-echo "configure:2682: checking whether to include the new WM Spec (DOES NOTHING)" >&5
+echo "configure:2657: checking whether to include the new WM Spec (DOES NOTHING)" >&5
# Check whether --enable-newspec or --disable-newspec was given.
if test "${enable_newspec+set}" = set; then
enableval="$enable_newspec"
INTERLACE=""
echo $ac_n "checking whether to include interlacing image code""... $ac_c" 1>&6
-echo "configure:2702: checking whether to include interlacing image code" >&5
+echo "configure:2677: checking whether to include interlacing image code" >&5
# Check whether --enable-interlace or --disable-interlace was given.
if test "${enable_interlace+set}" = set; then
enableval="$enable_interlace"
ORDEREDPSEUDO=""
echo $ac_n "checking whether to include Pseudocolor ordered dithering code""... $ac_c" 1>&6
-echo "configure:2722: checking whether to include Pseudocolor ordered dithering code" >&5
+echo "configure:2697: checking whether to include Pseudocolor ordered dithering code" >&5
# Check whether --enable-ordered-pseudo or --disable-ordered-pseudo was given.
if test "${enable_ordered_pseudo+set}" = set; then
enableval="$enable_ordered_pseudo"
CLOBBER=""
echo $ac_n "checking whether to intercept mouse events to clients""... $ac_c" 1>&6
-echo "configure:2741: checking whether to intercept mouse events to clients" >&5
+echo "configure:2716: checking whether to intercept mouse events to clients" >&5
# Check whether --enable-clobber or --disable-clobber was given.
if test "${enable_clobber+set}" = set; then
enableval="$enable_clobber"
DEBUG=""
echo $ac_n "checking whether to include verbose debugging code""... $ac_c" 1>&6
-echo "configure:2760: checking whether to include verbose debugging code" >&5
+echo "configure:2735: checking whether to include verbose debugging code" >&5
# Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then
enableval="$enable_debug"
NLS=""
echo $ac_n "checking whether to include NLS support""... $ac_c" 1>&6
-echo "configure:2779: checking whether to include NLS support" >&5
+echo "configure:2754: checking whether to include NLS support" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
echo $ac_n "checking for setlocale in -lxpg4""... $ac_c" 1>&6
-echo "configure:2798: checking for setlocale in -lxpg4" >&5
+echo "configure:2773: checking for setlocale in -lxpg4" >&5
ac_lib_var=`echo xpg4'_'setlocale | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lxpg4 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2806 "configure"
+#line 2781 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char setlocale();
setlocale()
; return 0; }
EOF
-if { (eval echo configure:2820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2846: checking for $ac_word" >&5
+echo "configure:2818: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gencat_cmd'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
TIMEDCACHE=""
echo $ac_n "checking whether to use the new timed pixmap cache""... $ac_c" 1>&6
-echo "configure:2882: checking whether to use the new timed pixmap cache" >&5
+echo "configure:2854: checking whether to use the new timed pixmap cache" >&5
# Check whether --enable-timed-cache or --disable-timed-cache was given.
if test "${enable_timed_cache+set}" = set; then
enableval="$enable_timed_cache"
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:2901: checking return type of signal handlers" >&5
+echo "configure:2873: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2906 "configure"
+#line 2878 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int i;
; return 0; }
EOF
-if { (eval echo configure:2923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:2943: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:2915: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
s%@CC@%$CC%g
s%@CXX@%$CXX%g
s%@regex_cmd@%$regex_cmd%g
-s%@CXXCPP@%$CXXCPP%g
+s%@CPP@%$CPP%g
s%@X_CFLAGS@%$X_CFLAGS%g
s%@X_PRE_LIBS@%$X_PRE_LIBS%g
s%@X_LIBS@%$X_LIBS%g
AC_PROG_CXX
AC_PROG_INSTALL
-AC_LANG_CPLUSPLUS
-
AC_CHECK_PROGS(regex_cmd, sed)
if test x$regex_cmd = "x"; then
AC_MSG_ERROR([error. sed is required to build the default menu file.])
fi
dnl Check for system header files
-AC_CHECK_HEADERS(ctype.h dirent.h fcntl.h libgen.h locale.h nl_types.h process.h signal.h stdarg.h stdio.h string.h stdlib.h time.h unistd.h sys/param.h sys/select.h sys/signal.h sys/stat.h sys/time.h sys/types.h sys/wait.h sstream)
+AC_CHECK_HEADERS(ctype.h dirent.h fcntl.h libgen.h locale.h nl_types.h process.h signal.h stdarg.h stdio.h string.h stdlib.h time.h unistd.h sys/param.h sys/select.h sys/signal.h sys/stat.h sys/time.h sys/types.h sys/wait.h)
AC_HEADER_TIME
dnl Check for existance of basename(), setlocale() and strftime()
configmenu->screen.setSloppyFocus(false);
configmenu->screen.setAutoRaise(false);
- if (! configmenu->screen.getOpenbox().getFocusedWindow())
+ if (! configmenu->screen.getOpenbox().focusedWindow())
XSetInputFocus(configmenu->screen.getOpenbox().getXDisplay(),
configmenu->screen.getToolbar()->getWindowID(),
RevertToParent, CurrentTime);
else
XSetInputFocus(configmenu->screen.getOpenbox().getXDisplay(),
configmenu->screen.getOpenbox().
- getFocusedWindow()->getClientWindow(),
+ focusedWindow()->getClientWindow(),
RevertToParent, CurrentTime);
configmenu->screen.reconfigure();
#include <X11/Xatom.h>
#include <X11/keysym.h>
+#include <iostream>
#include "i18n.h"
#include "openbox.h"
#define FONT_ELEMENT_SIZE 50
#endif // FONT_ELEMENT_SIZE
-#ifdef HAVE_SSTREAM
-# include <sstream>
-#endif // HAVE_SSTREAM
+#include <strstream>
#include <string>
#include <algorithm>
+using namespace std;
static Bool running = True;
BTexture *texture,
unsigned long default_pixel)
{
- std::string s;
+ string s;
if (resource.styleconfig.getValue(rname, rclass, s))
image_control->parseTexture(texture, s.c_str());
void BScreen::readDatabaseColor(const char *rname, const char *rclass,
BColor *color, unsigned long default_pixel)
{
- std::string s;
+ string s;
if (resource.styleconfig.getValue(rname, rclass, s))
image_control->parseColor(color, s.c_str());
static char *defaultFont = "fixed";
bool load_default = false;
- std::string s;
+ string s;
if (*fontset)
XFreeFontSet(getBaseDisplay().getXDisplay(), *fontset);
static char *defaultFont = "fixed";
bool load_default = false;
- std::string s;
+ string s;
if (*font)
XFreeFont(getBaseDisplay().getXDisplay(), *font);
void BScreen::setSloppyFocus(bool b) {
resource.sloppy_focus = b;
- std::ostringstream s;
- s << "session.screen" << getScreenNumber() << ".focusModel";
+ ostrstream s;
+ s << "session.screen" << getScreenNumber() << ".focusModel" << ends;
config.setValue(s.str(),
(resource.sloppy_focus ?
(resource.auto_raise ? "AutoRaiseSloppyFocus" : "SloppyFocus")
: "ClickToFocus"));
+ s.rdbuf()->freeze(0);
}
void BScreen::setAutoRaise(bool a) {
resource.auto_raise = a;
- std::ostringstream s;
- s << "session.screen" << getScreenNumber() << ".focusModel";
+ ostrstream s;
+ s << "session.screen" << getScreenNumber() << ".focusModel" << ends;
config.setValue(s.str(),
(resource.sloppy_focus ?
(resource.auto_raise ? "AutoRaiseSloppyFocus" : "SloppyFocus")
: "ClickToFocus"));
+ s.rdbuf()->freeze(0);
}
void BScreen::setImageDither(bool d, bool reconfig) {
resource.image_dither = d;
image_control->setDither(d);
- std::ostringstream s;
- s << "session.screen" << getScreenNumber() << ".imageDither";
+ ostrstream s;
+ s << "session.screen" << getScreenNumber() << ".imageDither" << ends;
config.setValue(s.str(), resource.image_dither);
if (reconfig)
reconfigure();
+ s.rdbuf()->freeze(0);
}
void BScreen::setOpaqueMove(bool o) {
resource.opaque_move = o;
- std::ostringstream s;
- s << "session.screen" << getScreenNumber() << ".opaqueMove";
+ ostrstream s;
+ s << "session.screen" << getScreenNumber() << ".opaqueMove" << ends;
config.setValue(s.str(), resource.opaque_move);
+ s.rdbuf()->freeze(0);
}
void BScreen::setFullMax(bool f) {
resource.full_max = f;
- std::ostringstream s;
- s << "session.screen" << getScreenNumber() << ".fullMaximization";
+ ostrstream s;
+ s << "session.screen" << getScreenNumber() << ".fullMaximization" << ends;
config.setValue(s.str(), resource.full_max);
-#ifndef HAVE_SSTREAM
s.rdbuf()->freeze(0);
-#endif // HAVE_SSTREAM
}
void BScreen::setFocusNew(bool f) {
resource.focus_new = f;
- std::ostringstream s;
- s << "session.screen" << getScreenNumber() << ".focusNewWindows";
+ ostrstream s;
+ s << "session.screen" << getScreenNumber() << ".focusNewWindows" << ends;
config.setValue(s.str(), resource.focus_new);
+ s.rdbuf()->freeze(0);
}
void BScreen::setFocusLast(bool f) {
resource.focus_last = f;
- std::ostringstream s;
- s << "session.screen" << getScreenNumber() << ".focusLastWindow";
+ ostrstream s;
+ s << "session.screen" << getScreenNumber() << ".focusLastWindow" << ends;
config.setValue(s.str(), resource.focus_last);
+ s.rdbuf()->freeze(0);
}
void BScreen::setWindowZones(int z) {
resource.zones = z;
- std::ostringstream s;
- s << "session.screen" << getScreenNumber() << ".windowZones";
+ ostrstream s;
+ s << "session.screen" << getScreenNumber() << ".windowZones" << ends;
config.setValue(s.str(), resource.zones);
+ s.rdbuf()->freeze(0);
}
void BScreen::setWorkspaceCount(int w) {
resource.workspaces = w;
- std::ostringstream s;
- s << "session.screen" << getScreenNumber() << ".workspaces";
+ ostrstream s;
+ s << "session.screen" << getScreenNumber() << ".workspaces" << ends;
config.setValue(s.str(), resource.workspaces);
+ s.rdbuf()->freeze(0);
}
void BScreen::setPlacementPolicy(int p) {
resource.placement_policy = p;
- std::ostringstream s;
- s << "session.screen" << getScreenNumber() << ".windowPlacement";
+ ostrstream s;
+ s << "session.screen" << getScreenNumber() << ".windowPlacement" << ends;
const char *placement;
switch (resource.placement_policy) {
case CascadePlacement: placement = "CascadePlacement"; break;
case RowSmartPlacement: placement = "RowSmartPlacement"; break;
}
config.setValue(s.str(), placement);
+ s.rdbuf()->freeze(0);
}
void BScreen::setEdgeSnapThreshold(int t) {
resource.edge_snap_threshold = t;
- std::ostringstream s;
- s << "session.screen" << getScreenNumber() << ".edgeSnapThreshold";
+ ostrstream s;
+ s << "session.screen" << getScreenNumber() << ".edgeSnapThreshold" << ends;
config.setValue(s.str(), resource.edge_snap_threshold);
+ s.rdbuf()->freeze(0);
}
void BScreen::setRowPlacementDirection(int d) {
resource.row_direction = d;
- std::ostringstream s;
- s << "session.screen" << getScreenNumber() << ".rowPlacementDirection";
+ ostrstream s;
+ s << "session.screen" << getScreenNumber() << ".rowPlacementDirection" << ends;
config.setValue(s.str(),
resource.row_direction == LeftRight ?
"LeftToRight" : "RightToLeft");
+ s.rdbuf()->freeze(0);
}
void BScreen::setColPlacementDirection(int d) {
resource.col_direction = d;
- std::ostringstream s;
- s << "session.screen" << getScreenNumber() << ".colPlacementDirection";
+ ostrstream s;
+ s << "session.screen" << getScreenNumber() << ".colPlacementDirection" << ends;
config.setValue(s.str(),
resource.col_direction == TopBottom ?
"TopToBottom" : "BottomToTop");
+ s.rdbuf()->freeze(0);
}
delete [] resource.strftime_format;
resource.strftime_format = bstrdup(f);
- std::ostringstream s;
- s << "session.screen" << getScreenNumber() << ".strftimeFormat";
+ ostrstream s;
+ s << "session.screen" << getScreenNumber() << ".strftimeFormat" << ends;
config.setValue(s.str(), resource.strftime_format);
+ s.rdbuf()->freeze(0);
}
#else // !HAVE_STRFTIME
void BScreen::setDateFormat(int f) {
resource.date_format = f;
- std::ostringstream s;
- s << "session.screen" << getScreenNumber() << ".dateFormat";
+ ostrstream s;
+ s << "session.screen" << getScreenNumber() << ".dateFormat" << ends;
config.setValue(s.str(), resource.date_format == B_EuropeanDate ?
"European" : "American");
+ s.rdbuf()->freeze(0);
}
void BScreen::setClock24Hour(Bool c) {
resource.clock24hour = c;
- std::ostringstream s;
- s << "session.screen" << getScreenNumber() << ".clockFormat";
+ ostrstream s;
+ s << "session.screen" << getScreenNumber() << ".clockFormat" << ends;
config.setValue(s.str(), resource.clock24hour ? 24 : 12);
+ s.rdbuf()->freeze(0);
}
#endif // HAVE_STRFTIME
getToolbar()->unMapToolbar();
else
getToolbar()->mapToolbar();
- std::ostringstream s;
- s << "session.screen" << getScreenNumber() << ".hideToolbar";
+ ostrstream s;
+ s << "session.screen" << getScreenNumber() << ".hideToolbar" << ends;
config.setValue(s.str(), resource.hide_toolbar ? "True" : "False");
+ s.rdbuf()->freeze(0);
}
void BScreen::saveWorkspaceNames() {
- std::ostringstream rc, names;
+ ostrstream rc, names;
for (int i = 0; i < resource.workspaces; i++) {
Workspace *w = getWorkspace(i);
names << ',';
}
}
- names;
+ names << ends;
- rc << "session.screen" << getScreenNumber() << ".workspaceNames";
+ rc << "session.screen" << getScreenNumber() << ".workspaceNames" << ends;
config.setValue(rc.str(), names.str());
+ rc.rdbuf()->freeze(0);
+ names.rdbuf()->freeze(0);
}
void BScreen::save() {
#ifdef HAVE_STRFTIME
// it deletes the current value before setting the new one, so we have to
// duplicate the current value.
- std::string s = resource.strftime_format;
+ string s = resource.strftime_format;
setStrftimeFormat(s.c_str());
#else // !HAVE_STRFTIME
setDateFormat(resource.date_format);
}
void BScreen::load() {
- std::ostringstream rscreen, rname, rclass;
- std::string s;
+ ostrstream rscreen, rname, rclass;
+ string s;
bool b;
long l;
- rscreen << "session.screen" << getScreenNumber() << '.';
+ rscreen << "session.screen" << getScreenNumber() << '.' << ends;
- rname << rscreen.str() << "hideToolbar";
- rclass << rscreen.str() << "HideToolbar";
+ rname << rscreen.str() << "hideToolbar" << ends;
+ rclass << rscreen.str() << "HideToolbar" << ends;
if (config.getValue(rname.str(), rclass.str(), b))
resource.hide_toolbar = b;
else
}
rname.seekp(0); rclass.seekp(0);
- rname << rscreen.str() << "fullMaximization";
- rclass << rscreen.str() << "FullMaximization";
+ rname << rscreen.str() << "fullMaximization" << ends;
+ rclass << rscreen.str() << "FullMaximization" << ends;
if (config.getValue(rname.str(), rclass.str(), b))
resource.full_max = b;
else
resource.full_max = false;
rname.seekp(0); rclass.seekp(0);
- rname << rscreen.str() << "focusNewWindows";
- rclass << rscreen.str() << "FocusNewWindows";
+ rname << rscreen.str() << "focusNewWindows" << ends;
+ rclass << rscreen.str() << "FocusNewWindows" << ends;
if (config.getValue(rname.str(), rclass.str(), b))
resource.focus_new = b;
else
resource.focus_new = false;
rname.seekp(0); rclass.seekp(0);
- rname << rscreen.str() << "focusLastWindow";
- rclass << rscreen.str() << "FocusLastWindow";
+ rname << rscreen.str() << "focusLastWindow" << ends;
+ rclass << rscreen.str() << "FocusLastWindow" << ends;
if (config.getValue(rname.str(), rclass.str(), b))
resource.focus_last = b;
else
resource.focus_last = false;
rname.seekp(0); rclass.seekp(0);
- rname << rscreen.str() << "rowPlacementDirection";
- rclass << rscreen.str() << "RowPlacementDirection";
+ rname << rscreen.str() << "rowPlacementDirection" << ends;
+ rclass << rscreen.str() << "RowPlacementDirection" << ends;
if (config.getValue(rname.str(), rclass.str(), s)) {
if (0 == strncasecmp(s.c_str(), "RightToLeft", s.length()))
resource.row_direction = RightLeft;
resource.row_direction = LeftRight;
rname.seekp(0); rclass.seekp(0);
- rname << rscreen.str() << "colPlacementDirection";
- rclass << rscreen.str() << "ColPlacementDirection";
+ rname << rscreen.str() << "colPlacementDirection" << ends;
+ rclass << rscreen.str() << "ColPlacementDirection" << ends;
if (config.getValue(rname.str(), rclass.str(), s)) {
if (0 == strncasecmp(s.c_str(), "BottomToTop", s.length()))
resource.col_direction = BottomTop;
resource.col_direction = TopBottom;
rname.seekp(0); rclass.seekp(0);
- rname << rscreen.str() << "workspaces";
- rclass << rscreen.str() << "Workspaces";
+ rname << rscreen.str() << "workspaces" << ends;
+ rclass << rscreen.str() << "Workspaces" << ends;
if (config.getValue(rname.str(), rclass.str(), l))
resource.workspaces = l;
else
removeWorkspaceNames();
rname.seekp(0); rclass.seekp(0);
- rname << rscreen.str() << "workspaceNames";
- rclass << rscreen.str() << "WorkspaceNames";
+ rname << rscreen.str() << "workspaceNames" << ends;
+ rclass << rscreen.str() << "WorkspaceNames" << ends;
if (config.getValue(rname.str(), rclass.str(), s)) {
- std::string::const_iterator it = s.begin(), end = s.end();
+ string::const_iterator it = s.begin(), end = s.end();
while(1) {
- std::string::const_iterator tmp = it;// current string.begin()
+ string::const_iterator tmp = it;// current string.begin()
it = std::find(tmp, end, ','); // look for comma between tmp and end
- std::string name(tmp, it); // name = s[tmp:it]
+ string name(tmp, it); // name = s[tmp:it]
addWorkspaceName(name.c_str());
if (it == end)
break;
}
rname.seekp(0); rclass.seekp(0);
- rname << rscreen.str() << "focusModel";
- rclass << rscreen.str() << "FocusModel";
+ rname << rscreen.str() << "focusModel" << ends;
+ rclass << rscreen.str() << "FocusModel" << ends;
if (config.getValue(rname.str(), rclass.str(), s)) {
if (0 == strncasecmp(s.c_str(), "ClickToFocus", s.length())) {
resource.auto_raise = false;
}
rname.seekp(0); rclass.seekp(0);
- rname << rscreen.str() << "windowZones";
- rclass << rscreen.str() << "WindowZones";
+ rname << rscreen.str() << "windowZones" << ends;
+ rclass << rscreen.str() << "WindowZones" << ends;
if (config.getValue(rname.str(), rclass.str(), l))
resource.zones = (l == 1 || l == 2 || l == 4) ? l : 1;
else
resource.zones = 4;
rname.seekp(0); rclass.seekp(0);
- rname << rscreen.str() << "windowPlacement";
- rclass << rscreen.str() << "WindowPlacement";
+ rname << rscreen.str() << "windowPlacement" << ends;
+ rclass << rscreen.str() << "WindowPlacement" << ends;
if (config.getValue(rname.str(), rclass.str(), s)) {
if (0 == strncasecmp(s.c_str(), "RowSmartPlacement", s.length()))
resource.placement_policy = RowSmartPlacement;
#ifdef HAVE_STRFTIME
rname.seekp(0); rclass.seekp(0);
- rname << rscreen.str() << "strftimeFormat";
- rclass << rscreen.str() << "StrftimeFormat";
+ rname << rscreen.str() << "strftimeFormat" << ends;
+ rclass << rscreen.str() << "StrftimeFormat" << ends;
if (resource.strftime_format != NULL)
delete [] resource.strftime_format;
resource.strftime_format = bstrdup("%I:%M %p");
#else // !HAVE_STRFTIME
rname.seekp(0); rclass.seekp(0);
- rname << rscreen.str() << "dateFormat";
- rclass << rscreen.str() << "DateFormat";
+ rname << rscreen.str() << "dateFormat" << ends;
+ rclass << rscreen.str() << "DateFormat" << ends;
if (config.getValue(rname.str(), rclass.str(), s)) {
if (strncasecmp(s.c_str(), "European", s.length()))
resource.date_format = B_EuropeanDate;
resource.date_format = B_AmericanDate;
rname.seekp(0); rclass.seekp(0);
- rname << rscreen.str() << "clockFormat";
- rclass << rscreen.str() << "ClockFormat";
+ rname << rscreen.str() << "clockFormat" << ends;
+ rclass << rscreen.str() << "ClockFormat" << ends;
if (config.getValue(rname.str(), rclass.str(), l)) {
if (clock == 24)
resource.clock24hour = true;
#endif // HAVE_STRFTIME
rname.seekp(0); rclass.seekp(0);
- rname << rscreen.str() << "edgeSnapThreshold";
- rclass << rscreen.str() << "EdgeSnapThreshold";
+ rname << rscreen.str() << "edgeSnapThreshold" << ends;
+ rclass << rscreen.str() << "EdgeSnapThreshold" << ends;
if (config.getValue(rname.str(), rclass.str(), l))
resource.edge_snap_threshold = l;
else
resource.edge_snap_threshold = 4;
rname.seekp(0); rclass.seekp(0);
- rname << rscreen.str() << "imageDither";
- rclass << rscreen.str() << "ImageDither";
+ rname << rscreen.str() << "imageDither" << ends;
+ rclass << rscreen.str() << "ImageDither" << ends;
if (config.getValue(rname.str(), rclass.str(), b))
resource.image_dither = b;
else
resource.image_dither = true;
rname.seekp(0); rclass.seekp(0);
- rname << rscreen.str() << "rootCommand";
- rclass << rscreen.str() << "RootCommand";
+ rname << rscreen.str() << "rootCommand" << ends;
+ rclass << rscreen.str() << "RootCommand" << ends;
if (resource.root_command != NULL)
delete [] resource.root_command;
resource.root_command = NULL;
rname.seekp(0); rclass.seekp(0);
- rname << rscreen.str() << "opaqueMove";
- rclass << rscreen.str() << "OpaqueMove";
+ rname << rscreen.str() << "opaqueMove" << ends;
+ rclass << rscreen.str() << "OpaqueMove" << ends;
if (config.getValue(rname.str(), rclass.str(), b))
resource.opaque_move = b;
else
resource.opaque_move = false;
+
+ rscreen.rdbuf()->freeze(0);
+ rname.rdbuf()->freeze(0);
+ rclass.rdbuf()->freeze(0);
}
void BScreen::reconfigure(void) {
}
}
- std::string s;
+ string s;
long l;
// load fonts/fontsets
workspacemenu->setItemSelected(current_workspace->getWorkspaceID() + 2,
False);
- if (openbox.getFocusedWindow() &&
- openbox.getFocusedWindow()->getScreen() == this &&
- (! openbox.getFocusedWindow()->isStuck())) {
- current_workspace->setLastFocusedWindow(openbox.getFocusedWindow());
- openbox.setFocusedWindow(NULL);
+ if (openbox.focusedWindow() &&
+ openbox.focusedWindow()->getScreen() == this &&
+ (! openbox.focusedWindow()->isStuck())) {
+ current_workspace->setLastFocusedWindow(openbox.focusedWindow());
+ openbox.focusWindow((OpenboxWindow *) 0);
}
current_workspace = getWorkspace(id);
w->getWorkspaceID());
}
- Window f = ((openbox.getFocusedWindow()) ?
- openbox.getFocusedWindow()->getClientWindow() : None);
+ Window f = ((openbox.focusedWindow()) ?
+ openbox.focusedWindow()->getClientWindow() : None);
n->sendWindowFocus(f);
}
void BScreen::updateNetizenWindowFocus(void) {
- Window f = ((openbox.getFocusedWindow()) ?
- openbox.getFocusedWindow()->getClientWindow() : None);
+ Window f = ((openbox.focusedWindow()) ?
+ openbox.focusedWindow()->getClientWindow() : None);
LinkedListIterator<Netizen> it(netizenList);
for (Netizen *n = it.current(); n; it++, n = it.current())
n->sendWindowFocus(f);
int focused_window_number = -1;
OpenboxWindow *next;
- if (openbox.getFocusedWindow()) {
- if (openbox.getFocusedWindow()->getScreen()->getScreenNumber() ==
+ if (openbox.focusedWindow()) {
+ if (openbox.focusedWindow()->getScreen()->getScreenNumber() ==
getScreenNumber()) {
have_focused = True;
- focused_window_number = openbox.getFocusedWindow()->getWindowNumber();
+ focused_window_number = openbox.focusedWindow()->getWindowNumber();
}
}
int focused_window_number = -1;
OpenboxWindow *prev;
- if (openbox.getFocusedWindow()) {
- if (openbox.getFocusedWindow()->getScreen()->getScreenNumber() ==
+ if (openbox.focusedWindow()) {
+ if (openbox.focusedWindow()->getScreen()->getScreenNumber() ==
getScreenNumber()) {
have_focused = True;
- focused_window_number = openbox.getFocusedWindow()->getWindowNumber();
+ focused_window_number = openbox.focusedWindow()->getWindowNumber();
}
}
Bool have_focused = False;
int focused_window_number = -1;
- if (openbox.getFocusedWindow()) {
- if (openbox.getFocusedWindow()->getScreen()->getScreenNumber() ==
+ if (openbox.focusedWindow()) {
+ if (openbox.focusedWindow()->getScreen()->getScreenNumber() ==
getScreenNumber()) {
have_focused = True;
- focused_window_number = openbox.getFocusedWindow()->getWindowNumber();
+ focused_window_number = openbox.focusedWindow()->getWindowNumber();
}
}
if ((getCurrentWorkspace()->getCount() > 1) && have_focused)
- getWorkspace(openbox.getFocusedWindow()->getWorkspaceNumber())->
- raiseWindow(openbox.getFocusedWindow());
+ getWorkspace(openbox.focusedWindow()->getWorkspaceNumber())->
+ raiseWindow(openbox.focusedWindow());
}
closedir(d);
- std::sort(ls, ls + entries, dcmp());
+ std::sort(ls, ls + entries, dcmp());
int n, slen = strlen(stylesdir);
for (n = 0; n < entries; n++) {
#include "Slit.h"
#include "Toolbar.h"
-#ifdef HAVE_SSTREAM
-# include <sstream>
-#endif // HAVE_SSTREAM
-
+#include <strstream>
#include <string>
+using namespace std;
Slit::Slit(BScreen &scr, Resource &conf) : screen(scr),
openbox(scr.getOpenbox()), config(conf)
void Slit::setOnTop(bool b) {
m_ontop = b;
- std::ostringstream s;
- s << "session.screen" << screen.getScreenNumber() << ".slit.onTop";
+ ostrstream s;
+ s << "session.screen" << screen.getScreenNumber() << ".slit.onTop" << ends;
config.setValue(s.str(), m_ontop ? "True" : "False");
+ s.rdbuf()->freeze(0);
}
void Slit::setAutoHide(bool b) {
m_autohide = b;
- std::ostringstream s;
- s << "session.screen" << screen.getScreenNumber() << ".slit.autoHide";
+ ostrstream s;
+ s << "session.screen" << screen.getScreenNumber() << ".slit.autoHide" << ends;
config.setValue(s.str(), m_autohide ? "True" : "False");
+ s.rdbuf()->freeze(0);
}
void Slit::setPlacement(int p) {
m_placement = p;
- std::ostringstream s;
- s << "session.screen" << screen.getScreenNumber() << ".slit.placement";
+ ostrstream s;
+ s << "session.screen" << screen.getScreenNumber() << ".slit.placement"
+ << ends;
const char *placement;
switch (m_placement) {
case TopLeft: placement = "TopLeft"; break;
case CenterRight: default: placement = "CenterRight"; break;
}
config.setValue(s.str(), placement);
+ s.rdbuf()->freeze(0);
}
void Slit::setDirection(int d) {
m_direction = d;
- std::ostringstream s;
- s << "session.screen" << screen.getScreenNumber() << ".slit.direction";
+ ostrstream s;
+ s << "session.screen" << screen.getScreenNumber() << ".slit.direction"
+ << ends;
config.setValue(s.str(),
m_direction == Horizontal ? "Horizontal" : "Vertical");
+ s.rdbuf()->freeze(0);
}
void Slit::save() {
}
void Slit::load() {
- std::ostringstream rscreen, rname, rclass;
- std::string s;
+ ostrstream rscreen, rname, rclass;
+ string s;
bool b;
- rscreen << "session.screen" << screen.getScreenNumber() << '.';
+ rscreen << "session.screen" << screen.getScreenNumber() << '.' << ends;
- rname << rscreen.str() << "slit.placement";
- rclass << rscreen.str() << "Slit.Placement";
+ rname << rscreen.str() << "slit.placement" << ends;
+ rclass << rscreen.str() << "Slit.Placement" << ends;
if (config.getValue(rname.str(), rclass.str(), s)) {
if (0 == strncasecmp(s.c_str(), "TopLeft", s.length()))
m_placement = TopLeft;
m_placement = CenterRight;
rname.seekp(0); rclass.seekp(0);
- rname << rscreen.str() << "slit.direction";
- rclass << rscreen.str() << "Slit.Direction";
+ rname << rscreen.str() << "slit.direction" << ends;
+ rclass << rscreen.str() << "Slit.Direction" << ends;
if (config.getValue(rname.str(), rclass.str(), s)) {
if (0 == strncasecmp(s.c_str(), "Horizontal", s.length()))
m_direction = Horizontal;
m_direction = Vertical;
rname.seekp(0); rclass.seekp(0);
- rname << rscreen.str() << "slit.onTop";
- rclass << rscreen.str() << "Slit.OnTop";
+ rname << rscreen.str() << "slit.onTop" << ends;
+ rclass << rscreen.str() << "Slit.OnTop" << ends;
if (config.getValue(rname.str(), rclass.str(), b))
m_ontop = b;
else
m_ontop = false;
rname.seekp(0); rclass.seekp(0);
- rname << rscreen.str() << "slit.autoHide";
- rclass << rscreen.str() << "Slit.AutoHide";
+ rname << rscreen.str() << "slit.autoHide" << ends;
+ rclass << rscreen.str() << "Slit.AutoHide" << ends;
if (config.getValue(rname.str(), rclass.str(), b))
m_hidden = m_autohide = b;
else
m_hidden = m_autohide = false;
+
+ rscreen.rdbuf()->freeze(0);
+ rname.rdbuf()->freeze(0);
+ rclass.rdbuf()->freeze(0);
}
void Slit::reconfigure(void) {
# endif // HAVE_SYS_TIME_H
#endif // TIME_WITH_SYS_TIME
-#ifdef HAVE_SSTREAM
-# include <sstream>
-#endif // HAVE_SSTREAM
-
+#include <strstream>
#include <string>
+using namespace std;
Toolbar::Toolbar(BScreen &scrn, Resource &conf) : screen(scrn),
openbox(scrn.getOpenbox()), config(conf)
void Toolbar::setOnTop(bool b) {
m_ontop = b;
- std::ostringstream s;
- s << "session.screen" << screen.getScreenNumber() << ".toolbar.onTop";
+ ostrstream s;
+ s << "session.screen" << screen.getScreenNumber() << ".toolbar.onTop" << ends;
config.setValue(s.str(), m_ontop ? "True" : "False");
+ s.rdbuf()->freeze(0);
}
void Toolbar::setAutoHide(bool b) {
m_autohide = b;
- std::ostringstream s;
- s << "session.screen" << screen.getScreenNumber() << ".toolbar.autoHide";
+ ostrstream s;
+ s << "session.screen" << screen.getScreenNumber() << ".toolbar.autoHide"
+ << ends;
config.setValue(s.str(), m_autohide ? "True" : "False");
+ s.rdbuf()->freeze(0);
}
void Toolbar::setWidthPercent(int w) {
m_width_percent = w;
- std::ostringstream s;
+ ostrstream s;
s << "session.screen" << screen.getScreenNumber() << ".toolbar.widthPercent"
- ;
+ << ends;
config.setValue(s.str(), m_width_percent);
+ s.rdbuf()->freeze(0);
}
void Toolbar::setPlacement(int p) {
m_placement = p;
- std::ostringstream s;
- s << "session.screen" << screen.getScreenNumber() << ".toolbar.placement";
+ ostrstream s;
+ s << "session.screen" << screen.getScreenNumber() << ".toolbar.placement"
+ << ends;
const char *placement;
switch (m_placement) {
case TopLeft: placement = "TopLeft"; break;
case BottomCenter: default: placement = "BottomCenter"; break;
}
config.setValue(s.str(), placement);
+ s.rdbuf()->freeze(0);
}
void Toolbar::save() {
}
void Toolbar::load() {
- std::ostringstream rscreen, rname, rclass;
- std::string s;
+ ostrstream rscreen, rname, rclass;
+ string s;
bool b;
long l;
- rscreen << "session.screen" << screen.getScreenNumber() << '.';
+ rscreen << "session.screen" << screen.getScreenNumber() << '.' << ends;
- rname << rscreen.str() << "toolbar.widthPercent";
- rclass << rscreen.str() << "Toolbar.WidthPercent";
+ rname << rscreen.str() << "toolbar.widthPercent" << ends;
+ rclass << rscreen.str() << "Toolbar.WidthPercent" << ends;
if (config.getValue(rname.str(), rclass.str(), l) && (l > 0 && l <= 100))
m_width_percent = l;
else
m_width_percent =66;
rname.seekp(0); rclass.seekp(0);
- rname << rscreen.str() << "toolbar.placement";
- rclass << rscreen.str() << "Toolbar.Placement";
+ rname << rscreen.str() << "toolbar.placement" << ends;
+ rclass << rscreen.str() << "Toolbar.Placement" << ends;
if (config.getValue(rname.str(), rclass.str(), s)) {
if (0 == strncasecmp(s.c_str(), "TopLeft", s.length()))
m_placement = TopLeft;
m_placement = BottomCenter;
rname.seekp(0); rclass.seekp(0);
- rname << rscreen.str() << "toolbar.onTop";
- rclass << rscreen.str() << "Toolbar.OnTop";
+ rname << rscreen.str() << "toolbar.onTop" << ends;
+ rclass << rscreen.str() << "Toolbar.OnTop" << ends;
if (config.getValue(rname.str(), rclass.str(), b))
m_ontop = b;
else
m_ontop = false;
rname.seekp(0); rclass.seekp(0);
- rname << rscreen.str() << "toolbar.autoHide";
- rclass << rscreen.str() << "Toolbar.AutoHide";
+ rname << rscreen.str() << "toolbar.autoHide" << ends;
+ rclass << rscreen.str() << "Toolbar.AutoHide" << ends;
if (config.getValue(rname.str(), rclass.str(), b))
m_hidden = m_autohide = b;
else
m_hidden = m_autohide = false;
+
+ rscreen.rdbuf()->freeze(0);
+ rname.rdbuf()->freeze(0);
+ rclass.rdbuf()->freeze(0);
}
void Toolbar::reconfigure() {
void Toolbar::redrawWindowLabel(Bool redraw) {
- if (screen.getOpenbox().getFocusedWindow()) {
+ if (screen.getOpenbox().focusedWindow()) {
if (redraw)
XClearWindow(display, frame.window_label);
- OpenboxWindow *foc = screen.getOpenbox().getFocusedWindow();
+ OpenboxWindow *foc = screen.getOpenbox().focusedWindow();
if (foc->getScreen() != &screen) return;
int dx = (frame.bevel_w * 2), dlen = strlen(*foc->getTitle());
XClearWindow(display, frame.workspace_label);
openbox.setNoFocus(True);
- if (openbox.getFocusedWindow())
- openbox.getFocusedWindow()->setFocusFlag(False);
+ if (openbox.focusedWindow())
+ openbox.focusedWindow()->setFocusFlag(False);
XDrawRectangle(display, frame.workspace_label,
screen.getWindowStyle()->l_text_focus_gc,
m_editing = False;
openbox.setNoFocus(False);
- if (openbox.getFocusedWindow()) {
- openbox.getFocusedWindow()->setInputFocus();
- openbox.getFocusedWindow()->setFocusFlag(True);
+ if (openbox.focusedWindow()) {
+ openbox.focusedWindow()->setInputFocus();
+ openbox.focusedWindow()->setFocusFlag(True);
} else {
XSetInputFocus(display, PointerRoot, None, CurrentTime);
}
#endif // SLIT
#include "Util.h"
+#include <iostream>
+using namespace std;
+
/*
* Initializes the class with default values/the window's set initial values.
*/
XSetInputFocus(display, screen->getRootWindow(),
RevertToNone, CurrentTime);
- openbox.setFocusedWindow(this);
+ openbox.focusWindow(this);
if (flags.send_focus_message) {
XEvent ce;
typedef std::vector<Rect> rectList;
Workspace::Workspace(BScreen &scrn, int i) : screen(scrn) {
-
cascade_x = cascade_y = 0;
-
+ _focused = (OpenboxWindow *) 0;
id = i;
stackingList = new LinkedList<OpenboxWindow>;
w->getTransientFor()->isVisible()) {
w->getTransientFor()->setInputFocus();
} else if (screen.sloppyFocus()) {
- screen.getOpenbox().setFocusedWindow((OpenboxWindow *) 0);
+ screen.getOpenbox().focusWindow((OpenboxWindow *) 0);
} else {
OpenboxWindow *top = stackingList->first();
if (! top || ! top->setInputFocus()) {
- screen.getOpenbox().setFocusedWindow((OpenboxWindow *) 0);
+ screen.getOpenbox().focusWindow((OpenboxWindow *) 0);
XSetInputFocus(screen.getOpenbox().getXDisplay(),
screen.getToolbar()->getWindowID(),
RevertToParent, CurrentTime);
}
+void Workspace::focusWindow(OpenboxWindow *win) {
+ if (win != (OpenboxWindow *) 0)
+ clientmenu->setItemSelected(win->getWindowNumber(), true);
+ if (_focused != (OpenboxWindow *) 0)
+ clientmenu->setItemSelected(_focused->getWindowNumber(), false);
+ _focused = win;
+}
+
+
void Workspace::showAll(void) {
LinkedListIterator<OpenboxWindow> it(stackingList);
for (OpenboxWindow *bw = it.current(); bw; it++, bw = it.current())
best = NULL;
for (siter=spaces.begin(); siter!=spaces.end(); ++siter)
if ((siter->w() >= win_size.w()) && (siter->h() >= win_size.h())) {
- best = siter;
+ best = &*siter;
break;
}
best = NULL;
for (siter=spaces.begin(); siter!=spaces.end(); ++siter)
if ((siter->w() >= win_size.w()) && (siter->h() >= win_size.h())) {
- best = siter;
+ best = &*siter;
break;
}
#include <X11/Xlib.h>
#include "LinkedList.h"
-#include "Geometry.h"
class BScreen;
class Clientmenu;
class Workspace;
class OpenboxWindow;
+class Size;
+class Rect;
class Workspace {
private:
char *name;
int id, cascade_x, cascade_y;
+ OpenboxWindow *_focused;
protected:
void placeWindow(OpenboxWindow &);
~Workspace(void);
inline BScreen &getScreen(void) { return screen; }
-
inline OpenboxWindow *getLastFocusedWindow(void) { return lastfocus; }
-
inline Clientmenu *getMenu(void) { return clientmenu; }
-
inline const char *getName(void) const { return name; }
-
inline const int &getWorkspaceID(void) const { return id; }
-
inline void setLastFocusedWindow(OpenboxWindow *w) { lastfocus = w; }
-
+ inline OpenboxWindow *focusedWindow() { return _focused; }
+ void focusWindow(OpenboxWindow *win);
OpenboxWindow *getWindow(int);
-
Bool isCurrent(void);
Bool isLastWindow(OpenboxWindow *);
-
const int addWindow(OpenboxWindow *, Bool = False);
const int removeWindow(OpenboxWindow *);
const int getCount(void);
-
void showAll(void);
void hideAll(void);
void removeAll(void);
resource.titlebar_layout = NULL;
resource.auto_raise_delay.tv_sec = resource.auto_raise_delay.tv_usec = 0;
- focused_window = masked_window = NULL;
+ masked_window = NULL;
masked = None;
windowSearchList = new LinkedList<WindowSearch>;
"Openbox::Openbox: no managable screens found, aborting.\n"));
::exit(3);
}
+ focused_screen = screenList->first();
// save current settings and default values
save();
if ((win = searchWindow(e->xunmap.window))) {
win->unmapNotifyEvent(&e->xunmap);
- if (focused_window == win)
- focused_window = (OpenboxWindow *) 0;
#ifdef SLIT
} else if ((slit = searchSlit(e->xunmap.window))) {
slit->removeClient(e->xunmap.window);
if ((win = searchWindow(e->xdestroywindow.window))) {
win->destroyNotifyEvent(&e->xdestroywindow);
- if (focused_window == win)
- focused_window = (OpenboxWindow *) 0;
#ifdef SLIT
} else if ((slit = searchSlit(e->xdestroywindow.window))) {
slit->removeClient(e->xdestroywindow.window, False);
break;
OpenboxWindow *win = searchWindow(e->xfocus.window);
- if (win && ! win->isFocused())
- setFocusedWindow(win);
+ if (win && !win->isFocused())
+ focusWindow(win);
break;
}
}
-void Openbox::setFocusedWindow(OpenboxWindow *win) {
- BScreen *old_screen = (BScreen *) 0, *screen = (BScreen *) 0;
- OpenboxWindow *old_win = (OpenboxWindow *) 0;
+OpenboxWindow *Openbox::focusedWindow() {
+ if (focused_screen == (BScreen *) 0)
+ return (OpenboxWindow *) 0;
+ return focused_screen->getCurrentWorkspace()->focusedWindow();
+}
+
+
+void Openbox::focusWindow(OpenboxWindow *win) {
+ BScreen *old_screen = (BScreen *) 0;
Toolbar *old_tbar = (Toolbar *) 0, *tbar = (Toolbar *) 0;
Workspace *old_wkspc = (Workspace *) 0, *wkspc = (Workspace *) 0;
- if (focused_window) {
- old_win = focused_window;
+ OpenboxWindow *old_win = focusedWindow();
+ if (old_win != (OpenboxWindow *) 0) {
old_screen = old_win->getScreen();
- old_tbar = old_screen->getToolbar();
old_wkspc = old_screen->getWorkspace(old_win->getWorkspaceNumber());
+ old_tbar = old_screen->getToolbar();
old_win->setFocusFlag(False);
- old_wkspc->getMenu()->setItemSelected(old_win->getWindowNumber(), False);
+ old_wkspc->focusWindow((OpenboxWindow *) 0);
}
- if (win && ! win->isIconic()) {
- screen = win->getScreen();
- tbar = screen->getToolbar();
- wkspc = screen->getWorkspace(win->getWorkspaceNumber());
-
- focused_window = win;
-
- win->setFocusFlag(True);
- wkspc->getMenu()->setItemSelected(win->getWindowNumber(), True);
- } else {
- focused_window = (OpenboxWindow *) 0;
+ if (win && !win->isIconic()) {
+ focused_screen = win->getScreen();
+ tbar = focused_screen->getToolbar();
+ wkspc = focused_screen->getWorkspace(win->getWorkspaceNumber());
+ win->setFocusFlag(true);
+ wkspc->focusWindow(win);
+
+ if (tbar)
+ tbar->redrawWindowLabel(true);
+ focused_screen->updateNetizenWindowFocus();
+ //} else {
+ // focused_window = (OpenboxWindow *) 0;
}
- if (tbar)
- tbar->redrawWindowLabel(True);
- if (screen)
- screen->updateNetizenWindowFocus();
-
if (old_tbar && old_tbar != tbar)
- old_tbar->redrawWindowLabel(True);
- if (old_screen && old_screen != screen)
+ old_tbar->redrawWindowLabel(true);
+ if (old_screen && old_screen != focused_screen)
old_screen->updateNetizenWindowFocus();
}
LinkedList<MenuTimestamp> *menuTimestamps;
LinkedList<BScreen> *screenList;
- OpenboxWindow *focused_window, *masked_window;
+ BScreen *focused_screen;
+ OpenboxWindow *masked_window;
BTimer *timer;
#ifdef HAVE_GETPID
OpenboxWindow *searchGroup(Window, OpenboxWindow *);
OpenboxWindow *searchWindow(Window);
- inline OpenboxWindow *getFocusedWindow() { return focused_window; }
+ OpenboxWindow *focusedWindow();
+ void focusWindow(OpenboxWindow *w);
BScreen *getScreen(int);
BScreen *searchScreen(Window);
{ masked = w; masked_window = bw; }
inline void setNoFocus(Bool f) { no_focus = f; }
- void setFocusedWindow(OpenboxWindow *w);
void shutdown();
void setStyleFilename(const char *);
void setMenuFilename(const char *);