Remove the iconmgr feature.

With this twmruined reads .twmruinedrc instead of .twmrc.

Some more details from the Changelog:

* src/twm.h and several other files: remove iconmgr functionality.
Also drop the sample configuration file directory. These referenced
iconmgr settings which I've removed. As more settings go these
files would get further and further from their authors' intentions
if I were to maintain them.

* aclocal.m4: regenerated using aclocal (automake) 1.15.1 on OpenBSD 6.2.
export AUTOCONF_VERSION=2.69 AUTOMAKE_VERSION=1.15.1 ACLOCAL=/usr/local/bin/aclocal-1.15
/usr/local/bin/aclocal-1.15 -I /usr/X11R6/share/aclocal

* configure: regenerated using autoconf 2.69 on OpenBSD 6.2.
This commit is contained in:
Mike Small 2017-12-16 21:42:55 -05:00
parent 30e2e57a58
commit fd61bea39c
29 changed files with 3044 additions and 6666 deletions

View File

@ -1,3 +1,17 @@
2017-12-03 Mike Small <smallm@rex.mauritania>
* src/twm.h and several other files: remove iconmgr functionality.
Also drop the sample configuration file directory. These referenced
iconmgr settings which I've removed. As more settings go these
files would get further and further from their authors' intentions
if I were to maintain them.
* aclocal.m4: regenerated using aclocal (automake) 1.15.1 on OpenBSD 6.2.
export AUTOCONF_VERSION=2.69 AUTOMAKE_VERSION=1.15.1 ACLOCAL=/usr/local/bin/aclocal-1.15
/usr/local/bin/aclocal-1.15 -I /usr/X11R6/share/aclocal
* configure: regenerated using autoconf 2.69 on OpenBSD 6.2.
2017-09-30 Michael Small <smallm@sdf.org>
* src/Makefile.am (AM_CFLAGS): warnings as errors.

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15 from Makefile.am.
# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -270,6 +270,7 @@ LIBS = @LIBS@
LIB_MAN_DIR = @LIB_MAN_DIR@
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@
@ -341,7 +342,6 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@ -359,7 +359,7 @@ all: config.h
.SUFFIXES:
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@ -385,9 +385,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
@ -398,7 +398,7 @@ config.h: stamp-h1
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.h.in: $(am__configure_deps)
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
rm -f stamp-h1
touch $@
@ -580,7 +580,7 @@ distdir: $(DISTFILES)
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__post_remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
@ -605,7 +605,7 @@ dist-shar: distdir
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
$(am__post_remove_distdir)
dist-zip: distdir
@ -623,7 +623,7 @@ dist dist-all:
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
@ -633,7 +633,7 @@ distcheck: dist
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac

8
README
View File

@ -1,4 +1,10 @@
twm fork to suit my preferences.
A twm fork to suit my preferences.
Features removed...
1. iconmgr feature.
The master development code repository can be found at:

2520
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

167
configure vendored
View File

@ -665,6 +665,9 @@ CHANGELOG_CMD
STRICT_CFLAGS
CWARNFLAGS
BASE_CFLAGS
MAINT
MAINTAINER_MODE_FALSE
MAINTAINER_MODE_TRUE
AM_BACKSLASH
AM_DEFAULT_VERBOSITY
AM_DEFAULT_V
@ -731,7 +734,6 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
@ -756,6 +758,7 @@ ac_user_opts='
enable_option_checking
enable_dependency_tracking
enable_silent_rules
enable_maintainer_mode
enable_selective_werror
enable_strict_compilation
'
@ -813,7 +816,6 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@ -1066,15 +1068,6 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
-runstatedir | --runstatedir | --runstatedi | --runstated \
| --runstate | --runstat | --runsta | --runst | --runs \
| --run | --ru | --r)
ac_prev=runstatedir ;;
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
| --run=* | --ru=* | --r=*)
runstatedir=$ac_optarg ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@ -1212,7 +1205,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir runstatedir
libdir localedir mandir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@ -1365,7 +1358,6 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@ -1410,6 +1402,9 @@ Optional Features:
speeds up one-time build
--enable-silent-rules less verbose build output (undo: "make V=1")
--disable-silent-rules verbose build output (undo: "make V=0")
--enable-maintainer-mode
enable make rules and dependencies not useful (and
sometimes confusing) to the casual installer
--disable-selective-werror
Turn off selective compiler errors. (default:
enabled)
@ -4393,6 +4388,29 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
# Check whether --enable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then :
enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
else
USE_MAINTAINER_MODE=no
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
$as_echo "$USE_MAINTAINER_MODE" >&6; }
if test $USE_MAINTAINER_MODE = yes; then
MAINTAINER_MODE_TRUE=
MAINTAINER_MODE_FALSE='#'
else
MAINTAINER_MODE_TRUE='#'
MAINTAINER_MODE_FALSE=
fi
MAINT=$MAINTAINER_MODE_TRUE
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
if ${ac_cv_prog_cc_c99+:} false; then :
@ -6754,124 +6772,7 @@ $as_echo "$supported" >&6; }
fi
xorg_testset_save_CFLAGS="$CFLAGS"
if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int i;
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
xorg_cv_cc_flag_unknown_warning_option=yes
else
xorg_cv_cc_flag_unknown_warning_option=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
CFLAGS="$xorg_testset_save_CFLAGS"
fi
if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int i;
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
xorg_cv_cc_flag_unused_command_line_argument=yes
else
xorg_cv_cc_flag_unused_command_line_argument=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
CFLAGS="$xorg_testset_save_CFLAGS"
fi
found="no"
if test $found = "no" ; then
if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
CFLAGS="$CFLAGS -Wredundant-decls"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wredundant-decls" >&5
$as_echo_n "checking if $CC supports -Wredundant-decls... " >&6; }
cacheid=xorg_cv_cc_flag__Wredundant_decls
if eval \${$cacheid+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int i;
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
eval $cacheid=yes
else
eval $cacheid=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
CFLAGS="$xorg_testset_save_CFLAGS"
eval supported=\$$cacheid
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
$as_echo "$supported" >&6; }
if test "$supported" = "yes" ; then
BASE_CFLAGS="$BASE_CFLAGS -Wredundant-decls"
found="yes"
fi
fi
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
@ -11328,6 +11229,10 @@ else
am__EXEEXT_FALSE=
fi
if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15 from Makefile.am.
# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -219,6 +219,7 @@ LIBS = @LIBS@
LIB_MAN_DIR = @LIB_MAN_DIR@
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MAN_SUBSTS = @MAN_SUBSTS@ -e 's|__datadir__|$(datadir)|g'
MISC_MAN_DIR = @MISC_MAN_DIR@
@ -290,7 +291,6 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@ -309,7 +309,7 @@ all: all-am
.SUFFIXES:
.SUFFIXES: .$(APP_MAN_SUFFIX) .man
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@ -333,9 +333,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-appmanDATA: $(appman_DATA)

View File

@ -68,9 +68,7 @@ titlebutton will invoke the function associated with the button.
In the default interface, windows are iconified by clicking (pressing
and then immediately releasing) the left titlebutton (which looks
like a Dot). Conversely, windows are deiconified by clicking in the
associated icon or entry in the icon manager
(see description of the variable
\fBShowIconManager\fP and of the function \fBf.showiconmgr\fP).
associated icon.
.PP
Windows are resized by pressing the right titlebutton (which resembles a
group of nested squares), dragging the pointer over edge that is to be
@ -148,7 +146,7 @@ Widgets\fP manual and \fIxrdb(__appmansuffix__)\fP).
specifications: \fIVariables\fP, \fIBindings\fP, \fIMenus\fP. The
\fIVariables\fP section must come first and is used to describe the
fonts, colors, cursors, border widths, icon and window placement, highlighting,
autoraising, layout of titles, warping, use of the icon manager.
autoraising, layout of titles, and warping.
The \fIBindings\fP section usually comes second and is used to specify
the functions that should be
to be invoked when keyboard and pointer buttons are pressed in
@ -258,8 +256,8 @@ per-window colors to be specified. The default is "black".
.IP "\fBBorderWidth\fP \fIpixels\fP" 8
This variable specifies the width in pixels of the border surrounding
all client window frames if \fBClientBorderWidth\fP has not been specified.
This value is also used to set the border size of windows created by \fItwmruined\fP
(such as the icon manager). The default is 2.
This value is also used to set the border size of windows created by \fItwmruined\fP. The
default is 2.
.IP "\fBButtonIndent\fP \fIpixels\fP" 8
This variable specifies the amount by which titlebuttons should be
indented on all sides. Positive values cause the buttons to be smaller than
@ -288,16 +286,13 @@ The following
color variables may also be given a list of window and color name pairs to
allow per-window colors to be specified (see \fBBorderColor\fP for details):
\fBBorderColor\fP,
\fBIconManagerHighlight\fP,
\fBBorderTitleBackground\fP,
\fBBorderTitleForeground\fP,
\fBTitleBackground\fP,
\fBTitleForeground\fP,
\fBIconBackground\fP,
\fBIconForeground\fP,
\fBIconBorderColor\fP,
\fBIconManagerBackground\fP, and
\fBIconManagerForeground\fP.
\fBIconBorderColor\fP.
For example:
.EX 0
\fBColor\fP
@ -369,8 +364,7 @@ information windows. The default is "black".
.IP "\fBDontIconifyByUnmapping\fP { \fIwin-list\fP }" 8
This variable specifies a list of windows that should not be iconified by
simply unmapping the window (as would be the case if \fBIconifyByUnmapping\fP
had been set). This is frequently used to force some windows to be treated
as icons while other windows are handled by the icon manager.
had been set).
.IP "\fBDontMoveOff\fP" 8
This variable indicates that windows should not be allowed to be moved off the
screen. It can be overridden by the \fBf.forcemove\fP function.
@ -423,78 +417,12 @@ The default is "black".
.IP "\fBIconifyByUnmapping [{ \fIwin-list\fP }]\fP" 8
This variable indicates that windows should be iconified by being unmapped
without trying to map any icons. This assumes that the user will
remap the window through the icon manager, the \fBf.warpto\fP function, or
remap the window through the \fBf.warpto\fP function, or
the \fITwmWindows\fP menu.
If the optional \fIwin-list\fP is provided, only those windows will be
iconified by simply unmapping. Windows that have both this and the
\fBIconManagerDontShow\fP options set may not be accessible if no binding
iconified by simply unmapping. Windows that have this
option set may not be accessible if no binding
to the \fITwmWindows\fP menu is set in the user's startup file.
.IP "\fBIconManagerBackground\fP \fIstring\fP [{ \fIwin-list\fP }]" 8
This variable specifies the background color to use for icon manager entries,
and may only be specified inside of a
\fBColor\fP, \fBGrayscale\fP or \fBMonochrome\fP list.
The optional \fIwin-list\fP is a list of window names and colors so that
per-window colors may be specified. See the \fBBorderColor\fP
variable for a complete description of the \fIwin-list\fP.
The default is "white".
.IP "\fBIconManagerDontShow\fP [{ \fIwin-list\fP }]" 8
This variable indicates that the icon manager should not display any
windows. If the optional \fIwin-list\fP is given, only those windows will
not be displayed. This variable is used to prevent windows that are rarely
iconified (such as \fIxclock\fP or \fIxload\fP) from taking up space in
the icon manager.
.IP "\fBIconManagerFont\fP \fIstring\fP" 8
This variable specifies the font to be used when displaying icon manager
entries. The default is "variable".
.IP "\fBIconManagerForeground\fP \fIstring\fP [{ \fIwin-list\fP }]" 8
This variable specifies the foreground color to be used when displaying
icon manager entries, and may only be specified inside of a
\fBColor\fP, \fBGrayscale\fP or \fBMonochrome\fP list.
The optional \fIwin-list\fP is a list of window names and colors so that
per-window colors may be specified. See the \fBBorderColor\fP
variable for a complete description of the \fIwin-list\fP.
The default is "black".
.IP "\fBIconManagerGeometry\fP \fIstring\fP [ \fIcolumns\fP ]" 8
This variable specifies the geometry of the icon manager window. The
\fIstring\fP argument is standard geometry specification that indicates
the initial full size of the icon manager. The icon manager window is
then broken into \fIcolumns\fP pieces and scaled according to the number
of entries in the icon manager. Extra entries are wrapped to form
additional rows. The default number of columns is 1.
.IP "\fBIconManagerHighlight\fP \fIstring\fP [{ \fIwin-list\fP }]" 8
This variable specifies the border color to be used when highlighting
the icon manager entry that currently has the focus,
and can only be specified inside of a
\fBColor\fP, \fBGrayscale\fP or \fBMonochrome\fP list.
The optional \fIwin-list\fP is a list of window names and colors so that
per-window colors may be specified. See the \fBBorderColor\fP
variable for a complete description of the \fIwin-list\fP.
The default is "black".
.IP "\fBIconManagers\fP { \fIiconmgr-list\fP }" 8
This variable specifies a list of icon managers to create. Each item in the
\fIiconmgr-list\fP has the following format:
.EX 0
"\fIwinname\fP" ["\fIiconname\fP"] "\fIgeometry\fP" \fIcolumns\fP
.EE
where \fIwinname\fP is the name of the windows that should be put into this
icon manager, \fIiconname\fP is the name of that icon manager window's icon,
\fIgeometry\fP is a standard geometry specification, and \fIcolumns\fP is
the number of columns in this icon manager as described in
\fBIconManagerGeometry\fP. For example:
.EX 0
\fBIconManagers\fP
{
"XTerm" "=300x5+800+5" 5
"myhost" "=400x5+100+5" 2
}
.EE
Clients whose name or class is ``XTerm'' will have an entry created
in the ``XTerm'' icon manager. Clients whose name was ``myhost'' would
be put into the ``myhost'' icon manager.
.IP "\fBIconManagerShow\fP { \fIwin-list\fP }" 8
This variable specifies a list of windows that should appear in the icon
manager. When used in conjunction with the \fBIconManagerDontShow\fP
variable, only the windows in this list will be shown in the icon manager.
.IP "\fBIconRegion\fP \fIgeomstring\fP \fIvgrav hgrav gridwidth gridheight\fP"
This variable specifies an area on the root window in which icons are placed
if no specific icon location is provided by the client. The \fIgeomstring\fP
@ -594,10 +522,6 @@ see the \fBf.deltastop\fP function. The default is zero pixels.
This variable indicates that \fItwmruined\fP's menus should not request backing
store to minimize repainting of menus. This is typically
used with servers that can repaint faster than they can handle backing store.
.IP "\fBNoCaseSensitive\fP" 8
This variable indicates that case should be ignored when sorting icon names
in an icon manager. This option is typically used with applications that
capitalize the first letter of their icon name.
.IP "\fBNoDefaults\fP" 8
This variable indicates that \fItwm\fP should not supply the default
titlebuttons and bindings. This option should only be used if the startup
@ -613,8 +537,6 @@ When the border is highlighted, it will
be drawn in the current \fBBorderColor\fP. When the border is not
highlighted, it will be stippled with a gray pattern using the
current \fBBorderTileForeground\fP and \fBBorderTileBackground\fP colors.
.IP "\fBNoIconManagers\fP" 8
This variable indicates that no icon manager should be created.
.IP "\fBNoMenuShadows\fP" 8
This variable indicates that menus should not have drop shadows drawn behind
them. This is typically used with slower servers since it speeds up menu
@ -651,10 +573,9 @@ on specific windows.
.IP "\fBNoTitleFocus\fP" 8
This variable indicates that \fItwmruined\fP should not set keyboard input focus to
each window as it is entered. Normally, \fItwmruined\fP sets the focus
so that focus and key events from the titlebar and
icon managers are delivered to the application. If the pointer is moved
quickly and \fItwmruined\fP is slow to respond, input can be directed to the old
window instead of the new. This option is typically
so that focus and key events from the titlebar are delivered to the application. If
the pointer is moved quickly and \fItwmruined\fP is slow to respond, input can be
directed to the old window instead of the new. This option is typically
used to prevent this ``input lag'' and to
work around bugs in older applications that have problems with focus events.
.IP "\fBNoTitleHighlight\fP [{ \fIwin-list\fP }]" 8
@ -720,14 +641,6 @@ For example:
.EE
This would place on the root window 3 pixel values for borders and titlebars,
as well as the three color strings, all taken from the default colormap.
.IP "\fBShowIconManager\fP" 8
This variable indicates that the icon manager window should be displayed when
\fItwmruined\fP is started. It can always be brought up using the
\fBf.showiconmgr\fP function.
.IP "\fBSortIconManager\fP" 8
This variable indicates that entries in the icon manager should be
sorted alphabetically rather than by simply appending new windows to
the end.
.IP "\fBSqueezeTitle\fP [{ \fIsqueeze-list\fP }] " 8
This variable indicates that \fItwmruined\fP should attempt to use the SHAPE
extension to make titlebars occupy only as much screen space as they need,
@ -954,9 +867,6 @@ This is an abbreviation for \fBf.exec\fP \fIstring\fP.
.IP "\fBf.autoraise\fP" 8
This function toggles whether or not the selected window is raised whenever
entered by the pointer. See the description of the variable \fBAutoRaise\fP.
.IP "\fBf.backiconmgr\fI" 8
This function warps the pointer to the previous column in the
current icon manager, wrapping back to the previous row if necessary.
.IP "\fBf.beep\fP" 8
This function sounds the keyboard bell.
.IP "\fBf.bottomzoom\fP" 8
@ -1022,9 +932,6 @@ If the selected window already was focused, this function executes an
.IP "\fBf.forcemove\fP" 8
This function is like \fBf.move\fP except that it ignores the \fBDontMoveOff\fP
variable.
.IP "\fBf.forwiconmgr\fI" 8
This function warps the pointer to the next column in the current icon
manager, wrapping to the beginning of the next row if necessary.
.IP "\fBf.fullzoom\fP" 8
This function resizes the selected window to the full size of the display or
else restores the original size if the window was already zoomed.
@ -1033,8 +940,6 @@ This function executes the user-defined function whose name is specified
by the argument \fIstring\fP.
.IP "\fBf.hbzoom\fP" 8
This function is a synonym for \fBf.bottomzoom\fP.
.IP "\fBf.hideiconmgr\fP" 8
This function unmaps the current icon manager.
.IP "\fBf.horizoom\fP" 8
This variable is similar to the \fBf.zoom\fP function except that the
selected window is resized to the full width of the display.
@ -1072,15 +977,9 @@ constrains the move to be either horizontal or vertical depending on which
grid line is crossed.
To abort a move, press another button before releasing the
first button.
.IP "\fBf.nexticonmgr\fI" 8
This function warps the pointer to the next icon manager containing any windows
on the current or any succeeding screen.
.IP "\fBf.nop\fP" 8
This function does nothing and is typically used with the \fBDefaultFunction\fP
or \fBWindowFunction\fP variables or to introduce blank lines in menus.
.IP "\fBf.previconmgr\fI" 8
This function warps the pointer to the previous icon manager containing any
windows on the current or preceding screens.
.IP "\fBf.priority\fP \fIstring\fP" 8
This function sets the priority of the client owning the selected window to
the numeric value of the argument \fIstring\fP, which should be a signed
@ -1120,11 +1019,6 @@ accept this message are supposed to checkpoint all state associated with the
window and update the WM_COMMAND property as specified in the ICCCM. If
the selected window has not selected for this message, the keyboard bell
will be rung.
.IP "\fBf.showiconmgr\fP" 8
This function maps the current icon manager.
.IP "\fBf.sorticonmgr\fP" 8
This function sorts the entries in the current icon manager alphabetically.
See the variable \fBSortIconManager\fP.
.\".IP "\fBf.source\fP \fIstring\fP" 8
.\"This function assumes \fIstring\fP is a file name. The file is read
.\"and parsed as a \fItwmruined\fP startup file.
@ -1144,9 +1038,6 @@ the selected window is only resized to the top half of the display.
.IP "\fBf.unfocus\fP" 8
This function resets the focus back to pointer-driven. This should be used
when a focused window is no longer desired.
.IP "\fBf.upiconmgr\fI" 8
This function warps the pointer to the previous row in the current icon
manager, wrapping to the last row in the same column if necessary.
.\".IP "\fBf.version\fI" 8
.\"This function causes the \fItwmruined\fP version window to be displayed. This
.\"window will be displayed until a pointer button is pressed or the
@ -1163,11 +1054,6 @@ specified in the \fBWindowRing\fP variable.
This function warps the pointer to the window which has a name or class
that matches \fIstring\fP. If the window is iconified, it will be deiconified
if the variable \fBWarpUnmapped\fP is set or else ignored.
.IP "\fBf.warptoiconmgr\fP \fIstring\fP" 8
This function warps the pointer to the icon manager entry
associated with the window containing the pointer in the icon manager
specified by the argument \fIstring\fP. If \fIstring\fP is empty (i.e. ""),
the current icon manager is chosen.
.IP "\fBf.warptoscreen\fP \fIstring\fP" 8
This function warps the pointer to the screen specified by the
argument \fIstring\fP. \fIString\fP may be a number (e.g. \fB"0"\fP or
@ -1225,26 +1111,8 @@ hasn't been set, the window will be deiconified and raised.
.SH ICONS
\fITwm\fP supports several different ways of manipulating iconified windows.
The common pixmap-and-text style may be laid out by hand or automatically
arranged as described by the \fBIconRegion\fP variable. In addition, a
terse grid of icon names, called an icon manager, provides a more efficient
use of screen space as well as the ability to navigate among windows from
the keyboard.
arranged as described by the \fBIconRegion\fP variable.
.PP
An icon manager is a window that contains names of selected or all
windows currently on the display. In addition to the window name,
a small button using the default iconify symbol will be displayed to the
left of the name when the window is iconified. By default, clicking on an
entry in the icon manager performs \fBf.iconify\fP.
To change the actions taken in the icon manager, use the
the \fBiconmgr\fP context when specifying button and keyboard bindings.
.PP
Moving the pointer into the icon manager also directs keyboard focus to
the indicated window (setting the focus explicitly or else sending synthetic
events \fBNoTitleFocus\fP is set).
Using the \fBf.upiconmgr\fP, \fBf.downiconmgr\fP
\fBf.lefticonmgr\fP, and
\fBf.righticonmgr\fP functions,
the input focus can be changed between windows directly from the keyboard.
.SH BUGS
The resource manager should have been used instead of all of the window
lists.
@ -1254,10 +1122,9 @@ The \fBIconRegion\fP variable should take a list.
Double clicking very fast to get the constrained move function will sometimes
cause the window to move, even though the pointer is not moved.
.PP
If \fBIconifyByUnmapping\fP is on and windows are listed in
\fBIconManagerDontShow\fP but not in \fBDontIconifyByUnmapping\fP,
they may be lost if they are iconified and no bindings to
\fBf.menu "TwmWindows"\fP or \fBf.warpto\fP are setup.
If \fBIconifyByUnmapping\fP is on and windows are not listed in
\fBDontIconifyByUnmapping\fP, they may be lost if they are iconified and
no bindings to \fBf.menu "TwmWindows"\fP or \fBf.warpto\fP are setup.
.SH FILES
.PP
.nf

View File

@ -1,250 +0,0 @@
#**********************************************************************
#
# .twmrc
#
#**********************************************************************
#IconDirectory "/users/jim/icons" # use *bitmapFilePath instead.
#
# Use the SHAPE extension to make titles use as little space as possible. The
# location of the titles is specified as a fraction of the distance from the
# left (numerator positive) or right edge (numerator negative). A denominator
# of 0 indicates that the numerator is measured in pixels. The title is then
# justified over the indicated spot (note special cases are made for center on
# 0/0 and right on 0/0 to indicate the center and right edge of the titlebar).
#
SqueezeTitle # also sets default to Squeeze all Titles
{
# name justify num denom
"oclock" center 0 0 # centered over middle of title
"XTerm" left 0 0 # left edge of title
"xlogo" right 0 0 # for kicks
"emacs" right 0 0 # left side emacs with center tab
"xmh" center 0 0
}
DontSqueezeTitle
{
"XLogout" # make it stand out when mapped
}
NoDefaults # turn off iconify and resize button
LeftTitleButton "menu12" = f.menu "windowmenu" # add a menu to each window
TitleButtonBorderWidth 0 # don't want to see box around button
ButtonIndent 0 # button doesn't have to be smaller
UsePPosition "on" # use program-specified size hints accepted
NoHighlight # do not flash borders on enter events
OpaqueMove # actually move window instead of outline
AutoRelativeResize # don't require resize to cross border to start
RestartPreviousState # reiconify iconified things on startup
ClientBorderWidth # use the application border width on frame
BorderWidth 2 # width of top level windows created by twm
NoGrabServer # don't grab server during menus, etc.
NoRaiseOnMove # allow moving under other windows
NoRaiseOnResize # allow resizing under other windows
NoTitleFocus # avoid keystrokes in wrong window cause of lag
DecorateTransients # put titlebars on transients
TitleFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
MenuFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
IconFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*"
IconManagerFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*"
ResizeFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*"
NoSaveUnders # faster to just repaint then save
XORvalue 1 # tend to use visually distinct adjacent colors
ConstrainedMoveTime 0 # turn off horizontal/vertical only moving
NoCaseSensitive # turn off case-sensitivity in sorting icons
WarpUnmapped # allow warping to unmapped windows
###############################################################################
# #
# Declare some nice colors #
# #
###############################################################################
Pixmaps
{
# TitleHighlight "solid4x4" # make it stand out
}
Color
{
DefaultBackground "maroon"
DefaultForeground "gray85"
BorderColor "gray70"
TitleBackground "maroon"
TitleForeground "gray85"
MenuBackground "maroon"
MenuForeground "gray85"
MenuTitleBackground "gray70"
MenuTitleForeground "maroon"
IconBackground "maroon"
IconForeground "gray85"
IconBorderColor "gray85"
IconManagerBackground "maroon"
IconManagerForeground "gray85"
}
Monochrome
{
IconManagerHighlight "white"
BorderColor "black"
}
###############################################################################
# #
# Define key bindings #
# #
###############################################################################
MoveDelta 3 # need to move this much before takes effect
Function "move-or-raise" # simulate uwm action
{
f.move
f.deltastop
f.raise
}
DefaultFunction f.nop # ignore extraneous events
Button1 = : root : f.menu "twmops"
Button2 = : root : f.menu "windowops"
Button3 = : root : f.menu "TwmWindows"
Button1 = : title : f.function "move-or-raise"
Button1 = : icon : f.iconify
Button1 = : iconmgr : f.iconify
Button1 = m : window|icon|frame|title : f.lower
Button2 = m : window : f.resize
Button3 = m : window|icon|frame|title : f.function "move-or-raise"
Button1 = c|m|s : all : f.menu "twmops"
#Button1 = c|m|s : root : f.refresh
#"F20" = : all : f.warptoscreen "next"
"F21" = : all : f.warpring "next"
"F22" = : all : f.warptoiconmgr ""
"F23" = : all : f.raiselower
"Num_Lock" = : all : f.iconify
"F24" = : all : f.warpto "xmh"
"F25" = : all : f.warpto "[expo]"
"F26" = : all : f.warpto "emacs"
"KP_Subtract" = mod5 : all : f.colormap "prev"
"KP_Add" = mod5 : all : f.colormap "next"
"KP_Enter" = mod5 : all : f.colormap "default"
"Left" = m : all : f.backiconmgr
"Right" = m : all : f.forwiconmgr
"Up" = m : all : f.upiconmgr
"Down" = m : all : f.downiconmgr
"Left" = mod5 : all : f.warpring "prev"
"Right" = mod5 : all : f.warpring "next"
###############################################################################
# #
# Display an icon manager across the top of the screen. Don't manage #
# the windows for which you don't show a title. #
# #
###############################################################################
SortIconManager # keep them in alphabetic order
ShowIconManager # start with iconmgr up
IconManagerGeometry "700x50+246+2" 14 # strip across top
IconRegion "200x300+950+2" North East 50 50
IconifyByUnmapping # just use icon manager
IconManagerDontShow # but ignore these windows
{
"xclock"
"xbiff"
"xload"
"oclock"
"xcutsel"
"XLogout"
}
DontIconifyByUnmapping # don't lose them (still in TwmWindows menu)
{
"xclock"
"xbiff"
"xload"
"oclock"
"xcutsel"
"Untitled"
}
NoTitle # little programs that look like icons
{
"xclock"
"xbiff"
"xload"
"TWM Icon Manager"
"xcutsel"
}
NoStackMode # prevent hostile clients from hosing display
{
"saber"
}
WindowRing # f.warpring acts along these windows
{
"XTerm"
"emacs"
"Xmh"
}
###############################################################################
# #
# Define some useful menus. #
# #
###############################################################################
menu "twmops"
{
"System" f.title
"Restart Twm" f.restart
"Exit Twm" f.quit
"" f.nop
"xterm" !"xterm &"
"xterm -e /bin/sh" !"xterm -e /bin/sh &"
"xhost +" !"xhost + >/dev/null"
"xhost -" !"xhost - >/dev/null"
"" f.nop
"Kill" f.menu "kill"
"" f.nop
"Logout" f.warpto "xlogout"
}
menu "windowops"
{
"Windows" f.title
"Kill" f.menu "kill"
"Save" f.saveyourself
"Refresh" f.refresh
"" f.nop
"Iconify" f.iconify
"Resize" f.resize
"Move" f.move
"Raise" f.raise
"Lower" f.lower
"Info" f.identify
"Focus" f.focus
"Unfocus" f.unfocus
"" f.nop
"Show Iconmgr" f.showiconmgr
"Hide Iconmgr" f.hideiconmgr
"Prev Iconmgr" f.previconmgr
"Next Iconmgr" f.nexticonmgr
}
menu "windowmenu"
{
"Iconify" f.iconify
"RaiseLower" f.raiselower
"Refresh" f.winrefresh
"Focus" f.focus
"" f.nop
"Kill" f.menu "kill"
}
menu "kill"
{
"Send Delete" f.delete
"Kill Window" f.destroy
}

View File

@ -1,223 +0,0 @@
#**********************************************************************
#
# .twmrc
#
#**********************************************************************
IconDirectory "/users/keith/misc/bitmaps"
#NoDefaults
NoVersion
NoGrabServer
NoRaiseOnMove
NoRaiseOnResize
#NoMenuShadows
NoTitleHighlight
NoHighlight
NoTitleFocus
NoSaveUnders
SqueezeTitle
ConstrainedMoveTime 0
DecorateTransients
#TitleButtonBorderWidth 0
#ButtonIndent 0
#LeftTitleButton "iconify.bm" = f.iconify
#RightTitleButton "resize.bm" = f.resize
OpaqueMove
#ClientBorderWidth
BorderWidth 1
RandomPlacement
#IconRegion "1024x250+0+600" NORTH WEST 1024 25
IconRegion "600x200-200+0" NORTH EAST 75 25
#IconRegion "200x100-0+200" WEST NORTH 25 50
TitleFont "-*-helvetica-bold-o-normal--*-140-*-*-*-*-iso8859-1"
MenuFont "-*-helvetica-bold-r-normal--*-140-*-*-*-*-iso8859-1"
IconFont "-*-helvetica-bold-r-normal--*-140-*-*-*-*-iso8859-1"
ResizeFont "-*-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-1"
IconManagerFont "-*-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-1"
#ShowIconManager
SortIconManager
IconManagerGeometry "=100x100-200+0"
# nice colors: background of wheat, foreground of #d36
Cursors
{
Button "left_ptr"
Menu "left_ptr"
Title "left_ptr"
Frame "left_ptr"
Icon "left_ptr"
}
Color
{
BorderColor "black"
TitleBackground "CadetBlue"
TitleForeground "#fffff0"
MenuBackground "#fffff0"
MenuForeground "black"
MenuTitleBackground "CadetBlue"
MenuTitleForeground "#fffff0"
IconBackground "#fffff0"
IconForeground "black"
IconBorderColor "black"
}
Monochrome
{
IconManagerHighlight "white"
}
# define key bindings
MoveDelta 3
Function "move-or-raise"
{
f.move
f.deltastop
f.raise
}
Function "move-or-raiselower"
{
f.move
f.deltastop
f.raiselower
}
Function "move-or-iconify"
{
f.move
f.deltastop
f.iconify
}
Function "next-window"
{
}
Function "previous-window"
{
}
DefaultFunction f.nop
Button1 = : title : f.function "move-or-raiselower"
Button2 = : title : f.menu "Title Menu"
Button3 = : title : f.resize
Button1 = m : window|icon : f.iconify
Button2 = m : window|icon : f.function "move-or-raiselower"
Button3 = m : window|icon : f.resize
Button3 = c m : title : f.destroy
Button1 = : root : f.menu "Hosts"
Button2 = : root : f.menu "Toys"
Button3 = : root : f.menu "System"
Button1 = : icon : f.function "move-or-iconify"
#ForceIcons
Icons
{
"Xmh" "mail-up.bm" # from IconDirectory
"XTerm" "xterm.bm" # from IconDirectory
}
#UnknownIcon "icon"
NoTitle
{
"clock"
"oclock"
"xclock"
"xbiff"
"xeyes"
"xload"
}
IconManagerDontShow {
"clock"
"oclock"
"xclock"
"xbiff"
"xeyes"
"xload"
}
menu "Hosts"
{
"Hosts" f.title
"xenon" !"xenon &"
"expo" !"expo &"
"kanga" !"kanga &"
"exile" !"exile &"
"expire" !"expire &"
"excalibur" !"excalibur &"
"hpx" !"hpx &"
"expo bugs" !"expo -l bugs &"
"extort" !"extort &"
"apx" !"apx &"
"mfb" !"mfb &"
"sushi" !"sushi &"
"tempura" !"tempora &"
}
menu "Toys"
{
"Toys" f.title
"Jove" !"xjove &"
"Mail" !"xmh &"
"Manual" !"xman &"
"Troff Viewer" !"xditview &"
"Calculator" !"xcalc &"
"Mille Bornes" !"xmille `path -n .mille` &"
"Notepad" !"xclipboard &"
"Eyes" !"xeyes &"
"Lens" !"xmag &"
"expo jove" !"expo xjove&"
"expo mail" !"expo xmh &"
}
menu "System"
{
"System" f.title
"Window ops" f.menu "Window Ops"
"Windows" f.menu "TwmWindows"
"" f.nop
"Refresh" f.refresh
"Unfocus" f.unfocus
"Show Icon Box" f.showiconmgr
"Hide Icon Box" f.hideiconmgr
"Version" f.version
"" f.nop
"Restart" f.restart
"Logout" f.quit
}
menu "Window Ops"
{
"Window Ops" f.title
"Lower" f.lower
"Raise" f.raise
"Resize" f.resize
"Move" f.move
"Deiconify" f.deiconify
"Iconify" f.iconify
"Identify" f.identify
"Focus" f.focus
"Kill" f.destroy
}
menu "Title Menu"
{
"Lower" f.lower
"Raise" f.raise
"Resize" f.resize
"Move" f.move
"Iconify" f.iconify
"Identify" f.identify
"Focus" f.focus
"Kill" f.destroy
"Dismiss" f.delete
}

View File

@ -1,255 +0,0 @@
#
# Dave Lemke's .twmrc
#
IconDirectory "/u/lemke/lib/icons"
#AutoRelativeResize
BorderWidth 3
ButtonIndent 0
ClientBorderWidth
#DefaultFunction f.nop
#DontMoveOff
IconifyByUnmapping
IconFont "-adobe-helvetica-bold-r-normal--14-100-100-100-p-82-iso8859-1"
IconManagerFont "-adobe-helvetica-bold-r-normal--14-100-100-100-p-82-iso8859-1"
IconManagerGeometry "=98x5-2+50"
#LeftTitleButton "menu12.xbm" = f.menu "window-ops"
MenuFont "-adobe-helvetica-bold-r-normal--14-100-100-100-p-82-iso8859-1"
MoveDelta 5
#NoBackingStore
NoDefaults
NoGrabServer
NoMenuShadows
#NoRaiseOnDeiconify
NoRaiseOnMove
#NoRaiseOnResize
#NoSaveUnder
#NoTitleFocus
#NoVersion
#OpaqueMove
ResizeFont "10x20"
RestartPreviousState
#ReverseVideo
ShowIconManager
SortIconManager
SqueezeTitle
{
"XTerm" center 0 0
"Xsol" center 0 0
"Spider" center 0 0
}
TitleFont "-adobe-helvetica-bold-r-normal--14-100-100-100-p-82-iso8859-1"
TitleButtonBorderWidth 1
UnknownIcon "ncdlogo64.xbm"
#WarpCursor
XORValue 1
#Zoom
DefaultFunction f.nop
Function "move-or-raise"
{
f.move
f.deltastop
f.raise
}
AutoRaise
{
"xtrek"
"TWM Icon Manager"
"xclock"
"xbiff"
"xeyes"
}
Cursors
{
Menu "right_ptr"
}
DontIconifyByUnmapping
{
"xclock"
"xbiff"
"twmOutput"
"xload"
"oclock"
"xeyes"
}
IconManagerDontShow
{
"xclock"
"xbiff"
"twmOutput"
"xload"
"oclock"
"xeyes"
}
Monochrome
{
DefaultForeground "black"
DefaultBackground "white"
BorderColor "black"
TitleForeground "black"
TitleBackground "white"
MenuForeground "black"
MenuBackground "white"
}
NoTitle
{
"xclock"
"xbiff"
"xload"
"TWM Icon Manager"
"FrameMaker"
"FrameWriter"
"oclock"
"twmOutput"
"xeyes"
}
#
# buttons
#
Button1 = : root : f.menu "button1"
Button2 = : root : f.menu "Util_menu"
Button3 = : root : f.menu "Hosts_menu"
Button1 = : m : f.iconify
Button2 = : m : f.lower
Button1 = : t : f.function "move-or-raise"
Button2 = : t : f.lower
Button3 = : t : f.menu "window-ops"
Button1 = : i : f.iconify
Button2 = : i : f.function "move-or-raise"
"F1" = : w|t|i : f.iconify
"F2" = : all : f.refresh
"F3" = : w|t|i : f.raise
"F4" = : w|t|i : f.lower
"F5" = : w|t|i : f.zoom
menu "button1"
{
"Applications" f.title
#"FrameWriter" !"rsh indian -n /usr/local/xframewriter $DISPLAY& "
#"Q Calc " !"rsh indian -n /usr/bin/X11/xterm -display $DISPLAY -T Qcalc -e /pmax/u/demo/qsp/bin/qcalc &"
#"Notepad" !"/usr/bin/dxnotepad -display $DISPLAY&"
#"Calculator" !"xcalc -display $DISPLAY&"
"Mail Box" !"/usr/bin/X11/xbiff -display $DISPLAY&"
"Clock" !"oclock -display $DISPLAY &"
"Xterm" !"/usr/bin/X11/xterm -ls -display $DISPLAY &"
"Big Xterm" !"/usr/bin/X11/xterm -ls -fn 9x15 -display $DISPLAY &"
"xsol" !"$HOME/games/bin/`arch`/xsol &"
"Spider" !"$HOME/games/bin/`arch`/spider &"
"Utility" f.title
#"Focus" f.focus
#"UnFocus" f.unfocus
#"More.." f.title
"..Hosts" f.menu "Hosts_menu"
"..Applications" f.menu "Apps_menu"
"..Utility" f.menu "Util_menu"
"" f.title
"Exit" f.quit
}
menu "Hosts_menu"
{
"Host Connections" f.title
"Almanor" !"rsh -n almanor exec /usr/bin/X11/xterm -ls -display $DISPLAY -T Almanor&"
"Hamilton" !"rsh -n hamilton exec /usr/bin/X11/xterm -ls -display $DISPLAY -T Hamilton&"
"Homer" !"rsh -n Homer exec /usr/bin/X11/xterm -ls -display $DISPLAY -T Homer&"
"Lupine" !"TERM=xterms xterm -fn 10x20 -T lupine -e rlogin lupine&"
"Ramona" !"rsh -n ramona exec /usr/bin/X11/xterm -ls -display $DISPLAY -T Ramona&"
"Pagemill" !"rsh pagemill -n /usr/bin/X11/xterm -display $DISPLAY -T Pagemill -e /bin/ksh&"
"Sheridan" !"rsh -n sheridan exec /usr/bin/X11/xterm -ls -display $DISPLAY -T Sheridan&"
}
menu "Apps_menu"
{
"Applications" f.title
"Man Pages" !"/usr/bin/X11/xman -display $DISPLAY&"
#"Notepad" !"/usr/bin/dxnotepad -display $DISPLAY&"
#"FrameMaker" !"rsh indian -n /usr/local/xframemaker $DISPLAY& "
#"Calendar" !"/usr/bin/dxcalendar -display $DISPLAY &"
"Clock" !"/usr/bin/X11/xclock -display $DISPLAY &"
#"Rolodex" !"/usr/bin/dxcardfiler -display $DISPLAY &"
#"Paint" !"/usr/bin/dxpaint -display $DISPLAY &"
"Lock Screen" !"/usr/bin/X11/xlock & "
"Preferences" !"/usr/bin/X11/xpref -display $DISPLAY&"
"Xterm" !"/usr/bin/X11/xterm -ls -display $DISPLAY &"
}
menu "Util_menu"
{
"Utilities" f.title
"Refresh" f.refresh
"twm Version" f.version
"Source .twmrc" f.twmrc
"Restart twm" f.restart
#"Hide IconManager" f.hideiconmgr
#"Show IconManager" f.showiconmgr
#"Destroy All Window" !"xkill -a&"
"Preferences" f.menu "Pref_menu"
"TwmWindows" f.menu "TwmWindows"
"Exit twm" f.quit
"Window Ops" f.title
"Refresh Window" f.winrefresh
"Move Window" f.move
"Resize Window" f.resize
"Lower Window" f.lower
"Raise Window" f.raise
"Iconify" f.iconify
"Window Info" f.identify
"Destroy Window" f.destroy
"Focus on Window" f.focus
"Focus on Root" f.unfocus
}
menu "Pref_menu"
{
"Preferences" f.title
"Bell Loud" !"xset b 75&"
"Bell Normal" !"xset b 50&"
"Bell Quiet" !"xset b 25&"
"Bell Off" !"xset b off&"
"Mouse Fast" !"xset m 5 1&"
"Mouse Normal" !"xset m 3 1&"
"Mouse Slow" !"xset m 1 1&"
"Screen Saver" f.menu "SSaver"
}
menu "SSaver"
{
"Screen Saver" f.title
"Blank" !"/usr/bin/X11/xset s blank -display $DISPLAY &"
"No Blank" !"/usr/bin/X11/xset s noblank -display $DISPLAY &"
"Saver 2 Sec." !"/usr/bin/X11/xset s 2 2 -display $DISPLAY &"
"Saver 2 Min." !"/usr/bin/X11/xset s 120 120 -display $DISPLAY &"
"Saver 10 Min." !"/usr/bin/X11/xset s 600 600 -display $DISPLAY &"
}
menu "window-ops"
{
"Window Ops" f.title
"Iconify" f.iconify
"Refresh Window" f.winrefresh
"Move Window" f.move
"Resize Window" f.resize
"Hide Window" f.lower
"Expose Window" f.raise
"Destroy Window" f.destroy
"Delete Window" f.delete
"Save" f.saveyourself
}

View File

@ -44,8 +44,6 @@ twmruined_SOURCES = \
events.h \
gc.c \
gc.h \
iconmgr.c \
iconmgr.h \
icons.c \
icons.h \
list.c \

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15 from Makefile.am.
# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -126,10 +126,9 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(rcdir)"
PROGRAMS = $(bin_PROGRAMS)
am_twmruined_OBJECTS = add_window.$(OBJEXT) cursor.$(OBJEXT) \
deftwmrc.$(OBJEXT) events.$(OBJEXT) gc.$(OBJEXT) \
iconmgr.$(OBJEXT) icons.$(OBJEXT) list.$(OBJEXT) \
menus.$(OBJEXT) parse.$(OBJEXT) resize.$(OBJEXT) \
session.$(OBJEXT) twm.$(OBJEXT) util.$(OBJEXT) \
version.$(OBJEXT) gram.$(OBJEXT) lex.$(OBJEXT)
icons.$(OBJEXT) list.$(OBJEXT) menus.$(OBJEXT) parse.$(OBJEXT) \
resize.$(OBJEXT) session.$(OBJEXT) twm.$(OBJEXT) \
util.$(OBJEXT) version.$(OBJEXT) gram.$(OBJEXT) lex.$(OBJEXT)
twmruined_OBJECTS = $(am_twmruined_OBJECTS)
am__DEPENDENCIES_1 =
twmruined_DEPENDENCIES = $(am__DEPENDENCIES_1)
@ -161,12 +160,14 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
@MAINTAINER_MODE_FALSE@am__skiplex = test -f $@ ||
LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS)
AM_V_LEX = $(am__v_LEX_@AM_V@)
am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@)
am__v_LEX_0 = @echo " LEX " $@;
am__v_LEX_1 =
YLWRAP = $(top_srcdir)/ylwrap
@MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ ||
am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \
-e s/c++$$/h++/ -e s/c$$/h/
YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS)
@ -278,6 +279,7 @@ LIBS = @LIBS@
LIB_MAN_DIR = @LIB_MAN_DIR@
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@
@ -349,7 +351,6 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@ -377,8 +378,6 @@ twmruined_SOURCES = \
events.h \
gc.c \
gc.h \
iconmgr.c \
iconmgr.h \
icons.c \
icons.h \
list.c \
@ -408,7 +407,7 @@ all: $(BUILT_SOURCES)
.SUFFIXES:
.SUFFIXES: .c .l .o .obj .y
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@ -432,9 +431,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
@ -499,7 +498,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/events.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gram.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iconmgr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icons.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lex.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@

View File

@ -69,7 +69,6 @@ in this Software without prior written authorization from The Open Group.
#include "events.h"
#include "menus.h"
#include "screen.h"
#include "iconmgr.h"
#include "session.h"
#include "add_window.h"
@ -140,11 +139,9 @@ GetGravityOffsets (TwmWindow *tmp, int *xp, int *yp)
* \return pointer to the TwmWindow structure
*
* \param w the window id of the window to add
* \param iconm flag to tell if this is an icon manager window
* \param iconp pointer to icon manager struct
*/
TwmWindow *
AddWindow(Window w, int iconm, IconMgr *iconp)
AddWindow(Window w)
{
TwmWindow *tmp_win; /* new twm window structure */
int stat;
@ -179,8 +176,6 @@ AddWindow(Window w, int iconm, IconMgr *iconp)
}
tmp_win->w = w;
tmp_win->zoomed = ZOOM_NONE;
tmp_win->iconmgr = iconm;
tmp_win->iconmgrp = iconp;
tmp_win->cmaps.number_cwins = 0;
XSelectInput(dpy, tmp_win->w, PropertyChangeMask);
@ -296,7 +291,7 @@ AddWindow(Window w, int iconm, IconMgr *iconp)
tmp_win->iconify_by_unmapping = Scr->IconifyByUnmapping;
if (Scr->IconifyByUnmapping)
{
tmp_win->iconify_by_unmapping = iconm ? FALSE :
tmp_win->iconify_by_unmapping =
!(short)(long) LookInList(Scr->DontIconify, tmp_win->full_name,
&tmp_win->class);
}
@ -885,9 +880,6 @@ AddWindow(Window w, int iconm, IconMgr *iconp)
tmp_win->wShaped = boundingShaped;
}
if (!tmp_win->iconmgr)
XAddToSaveSet(dpy, tmp_win->w);
XReparentWindow(dpy, tmp_win->w, tmp_win->frame, 0, tmp_win->title_height);
/*
* Reparenting generates an UnmapNotify event, followed by a MapNotify.
@ -905,13 +897,8 @@ AddWindow(Window w, int iconm, IconMgr *iconp)
*/
tmp_win->icon_w = (Window) 0;
if (!tmp_win->iconmgr)
{
GrabButtons(tmp_win);
GrabKeys(tmp_win);
}
(void) AddIconManager(tmp_win);
XSaveContext(dpy, tmp_win->w, TwmContext, (caddr_t) tmp_win);
XSaveContext(dpy, tmp_win->w, ScreenContext, (caddr_t) Scr);
@ -992,11 +979,9 @@ AddDefaultBindings (void)
do_add_binding (Button1, C_TITLE, NoModifierMask, F_MOVE);
do_add_binding (Button1, C_ICON, NoModifierMask, F_ICONIFY);
do_add_binding (Button1, C_ICONMGR, NoModifierMask, F_ICONIFY);
do_add_binding (Button2, C_TITLE, NoModifierMask, F_RAISELOWER);
do_add_binding (Button2, C_ICON, NoModifierMask, F_ICONIFY);
do_add_binding (Button2, C_ICONMGR, NoModifierMask, F_ICONIFY);
#undef NoModifierMask
}
@ -1041,7 +1026,6 @@ void
GrabKeys(TwmWindow *tmp_win)
{
FuncKey *tmp;
IconMgr *p;
for (tmp = Scr->FuncKeyRoot.next; tmp != NULL; tmp = tmp->next)
{
@ -1081,16 +1065,6 @@ GrabKeys(TwmWindow *tmp_win)
*/
}
}
for (tmp = Scr->FuncKeyRoot.next; tmp != NULL; tmp = tmp->next)
{
if (tmp->cont == C_ICONMGR && !Scr->NoIconManagers)
{
for (p = &Scr->iconmgr; p != NULL; p = p->next)
{
XUngrabKey(dpy, tmp->keycode, tmp->mods, p->twm_win->w);
}
}
}
}
static Window CreateHighlightWindow (TwmWindow *tmp_win)

View File

@ -61,12 +61,10 @@ in this Software without prior written authorization from The Open Group.
#ifndef _ADD_WINDOW_
#define _ADD_WINDOW_
#include "iconmgr.h"
extern char NoName[];
extern void AddDefaultBindings ( void );
extern TwmWindow * AddWindow ( Window w, int iconm, IconMgr *iconp );
extern TwmWindow * AddWindow ( Window w );
extern ColormapWindow * CreateColormapWindow ( Window w, Bool creating_parent, Bool property_window );
extern TwmColormap * CreateTwmColormap ( Colormap c );
extern void FetchWmColormapWindows ( TwmWindow *tmp );

View File

@ -12,7 +12,6 @@ unsigned char *defTwmrc[] = {
(unsigned char *) "ResizeFont \"-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*\"",
(unsigned char *) "MenuFont \"-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*\"",
(unsigned char *) "IconFont \"-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*\"",
(unsigned char *) "IconManagerFont \"-adobe-helvetica-bold-r-normal--*-100-*-*-*\"",
(unsigned char *) "",
(unsigned char *) "Color",
(unsigned char *) "{",
@ -29,8 +28,6 @@ unsigned char *defTwmrc[] = {
(unsigned char *) " IconBackground \"rgb:2/a/9\"",
(unsigned char *) " IconForeground \"gray85\"",
(unsigned char *) " IconBorderColor \"gray85\"",
(unsigned char *) " IconManagerBackground \"rgb:2/a/9\"",
(unsigned char *) " IconManagerForeground \"gray85\"",
(unsigned char *) "}",
(unsigned char *) "",
(unsigned char *) "MoveDelta 3",
@ -50,9 +47,6 @@ unsigned char *defTwmrc[] = {
(unsigned char *) "Button1 = : icon : f.function \"move-or-iconify\"",
(unsigned char *) "Button2 = : icon : f.iconify",
(unsigned char *) "",
(unsigned char *) "Button1 = : iconmgr : f.iconify",
(unsigned char *) "Button2 = : iconmgr : f.iconify",
(unsigned char *) "",
(unsigned char *) "menu \"defops\"",
(unsigned char *) "{",
(unsigned char *) "\"Twm\" f.title",
@ -64,8 +58,6 @@ unsigned char *defTwmrc[] = {
(unsigned char *) "\"\" f.nop",
(unsigned char *) "\"Focus\" f.focus",
(unsigned char *) "\"Unfocus\" f.unfocus",
(unsigned char *) "\"Show Iconmgr\" f.showiconmgr",
(unsigned char *) "\"Hide Iconmgr\" f.hideiconmgr",
(unsigned char *) "\"\" f.nop",
(unsigned char *) "\"Xterm\" f.exec \"exec xterm &\"",
(unsigned char *) "\"\" f.nop",

View File

@ -61,7 +61,6 @@ in this Software without prior written authorization from The Open Group.
#include <stdio.h>
#include "twm.h"
#include <X11/Xatom.h>
#include "iconmgr.h"
#include "add_window.h"
#include "menus.h"
#include "events.h"
@ -584,10 +583,6 @@ HandleKeyPress(void)
Context = C_ICON;
if (Event.xany.window == Tmp_win->frame)
Context = C_FRAME;
if (Tmp_win->list && Event.xany.window == Tmp_win->list->w)
Context = C_ICONMGR;
if (Tmp_win->list && Event.xany.window == Tmp_win->list->icon)
Context = C_ICONMGR;
}
modifier = (Event.xkey.state & mods_used);
@ -672,8 +667,7 @@ HandleKeyPress(void)
{
if (Event.xany.window == Tmp_win->icon_w ||
Event.xany.window == Tmp_win->frame ||
Event.xany.window == Tmp_win->title_w ||
(Tmp_win->list && (Event.xany.window == Tmp_win->list->w)))
Event.xany.window == Tmp_win->title_w)
{
Event.xkey.window = Tmp_win->w;
XSendEvent(dpy, Tmp_win->w, False, KeyPressMask, &Event);
@ -948,15 +942,6 @@ RedoIconName(void)
{
int x, y;
if (Tmp_win->list)
{
/* let the expose event cause the repaint */
XClearArea(dpy, Tmp_win->list->w, 0,0,0,0, True);
if (Scr->SortIconMgr)
SortIconManager(Tmp_win->list->iconmgr);
}
if (Tmp_win->icon_w == (Window) 0)
return;
@ -1108,29 +1093,6 @@ HandleExpose(void)
}
}
}
if (Tmp_win->list) {
if (Event.xany.window == Tmp_win->list->w)
{
MyFont_ChangeGC(Tmp_win->list->fore, Tmp_win->list->back,
&Scr->IconManagerFont);
MyFont_DrawString (dpy, Event.xany.window,
&Scr->IconManagerFont, Scr->NormalGC,
iconmgr_textx, Scr->IconManagerFont.y+4,
Tmp_win->icon_name, strlen(Tmp_win->icon_name));
DrawIconManagerBorder(Tmp_win->list);
flush_expose (Event.xany.window);
return;
}
if (Event.xany.window == Tmp_win->list->icon)
{
FB(Tmp_win->list->fore, Tmp_win->list->back);
XCopyPlane(dpy, Scr->siconifyPm, Tmp_win->list->icon,
Scr->NormalGC,
0,0, iconifybox_width, iconifybox_height, 0, 0, 1);
flush_expose (Event.xany.window);
return;
}
}
}
}
@ -1223,8 +1185,8 @@ HandleDestroyNotify(void)
* 4. wmhints
* 5. class.res_name
* 6. class.res_class
* 7. list
* 8. iconmgrp
*
*
* 9. cwins
* 10. titlebuttons
* 11. window ring
@ -1236,7 +1198,6 @@ HandleDestroyNotify(void)
XDestroyWindow(dpy, Tmp_win->icon_w);
IconDown (Tmp_win);
}
RemoveIconManager(Tmp_win); /* 7 */
Tmp_win->prev->next = Tmp_win->next;
if (Tmp_win->next != NULL)
Tmp_win->next->prev = Tmp_win->prev;
@ -1294,19 +1255,10 @@ HandleMapRequest(void)
if (Tmp_win == NULL)
{
/* Add decorations. */
Tmp_win = AddWindow(Event.xany.window, FALSE, (IconMgr *) NULL);
Tmp_win = AddWindow(Event.xany.window);
if (Tmp_win == NULL)
return;
}
else
{
/*
* If the window has been unmapped by the client, it won't be listed
* in the icon manager. Add it again, if requested.
*/
if (Tmp_win->list == NULL)
(void) AddIconManager (Tmp_win);
}
/* If it's not merely iconified, and we have hints, use them. */
if ((! Tmp_win->icon) &&
@ -1658,12 +1610,6 @@ HandleButtonRelease(void)
EventHandler[EnterNotify] = HandleEnterNotify;
EventHandler[LeaveNotify] = HandleLeaveNotify;
ButtonPressed = -1;
if (DownIconManager)
{
DownIconManager->down = FALSE;
if (Scr->Highlight) DrawIconManagerBorder(DownIconManager);
DownIconManager = NULL;
}
Cancel = FALSE;
}
}
@ -1795,21 +1741,7 @@ HandleButtonPress(void)
Context = C_ROOT;
if (Tmp_win)
{
if (Tmp_win->list && RootFunction != 0 &&
(Event.xany.window == Tmp_win->list->w ||
Event.xany.window == Tmp_win->list->icon))
{
Tmp_win = Tmp_win->list->iconmgr->twm_win;
XTranslateCoordinates(dpy, Event.xany.window, Tmp_win->w,
Event.xbutton.x, Event.xbutton.y,
&JunkX, &JunkY, &JunkChild);
Event.xbutton.x = JunkX;
Event.xbutton.y = JunkY - Tmp_win->title_height;
Event.xany.window = Tmp_win->w;
Context = C_WINDOW;
}
else if (Event.xany.window == Tmp_win->title_w)
if (Event.xany.window == Tmp_win->title_w)
{
Context = C_TITLE;
}
@ -1841,15 +1773,6 @@ HandleButtonPress(void)
}
else Context = C_FRAME;
}
else if (Tmp_win->list &&
(Event.xany.window == Tmp_win->list->w ||
Event.xany.window == Tmp_win->list->icon))
{
Tmp_win->list->down = TRUE;
if (Scr->Highlight) DrawIconManagerBorder(Tmp_win->list);
DownIconManager = Tmp_win->list;
Context = C_ICONMGR;
}
}
/* this section of code checks to see if we were in the middle of
@ -1998,8 +1921,6 @@ HandleEnterNotify(void)
*/
if (UnHighLight_win && ewp->window != UnHighLight_win->w) {
SetBorder (UnHighLight_win, False); /* application window */
if (UnHighLight_win->list) /* in the icon box */
NotActiveIconManager(UnHighLight_win->list);
}
if (ewp->window == Scr->Root)
UnHighLight_win = NULL;
@ -2044,7 +1965,6 @@ HandleEnterNotify(void)
* focus on this window
*/
if (Scr->FocusRoot && (!scanArgs.leaves || scanArgs.inferior)) {
if (Tmp_win->list) ActiveIconManager(Tmp_win->list);
if (Tmp_win->mapped) {
/*
* unhighlight old focus window
@ -2054,18 +1974,15 @@ HandleEnterNotify(void)
XUnmapWindow(dpy, Scr->Focus->hilite_w);
/*
* If entering the frame or the icon manager, then do
* "window activation things":
* If entering the frame, then do "window activation things":
*
* 1. turn on highlight window (if any)
* 2. install frame colormap
* 3. set frame and highlight window (if any) border
* 4. focus on client window to forward typing
* 4a. same as 4 but for icon mgr w/with NoTitlebar on.
* 5. send WM_TAKE_FOCUS if requested
*/
if (ewp->window == Tmp_win->frame ||
(Tmp_win->list && ewp->window == Tmp_win->list->w)) {
if (ewp->window == Tmp_win->frame) {
if (Tmp_win->hilite_w) /* 1 */
XMapWindow (dpy, Tmp_win->hilite_w);
if (!scanArgs.leaves && !scanArgs.enters)
@ -2075,9 +1992,6 @@ HandleEnterNotify(void)
if (Tmp_win->title_w && Scr->TitleFocus && /* 4 */
Tmp_win->wmhints && Tmp_win->wmhints->input)
SetFocus (Tmp_win, ewp->time);
if (Scr->NoTitlebar && Scr->TitleFocus && /*4a */
Tmp_win->wmhints && Tmp_win->wmhints->input)
SetFocus (Tmp_win, ewp->time);
if (Tmp_win->protocols & DoesWmTakeFocus) /* 5 */
SendTakeFocusMessage (Tmp_win, ewp->time);
Scr->Focus = Tmp_win;
@ -2179,8 +2093,6 @@ HandleLeaveNotify(void)
if (Tmp_win != NULL)
{
Bool inicon;
/*
* We're not interested in pseudo Enter/Leave events generated
* from grab initiations and terminations.
@ -2188,13 +2100,9 @@ HandleLeaveNotify(void)
if (Event.xcrossing.mode != NotifyNormal)
return;
inicon = (Tmp_win->list &&
Tmp_win->list->w == Event.xcrossing.window);
if (Scr->RingLeader && Scr->RingLeader == Tmp_win &&
(Event.xcrossing.detail != NotifyInferior &&
Event.xcrossing.window != Tmp_win->w)) {
if (!inicon) {
if (Tmp_win->mapped) {
Tmp_win->ring.cursor_valid = False;
} else {
@ -2204,7 +2112,6 @@ HandleLeaveNotify(void)
Tmp_win->ring.curs_y = (Event.xcrossing.y_root -
Tmp_win->frame_y);
}
}
Scr->RingLeader = (TwmWindow *) NULL;
}
if (Scr->FocusRoot) {
@ -2220,9 +2127,8 @@ HandleLeaveNotify(void)
(void) XCheckIfEvent(dpy, &dummy, HLNQueueScanner,
(char *) &scanArgs);
if ((Event.xcrossing.window == Tmp_win->frame &&
!scanArgs.matches) || inicon) {
if (Tmp_win->list) NotActiveIconManager(Tmp_win->list);
if (Event.xcrossing.window == Tmp_win->frame &&
!scanArgs.matches) {
if (Tmp_win->hilite_w)
XUnmapWindow (dpy, Tmp_win->hilite_w);
SetBorder (Tmp_win, False);

4415
src/gram.c

File diff suppressed because it is too large Load Diff

View File

@ -1,209 +1,76 @@
/* A Bison parser, made by GNU Bison 2.3. */
/* Skeleton interface for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
under terms of your choice, so long as that work isn't itself a
parser generator using the skeleton or a modified version thereof
as a parser skeleton. Alternatively, if you modify or redistribute
the parser skeleton itself, you may (at your option) remove this
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
LB = 258,
RB = 259,
LP = 260,
RP = 261,
MENUS = 262,
MENU = 263,
BUTTON = 264,
DEFAULT_FUNCTION = 265,
PLUS = 266,
MINUS = 267,
ALL = 268,
OR = 269,
CURSORS = 270,
PIXMAPS = 271,
ICONS = 272,
COLOR = 273,
SAVECOLOR = 274,
MONOCHROME = 275,
FUNCTION = 276,
ICONMGR_SHOW = 277,
ICONMGR = 278,
WINDOW_FUNCTION = 279,
ZOOM = 280,
ICONMGRS = 281,
ICONMGR_GEOMETRY = 282,
ICONMGR_NOSHOW = 283,
MAKE_TITLE = 284,
GRAYSCALE = 285,
ICONIFY_BY_UNMAPPING = 286,
DONT_ICONIFY_BY_UNMAPPING = 287,
NO_TITLE = 288,
AUTO_RAISE = 289,
NO_HILITE = 290,
ICON_REGION = 291,
META = 292,
SHIFT = 293,
LOCK = 294,
CONTROL = 295,
WINDOW = 296,
TITLE = 297,
ICON = 298,
ROOT = 299,
FRAME = 300,
COLON = 301,
EQUALS = 302,
SQUEEZE_TITLE = 303,
DONT_SQUEEZE_TITLE = 304,
START_ICONIFIED = 305,
NO_TITLE_HILITE = 306,
TITLE_HILITE = 307,
MOVE = 308,
RESIZE = 309,
WAIT = 310,
SELECT = 311,
KILL = 312,
LEFT_TITLEBUTTON = 313,
RIGHT_TITLEBUTTON = 314,
NUMBER = 315,
KEYWORD = 316,
NKEYWORD = 317,
CKEYWORD = 318,
CLKEYWORD = 319,
FKEYWORD = 320,
FSKEYWORD = 321,
SKEYWORD = 322,
DKEYWORD = 323,
JKEYWORD = 324,
WINDOW_RING = 325,
WARP_CURSOR = 326,
ERRORTOKEN = 327,
NO_STACKMODE = 328,
STRING = 329
};
#endif
/* Tokens. */
#define LB 258
#define RB 259
#define LP 260
#define RP 261
#define MENUS 262
#define MENU 263
#define BUTTON 264
#define DEFAULT_FUNCTION 265
#define PLUS 266
#define MINUS 267
#define ALL 268
#define OR 269
#define CURSORS 270
#define PIXMAPS 271
#define ICONS 272
#define COLOR 273
#define SAVECOLOR 274
#define MONOCHROME 275
#define FUNCTION 276
#define ICONMGR_SHOW 277
#define ICONMGR 278
#define WINDOW_FUNCTION 279
#define ZOOM 280
#define ICONMGRS 281
#define ICONMGR_GEOMETRY 282
#define ICONMGR_NOSHOW 283
#define MAKE_TITLE 284
#define GRAYSCALE 285
#define ICONIFY_BY_UNMAPPING 286
#define DONT_ICONIFY_BY_UNMAPPING 287
#define NO_TITLE 288
#define AUTO_RAISE 289
#define NO_HILITE 290
#define ICON_REGION 291
#define META 292
#define SHIFT 293
#define LOCK 294
#define CONTROL 295
#define WINDOW 296
#define TITLE 297
#define ICON 298
#define ROOT 299
#define FRAME 300
#define COLON 301
#define EQUALS 302
#define SQUEEZE_TITLE 303
#define DONT_SQUEEZE_TITLE 304
#define START_ICONIFIED 305
#define NO_TITLE_HILITE 306
#define TITLE_HILITE 307
#define MOVE 308
#define RESIZE 309
#define WAIT 310
#define SELECT 311
#define KILL 312
#define LEFT_TITLEBUTTON 313
#define RIGHT_TITLEBUTTON 314
#define NUMBER 315
#define KEYWORD 316
#define NKEYWORD 317
#define CKEYWORD 318
#define CLKEYWORD 319
#define FKEYWORD 320
#define FSKEYWORD 321
#define SKEYWORD 322
#define DKEYWORD 323
#define JKEYWORD 324
#define WINDOW_RING 325
#define WARP_CURSOR 326
#define ERRORTOKEN 327
#define NO_STACKMODE 328
#define STRING 329
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
#line 107 "gram.y"
#define LB 257
#define RB 258
#define LP 259
#define RP 260
#define MENUS 261
#define MENU 262
#define BUTTON 263
#define DEFAULT_FUNCTION 264
#define PLUS 265
#define MINUS 266
#define ALL 267
#define OR 268
#define CURSORS 269
#define PIXMAPS 270
#define ICONS 271
#define COLOR 272
#define SAVECOLOR 273
#define MONOCHROME 274
#define FUNCTION 275
#define WINDOW_FUNCTION 276
#define ZOOM 277
#define MAKE_TITLE 278
#define GRAYSCALE 279
#define ICONIFY_BY_UNMAPPING 280
#define DONT_ICONIFY_BY_UNMAPPING 281
#define NO_TITLE 282
#define AUTO_RAISE 283
#define NO_HILITE 284
#define ICON_REGION 285
#define META 286
#define SHIFT 287
#define LOCK 288
#define CONTROL 289
#define WINDOW 290
#define TITLE 291
#define ICON 292
#define ROOT 293
#define FRAME 294
#define COLON 295
#define EQUALS 296
#define SQUEEZE_TITLE 297
#define DONT_SQUEEZE_TITLE 298
#define START_ICONIFIED 299
#define NO_TITLE_HILITE 300
#define TITLE_HILITE 301
#define MOVE 302
#define RESIZE 303
#define WAIT 304
#define SELECT 305
#define KILL 306
#define LEFT_TITLEBUTTON 307
#define RIGHT_TITLEBUTTON 308
#define NUMBER 309
#define KEYWORD 310
#define NKEYWORD 311
#define CKEYWORD 312
#define CLKEYWORD 313
#define FKEYWORD 314
#define FSKEYWORD 315
#define SKEYWORD 316
#define DKEYWORD 317
#define JKEYWORD 318
#define WINDOW_RING 319
#define WARP_CURSOR 320
#define ERRORTOKEN 321
#define NO_STACKMODE 322
#define STRING 323
#ifndef YYSTYPE_DEFINED
#define YYSTYPE_DEFINED
typedef union
{
int num;
char *ptr;
}
/* Line 1489 of yacc.c. */
#line 202 "gram.h"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif
} YYSTYPE;
#endif /* YYSTYPE_DEFINED */
extern YYSTYPE yylval;

View File

@ -111,8 +111,8 @@ static void yyerror ( const char *s );
%token <num> LB RB LP RP MENUS MENU BUTTON DEFAULT_FUNCTION PLUS MINUS
%token <num> ALL OR CURSORS PIXMAPS ICONS COLOR SAVECOLOR MONOCHROME FUNCTION
%token <num> ICONMGR_SHOW ICONMGR WINDOW_FUNCTION ZOOM ICONMGRS
%token <num> ICONMGR_GEOMETRY ICONMGR_NOSHOW MAKE_TITLE GRAYSCALE
%token <num> WINDOW_FUNCTION ZOOM
%token <num> MAKE_TITLE GRAYSCALE
%token <num> ICONIFY_BY_UNMAPPING DONT_ICONIFY_BY_UNMAPPING
%token <num> NO_TITLE AUTO_RAISE NO_HILITE ICON_REGION
%token <num> META SHIFT LOCK CONTROL WINDOW TITLE ICON ROOT FRAME
@ -126,7 +126,7 @@ static void yyerror ( const char *s );
%type <ptr> string
%type <num> pixmap_list cursor_list color_list save_color_list stmt
%type <num> win_color_list iconm_list win_list icon_list function menu
%type <num> win_color_list win_list function menu
%type <num> noarg sarg error narg squeeze color_entry
%type <num> action button number signed_number full fullkey
@ -147,15 +147,6 @@ stmt : error
| squeeze
| ICON_REGION string DKEYWORD DKEYWORD number number
{ AddIconRegion($2, $3, $4, $5, $6); }
| ICONMGR_GEOMETRY string number { if (Scr->FirstTime)
{
Scr->iconmgr.geometry=$2;
Scr->iconmgr.columns=$3;
}
}
| ICONMGR_GEOMETRY string { if (Scr->FirstTime)
Scr->iconmgr.geometry = $2;
}
| ZOOM number { if (Scr->FirstTime)
{
Scr->DoZoom = TRUE;
@ -200,13 +191,6 @@ stmt : error
| button full { GotButton($1, $2); }
| DONT_ICONIFY_BY_UNMAPPING { list = &Scr->DontIconify; }
win_list
| ICONMGR_NOSHOW { list = &Scr->IconMgrNoShow; }
win_list
| ICONMGR_NOSHOW { Scr->IconManagerDontShow = TRUE; }
| ICONMGRS { list = &Scr->IconMgrs; }
iconm_list
| ICONMGR_SHOW { list = &Scr->IconMgrShow; }
win_list
| NO_TITLE_HILITE { list = &Scr->NoTitleHighlight; }
win_list
| NO_TITLE_HILITE { if (Scr->FirstTime)
@ -347,8 +331,6 @@ context : WINDOW { cont |= C_WINDOW_BIT; }
| ICON { cont |= C_ICON_BIT; }
| ROOT { cont |= C_ROOT_BIT; }
| FRAME { cont |= C_FRAME_BIT; }
| ICONMGR { cont |= C_ICONMGR_BIT; }
| META { cont |= C_ICONMGR_BIT; }
| ALL { cont |= C_ALL_BITS; }
| OR { }
;
@ -362,8 +344,6 @@ contextkey : WINDOW { cont |= C_WINDOW_BIT; }
| ICON { cont |= C_ICON_BIT; }
| ROOT { cont |= C_ROOT_BIT; }
| FRAME { cont |= C_FRAME_BIT; }
| ICONMGR { cont |= C_ICONMGR_BIT; }
| META { cont |= C_ICONMGR_BIT; }
| ALL { cont |= C_ALL_BITS; }
| OR { }
| string { Name = $1; cont |= C_NAME_BIT; }
@ -400,10 +380,6 @@ cursor_entry : FRAME string string {
NewBitmapCursor(&Scr->IconCursor, $2, $3); }
| ICON string {
NewFontCursor(&Scr->IconCursor, $2); }
| ICONMGR string string {
NewBitmapCursor(&Scr->IconMgrCursor, $2, $3); }
| ICONMGR string {
NewFontCursor(&Scr->IconMgrCursor, $2); }
| BUTTON string string {
NewBitmapCursor(&Scr->ButtonCursor, $2, $3); }
| BUTTON string {
@ -517,27 +493,6 @@ win_sqz_entries : /* Empty */
}
;
iconm_list : LB iconm_entries RB
;
iconm_entries : /* Empty */
| iconm_entries iconm_entry
;
iconm_entry : string string number { if (Scr->FirstTime)
AddToList(list, $1, (char *)
AllocateIconManager($1, NULLSTR,
$2,$3));
}
| string string string number
{ if (Scr->FirstTime)
AddToList(list, $1, (char *)
AllocateIconManager($1,$2,
$3, $4));
}
;
win_list : LB win_entries RB
;

View File

@ -1,691 +0,0 @@
/*
*
Copyright 1989,1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
* */
/***********************************************************************
*
* Icon Manager routines
*
* 09-Mar-89 Tom LaStrange File Created
*
***********************************************************************/
#include <stdio.h>
#include "twm.h"
#include "util.h"
#include "parse.h"
#include "screen.h"
#include "resize.h"
#include "add_window.h"
#include "siconify.bm"
#include <X11/Xos.h>
#include <X11/Xmu/CharSet.h>
static void InsertInIconManager ( IconMgr *ip, WList *tmp, TwmWindow *tmp_win );
int iconmgr_textx = siconify_width+11;
static WList *Active = NULL;
WList *DownIconManager = NULL;
int iconifybox_width = siconify_width;
int iconifybox_height = siconify_height;
/**
* create all the icon manager windows for this screen.
*/
void
CreateIconManagers(void)
{
IconMgr *p;
int mask;
char str[100];
char str1[100];
Pixel background;
char *icon_name;
if (Scr->NoIconManagers)
return;
if (Scr->siconifyPm == None)
{
Scr->siconifyPm = XCreatePixmapFromBitmapData(dpy, Scr->Root,
(char *)siconify_bits, siconify_width, siconify_height, 1, 0, 1);
}
for (p = &Scr->iconmgr; p != NULL; p = p->next)
{
mask = XParseGeometry(p->geometry, &JunkX, &JunkY,
(unsigned int *) &p->width, (unsigned int *)&p->height);
if (mask & XNegative)
JunkX = Scr->MyDisplayWidth - p->width -
(2 * Scr->BorderWidth) + JunkX;
if (mask & YNegative)
JunkY = Scr->MyDisplayHeight - p->height -
(2 * Scr->BorderWidth) + JunkY;
background = Scr->IconManagerC.back;
GetColorFromList(Scr->IconManagerBL, p->name, (XClassHint *)NULL,
&background);
p->w = XCreateSimpleWindow(dpy, Scr->Root,
JunkX, JunkY, p->width, p->height, 1,
Scr->Black, background);
snprintf(str, sizeof(str), "%s Icon Manager", p->name);
snprintf(str1, sizeof(str1), "%s Icons", p->name);
if (p->icon_name)
icon_name = p->icon_name;
else
icon_name = str1;
XSetStandardProperties(dpy, p->w, str, icon_name, None, NULL, 0, NULL);
p->twm_win = AddWindow(p->w, TRUE, p);
SetMapStateProp (p->twm_win, WithdrawnState);
}
for (p = &Scr->iconmgr; p != NULL; p = p->next)
{
GrabButtons(p->twm_win);
GrabKeys(p->twm_win);
}
}
/**
* allocate a new icon manager
*
* \param name the name of this icon manager
* \param con_name the name of the associated icon
* \param geom a geometry string to eventually parse
* \param columns the number of columns this icon manager has
*/
IconMgr *AllocateIconManager(char *name, char *icon_name, char *geom, int columns)
{
IconMgr *p;
#ifdef DEBUG_ICONMGR
fprintf(stderr, "AllocateIconManager\n");
fprintf(stderr, " name=\"%s\" icon_name=\"%s\", geom=\"%s\", col=%d\n",
name, icon_name, geom, columns);
#endif
if (Scr->NoIconManagers)
return NULL;
p = malloc(sizeof(IconMgr));
p->name = name;
p->icon_name = icon_name;
p->geometry = geom;
p->columns = columns;
p->first = NULL;
p->last = NULL;
p->active = NULL;
p->scr = Scr;
p->count = 0;
p->x = 0;
p->y = 0;
p->width = 150;
p->height = 10;
Scr->iconmgr.lasti->next = p;
p->prev = Scr->iconmgr.lasti;
Scr->iconmgr.lasti = p;
p->next = NULL;
return(p);
}
/**
* move the pointer around in an icon manager
*
* \param dir one of the following:
* - F_FORWICONMGR: forward in the window list
* - F_BACKICONMGR: backward in the window list
* - F_UPICONMGR: up one row
* - F_DOWNICONMG: down one row
* - F_LEFTICONMGR: left one column
* - F_RIGHTICONMGR: right one column
*/
void MoveIconManager(int dir)
{
IconMgr *ip;
WList *tmp = NULL;
int cur_row, cur_col, new_row, new_col;
int row_inc, col_inc;
int got_it;
if (!Active) return;
cur_row = Active->row;
cur_col = Active->col;
ip = Active->iconmgr;
row_inc = 0;
col_inc = 0;
got_it = FALSE;
switch (dir)
{
case F_FORWICONMGR:
if ((tmp = Active->next) == NULL)
tmp = ip->first;
got_it = TRUE;
break;
case F_BACKICONMGR:
if ((tmp = Active->prev) == NULL)
tmp = ip->last;
got_it = TRUE;
break;
case F_UPICONMGR:
row_inc = -1;
break;
case F_DOWNICONMGR:
row_inc = 1;
break;
case F_LEFTICONMGR:
col_inc = -1;
break;
case F_RIGHTICONMGR:
col_inc = 1;
break;
}
/* If got_it is FALSE ast this point then we got a left, right,
* up, or down, command. We will enter this loop until we find
* a window to warp to.
*/
new_row = cur_row;
new_col = cur_col;
while (!got_it)
{
new_row += row_inc;
new_col += col_inc;
if (new_row < 0)
new_row = ip->cur_rows - 1;
if (new_col < 0)
new_col = ip->cur_columns - 1;
if (new_row >= ip->cur_rows)
new_row = 0;
if (new_col >= ip->cur_columns)
new_col = 0;
/* Now let's go through the list to see if there is an entry with this
* new position
*/
for (tmp = ip->first; tmp != NULL; tmp = tmp->next)
{
if (tmp->row == new_row && tmp->col == new_col)
{
got_it = TRUE;
break;
}
}
}
if (!got_it)
{
fprintf (stderr,
"%s: unable to find window (%d, %d) in icon manager\n",
ProgramName, new_row, new_col);
return;
}
if (tmp == NULL)
return;
/* raise the frame so the icon manager is visible */
if (ip->twm_win->mapped) {
XRaiseWindow(dpy, ip->twm_win->frame);
XWarpPointer(dpy, None, tmp->icon, 0,0,0,0, 5, 5);
} else {
if (tmp->twm->title_height) {
int tbx = Scr->TBInfo.titlex;
int x = tmp->twm->highlightx;
XWarpPointer (dpy, None, tmp->twm->title_w, 0, 0, 0, 0,
tbx + (x - tbx) / 2,
Scr->TitleHeight / 4);
} else {
XWarpPointer (dpy, None, tmp->twm->w, 0, 0, 0, 0, 5, 5);
}
}
}
/**
* jump from one icon manager to another, possibly even on another screen
* \param dir one of the following:
* - F_NEXTICONMGR - go to the next icon manager
* - F_PREVICONMGR - go to the previous one
*/
void JumpIconManager(int dir)
{
IconMgr *ip, *tmp_ip = NULL;
int got_it = FALSE;
ScreenInfo *sp;
int screen;
if (!Active) return;
#define ITER(i) (dir == F_NEXTICONMGR ? (i)->next : (i)->prev)
#define IPOFSP(sp) (dir == F_NEXTICONMGR ? &(sp->iconmgr) : sp->iconmgr.lasti)
#define TEST(ip) if ((ip)->count != 0 && (ip)->twm_win->mapped) \
{ got_it = TRUE; break; }
ip = Active->iconmgr;
for (tmp_ip = ITER(ip); tmp_ip; tmp_ip = ITER(tmp_ip)) {
TEST (tmp_ip);
}
if (!got_it) {
int origscreen = ip->scr->screen;
int inc = (dir == F_NEXTICONMGR ? 1 : -1);
for (screen = origscreen + inc; ; screen += inc) {
if (screen >= NumScreens)
screen = 0;
else if (screen < 0)
screen = NumScreens - 1;
sp = ScreenList[screen];
if (sp) {
for (tmp_ip = IPOFSP (sp); tmp_ip; tmp_ip = ITER(tmp_ip)) {
TEST (tmp_ip);
}
}
if (got_it || screen == origscreen) break;
}
}
#undef ITER
#undef IPOFSP
#undef TEST
if (!got_it) {
Bell(XkbBI_MinorError,0,None);
return;
}
/* raise the frame so it is visible */
XRaiseWindow(dpy, tmp_ip->twm_win->frame);
if (tmp_ip->active)
XWarpPointer(dpy, None, tmp_ip->active->icon, 0,0,0,0, 5, 5);
else
XWarpPointer(dpy, None, tmp_ip->w, 0,0,0,0, 5, 5);
}
/**
* add a window to an icon manager
*
* \param tmp_win the TwmWindow structure
*/
WList *AddIconManager(TwmWindow *tmp_win)
{
WList *tmp;
int h;
unsigned long valuemask; /* mask for create windows */
XSetWindowAttributes attributes; /* attributes for create windows */
IconMgr *ip;
tmp_win->list = NULL;
if (tmp_win->iconmgr || tmp_win->transient || Scr->NoIconManagers)
return NULL;
if (LookInList(Scr->IconMgrNoShow, tmp_win->full_name, &tmp_win->class))
return NULL;
if (Scr->IconManagerDontShow &&
!LookInList(Scr->IconMgrShow, tmp_win->full_name, &tmp_win->class))
return NULL;
if ((ip = (IconMgr *)LookInList(Scr->IconMgrs, tmp_win->full_name,
&tmp_win->class)) == NULL)
ip = &Scr->iconmgr;
tmp = malloc(sizeof(WList));
tmp->iconmgr = ip;
tmp->next = NULL;
tmp->active = FALSE;
tmp->down = FALSE;
InsertInIconManager(ip, tmp, tmp_win);
tmp->twm = tmp_win;
tmp->fore = Scr->IconManagerC.fore;
tmp->back = Scr->IconManagerC.back;
tmp->highlight = Scr->IconManagerHighlight;
GetColorFromList(Scr->IconManagerFL, tmp_win->full_name, &tmp_win->class,
&tmp->fore);
GetColorFromList(Scr->IconManagerBL, tmp_win->full_name, &tmp_win->class,
&tmp->back);
GetColorFromList(Scr->IconManagerHighlightL, tmp_win->full_name,
&tmp_win->class, &tmp->highlight);
h = Scr->IconManagerFont.height + 10;
if (h < (siconify_height + 4))
h = siconify_height + 4;
ip->height = h * ip->count;
tmp->me = ip->count;
tmp->x = -1;
tmp->y = -1;
valuemask = (CWBackPixel | CWBorderPixel | CWEventMask | CWCursor);
attributes.background_pixel = tmp->back;
attributes.border_pixel = tmp->back;
attributes.event_mask = (KeyPressMask | ButtonPressMask |
ButtonReleaseMask | ExposureMask |
EnterWindowMask | LeaveWindowMask);
attributes.cursor = Scr->IconMgrCursor;
tmp->w = XCreateWindow (dpy, ip->w, 0, 0, (unsigned int) 1,
(unsigned int) h, (unsigned int) 0,
CopyFromParent, (unsigned int) CopyFromParent,
(Visual *) CopyFromParent, valuemask, &attributes);
valuemask = (CWBackPixel | CWBorderPixel | CWEventMask | CWCursor);
attributes.background_pixel = tmp->back;
attributes.border_pixel = Scr->Black;
attributes.event_mask = (ButtonReleaseMask| ButtonPressMask |
ExposureMask);
attributes.cursor = Scr->ButtonCursor;
tmp->icon = XCreateWindow (dpy, tmp->w, 5, (int) (h - siconify_height)/2,
(unsigned int) siconify_width,
(unsigned int) siconify_height,
(unsigned int) 0, CopyFromParent,
(unsigned int) CopyFromParent,
(Visual *) CopyFromParent,
valuemask, &attributes);
ip->count += 1;
PackIconManager(ip);
XMapWindow(dpy, tmp->w);
XSaveContext(dpy, tmp->w, IconManagerContext, (caddr_t) tmp);
XSaveContext(dpy, tmp->w, TwmContext, (caddr_t) tmp_win);
XSaveContext(dpy, tmp->w, ScreenContext, (caddr_t) Scr);
XSaveContext(dpy, tmp->icon, TwmContext, (caddr_t) tmp_win);
XSaveContext(dpy, tmp->icon, ScreenContext, (caddr_t) Scr);
tmp_win->list = tmp;
if (!ip->twm_win->icon)
{
XMapWindow(dpy, ip->w);
XMapWindow(dpy, ip->twm_win->frame);
}
if (Active == NULL) Active = tmp;
return (tmp);
}
/**
* put an allocated entry into an icon manager
*
* \param ip the icon manager pointer
* \param tmp the entry to insert
*/
static void InsertInIconManager(IconMgr *ip, WList *tmp, TwmWindow *tmp_win)
{
WList *tmp1;
int added;
int (*compar)(const char *, const char *)
= (Scr->CaseSensitive ? strcmp : XmuCompareISOLatin1);
added = FALSE;
if (ip->first == NULL)
{
ip->first = tmp;
tmp->prev = NULL;
ip->last = tmp;
added = TRUE;
}
else if (Scr->SortIconMgr)
{
for (tmp1 = ip->first; tmp1 != NULL; tmp1 = tmp1->next)
{
if ((*compar)(tmp_win->icon_name, tmp1->twm->icon_name) < 0)
{
tmp->next = tmp1;
tmp->prev = tmp1->prev;
tmp1->prev = tmp;
if (tmp->prev == NULL)
ip->first = tmp;
else
tmp->prev->next = tmp;
added = TRUE;
break;
}
}
}
if (!added)
{
ip->last->next = tmp;
tmp->prev = ip->last;
ip->last = tmp;
}
}
static void RemoveFromIconManager(IconMgr *ip, WList *tmp)
{
if (tmp->prev == NULL)
ip->first = tmp->next;
else
tmp->prev->next = tmp->next;
if (tmp->next == NULL)
ip->last = tmp->prev;
else
tmp->next->prev = tmp->prev;
}
/**
* remove a window from the icon manager
* \param tmp_win the TwmWindow structure
*/
void RemoveIconManager(TwmWindow *tmp_win)
{
IconMgr *ip;
WList *tmp;
if (tmp_win->list == NULL)
return;
tmp = tmp_win->list;
tmp_win->list = NULL;
ip = tmp->iconmgr;
RemoveFromIconManager(ip, tmp);
XDeleteContext(dpy, tmp->icon, TwmContext);
XDeleteContext(dpy, tmp->icon, ScreenContext);
XDestroyWindow(dpy, tmp->icon);
XDeleteContext(dpy, tmp->w, IconManagerContext);
XDeleteContext(dpy, tmp->w, TwmContext);
XDeleteContext(dpy, tmp->w, ScreenContext);
XDestroyWindow(dpy, tmp->w);
ip->count -= 1;
free(tmp);
PackIconManager(ip);
if (ip->count == 0)
{
XUnmapWindow(dpy, ip->twm_win->frame);
}
}
void ActiveIconManager(WList *active)
{
active->active = TRUE;
Active = active;
Active->iconmgr->active = active;
DrawIconManagerBorder(active);
}
void NotActiveIconManager(WList *active)
{
active->active = FALSE;
DrawIconManagerBorder(active);
}
void DrawIconManagerBorder(WList *tmp)
{
{
XSetForeground(dpy, Scr->NormalGC, tmp->fore);
XDrawRectangle(dpy, tmp->w, Scr->NormalGC, 2, 2,
tmp->width-5, tmp->height-5);
if (tmp->active && Scr->Highlight)
XSetForeground(dpy, Scr->NormalGC, tmp->highlight);
else
XSetForeground(dpy, Scr->NormalGC, tmp->back);
XDrawRectangle(dpy, tmp->w, Scr->NormalGC, 0, 0,
tmp->width-1, tmp->height-1);
XDrawRectangle(dpy, tmp->w, Scr->NormalGC, 1, 1,
tmp->width-3, tmp->height-3);
}
}
/**
* sort The Dude
*
* \param ip a pointer to the icon manager struture
*/
void SortIconManager(IconMgr *ip)
{
WList *tmp1, *tmp2;
int done;
int (*compar)(const char *, const char *)
= (Scr->CaseSensitive ? strcmp : XmuCompareISOLatin1);
if (ip == NULL)
ip = Active->iconmgr;
done = FALSE;
do
{
for (tmp1 = ip->first; tmp1 != NULL; tmp1 = tmp1->next)
{
if ((tmp2 = tmp1->next) == NULL)
{
done = TRUE;
break;
}
if ((*compar)(tmp1->twm->icon_name, tmp2->twm->icon_name) > 0)
{
/* take it out and put it back in */
RemoveFromIconManager(ip, tmp2);
InsertInIconManager(ip, tmp2, tmp2->twm);
break;
}
}
}
while (!done);
PackIconManager(ip);
}
/**
* pack the icon manager windows following
* an addition or deletion
*
* \param ip a pointer to the icon manager struture
*/
void PackIconManager(IconMgr *ip)
{
int newwidth, i, row, col, maxcol, colinc, rowinc, wheight, wwidth;
int new_x, new_y;
int savewidth;
WList *tmp;
wheight = Scr->IconManagerFont.height + 10;
if (wheight < (siconify_height + 4))
wheight = siconify_height + 4;
wwidth = ip->width / ip->columns;
rowinc = wheight;
colinc = wwidth;
row = 0;
col = ip->columns;
maxcol = 0;
for (i = 0, tmp = ip->first; tmp != NULL; i++, tmp = tmp->next)
{
tmp->me = i;
if (++col >= ip->columns)
{
col = 0;
row += 1;
}
if (col > maxcol)
maxcol = col;
new_x = col * colinc;
new_y = (row-1) * rowinc;
/* if the position or size has not changed, don't touch it */
if (tmp->x != new_x || tmp->y != new_y ||
tmp->width != wwidth || tmp->height != wheight)
{
XMoveResizeWindow(dpy, tmp->w, new_x, new_y, wwidth, wheight);
tmp->row = row-1;
tmp->col = col;
tmp->x = new_x;
tmp->y = new_y;
tmp->width = wwidth;
tmp->height = wheight;
}
}
maxcol += 1;
ip->cur_rows = row;
ip->cur_columns = maxcol;
ip->height = row * rowinc;
if (ip->height == 0)
ip->height = rowinc;
newwidth = maxcol * colinc;
if (newwidth == 0)
newwidth = colinc;
XResizeWindow(dpy, ip->w, newwidth, ip->height);
savewidth = ip->width;
if (ip->twm_win)
SetupWindow (ip->twm_win,
ip->twm_win->frame_x, ip->twm_win->frame_y,
newwidth, ip->height + ip->twm_win->title_height, -1);
ip->width = savewidth;
}

View File

@ -1,89 +0,0 @@
/*
*
Copyright 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
* */
/***********************************************************************
*
* Icon Manager includes
*
* 09-Mar-89 Tom LaStrange File Created
*
***********************************************************************/
#ifndef _ICONMGR_
#define _ICONMGR_
typedef struct WList
{
struct WList *next;
struct WList *prev;
struct TwmWindow *twm;
struct IconMgr *iconmgr;
Window w;
Window icon;
int x, y, width, height;
int row, col;
int me;
Pixel fore, back, highlight;
unsigned top, bottom;
short active;
short down;
} WList;
typedef struct IconMgr
{
struct IconMgr *next; /* pointer to the next icon manager */
struct IconMgr *prev; /* pointer to the previous icon mgr */
struct IconMgr *lasti; /* pointer to the last icon mgr */
struct WList *first; /* first window in the list */
struct WList *last; /* last window in the list */
struct WList *active; /* the active entry */
TwmWindow *twm_win; /* back pointer to the new parent */
struct ScreenInfo *scr; /* the screen this thing is on */
Window w; /* this icon manager window */
char *geometry; /* geometry string */
char *name;
char *icon_name;
int x, y, width, height;
int columns, cur_rows, cur_columns;
int count;
} IconMgr;
extern int iconmgr_textx;
extern WList *DownIconManager;
extern int iconifybox_width, iconifybox_height;
extern void ActiveIconManager ( WList *active );
extern WList *AddIconManager ( TwmWindow *tmp_win );
extern IconMgr *AllocateIconManager ( char *name, char *icon_name, char *geom, int columns );
extern void CreateIconManagers ( void );
extern void DrawIconManagerBorder ( WList *tmp );
extern void JumpIconManager ( int dir );
extern void MoveIconManager ( int dir );
extern void NotActiveIconManager ( WList *active );
extern void PackIconManager ( IconMgr *ip );
extern void RemoveIconManager ( TwmWindow *tmp_win );
extern void SortIconManager ( IconMgr *ip );
#endif /* _ICONMGR_ */

View File

@ -74,7 +74,6 @@ in this Software without prior written authorization from The Open Group.
#include "gram.h"
#include "screen.h"
#include "menus.h"
#include "iconmgr.h"
#include "add_window.h"
#include "icons.h"
#include "session.h"
@ -120,7 +119,6 @@ static Bool NeedToDefer ( MenuRoot *root );
static void DestroyMenu ( MenuRoot *menu );
static void MakeMenu ( MenuRoot *mr );
static void Execute ( const char *s );
static void HideIconManager ( void );
static void WarpAlongRing ( XButtonEvent *ev, Bool forward );
static int WarpThere ( TwmWindow * t );
static void WarpToWindow ( TwmWindow *t );
@ -1308,14 +1306,6 @@ ExecuteFunction(int func, const char *action, Window w, TwmWindow *tmp_win,
switch (func)
{
case F_UPICONMGR:
case F_LEFTICONMGR:
case F_RIGHTICONMGR:
case F_DOWNICONMGR:
case F_FORWICONMGR:
case F_BACKICONMGR:
case F_NEXTICONMGR:
case F_PREVICONMGR:
case F_NOP:
case F_TITLE:
case F_DELTASTOP:
@ -1323,7 +1313,6 @@ ExecuteFunction(int func, const char *action, Window w, TwmWindow *tmp_win,
case F_WARPTOSCREEN:
case F_WARPTO:
case F_WARPRING:
case F_WARPTOICONMGR:
case F_WARPNEXT:
case F_WARPPREV:
case F_COLORMAP:
@ -1358,54 +1347,6 @@ ExecuteFunction(int func, const char *action, Window w, TwmWindow *tmp_win,
break;
}
case F_UPICONMGR:
case F_DOWNICONMGR:
case F_LEFTICONMGR:
case F_RIGHTICONMGR:
case F_FORWICONMGR:
case F_BACKICONMGR:
MoveIconManager(func);
break;
case F_NEXTICONMGR:
case F_PREVICONMGR:
JumpIconManager(func);
break;
case F_SHOWLIST:
if (Scr->NoIconManagers)
break;
DeIconify(Scr->iconmgr.twm_win);
XRaiseWindow(dpy, Scr->iconmgr.twm_win->frame);
break;
case F_HIDELIST:
if (Scr->NoIconManagers)
break;
HideIconManager ();
break;
case F_SORTICONMGR:
if (DeferExecution(context, func, Scr->SelectCursor))
return TRUE;
{
int save_sort;
save_sort = Scr->SortIconMgr;
Scr->SortIconMgr = TRUE;
if (context == C_ICONMGR)
SortIconManager((IconMgr *) NULL);
else if (tmp_win->iconmgr)
SortIconManager(tmp_win->iconmgrp);
else
Bell(XkbBI_Info,0,tmp_win->w);
Scr->SortIconMgr = save_sort;
}
break;
case F_IDENTIFY:
if (DeferExecution(context, func, Scr->SelectCursor))
return TRUE;
@ -1947,19 +1888,12 @@ ExecuteFunction(int func, const char *action, Window w, TwmWindow *tmp_win,
case F_DESTROY:
if (DeferExecution(context, func, Scr->DestroyCursor))
return TRUE;
if (tmp_win->iconmgr)
Bell(XkbBI_MinorError,0,tmp_win->w);
else
XKillClient(dpy, tmp_win->w);
break;
case F_DELETE:
if (DeferExecution(context, func, Scr->DestroyCursor))
return TRUE;
if (tmp_win->iconmgr) /* don't send ourself a message */
HideIconManager ();
else if (tmp_win->protocols & DoesWmDeleteWindow)
SendDeleteWindowMessage (tmp_win, LastTimestamp());
else
@ -2066,7 +2000,7 @@ ExecuteFunction(int func, const char *action, Window w, TwmWindow *tmp_win,
#define wseq(w) (func == F_WARPNEXT ? (w)->next : (w)->prev)
#define nwin(w) ((w) && (n=wseq(w)) != NULL && n != &Scr->TwmRoot ? n : l)
#define bwin(w) (!(w)||(w)->iconmgr||(w)==of||!(Scr->WarpUnmapped||(w)->mapped))
#define bwin(w) (!(w)||(w)==of||!(Scr->WarpUnmapped||(w)->mapped))
of=(Scr->Focus ? Scr->Focus : &Scr->TwmRoot);
@ -2119,42 +2053,6 @@ ExecuteFunction(int func, const char *action, Window w, TwmWindow *tmp_win,
}
break;
case F_WARPTOICONMGR:
{
TwmWindow *t;
int len;
Window raisewin = None, iconwin = None;
len = strlen(action);
if (len == 0) {
if (tmp_win && tmp_win->list) {
raisewin = tmp_win->list->iconmgr->twm_win->frame;
iconwin = tmp_win->list->icon;
} else if (Scr->iconmgr.active) {
raisewin = Scr->iconmgr.twm_win->frame;
iconwin = Scr->iconmgr.active->w;
}
} else {
for (t = Scr->TwmRoot.next; t != NULL; t = t->next) {
if (strncmp (action, t->icon_name, len) == 0) {
if (t->list && t->list->iconmgr->twm_win->mapped) {
raisewin = t->list->iconmgr->twm_win->frame;
iconwin = t->list->icon;
break;
}
}
}
}
if (raisewin) {
XRaiseWindow (dpy, raisewin);
XWarpPointer (dpy, None, iconwin, 0,0,0,0, 5, 5);
} else {
Bell(XkbBI_MinorError,0,None);
}
}
break;
case F_WARPRING:
switch (action[0]) {
case 'n':
@ -2433,8 +2331,6 @@ DeIconify(TwmWindow *tmp_win)
XUnmapWindow(dpy, tmp_win->icon_w);
IconDown (tmp_win);
}
if (tmp_win->list)
XUnmapWindow(dpy, tmp_win->list->icon);
if ((Scr->WarpCursor ||
LookInList(Scr->WarpCursorL, tmp_win->full_name, &tmp_win->class)) &&
tmp_win->icon)
@ -2465,7 +2361,6 @@ DeIconify(TwmWindow *tmp_win)
XUnmapWindow(dpy, t->icon_w);
IconDown (t);
}
if (t->list) XUnmapWindow(dpy, t->list->icon);
t->icon = FALSE;
t->icon_on = FALSE;
}
@ -2493,8 +2388,6 @@ Iconify(TwmWindow *tmp_win, int def_x, int def_y)
IconUp(tmp_win);
XMapRaised(dpy, tmp_win->icon_w);
}
if (tmp_win->list)
XMapWindow(dpy, tmp_win->list->icon);
XGetWindowAttributes(dpy, tmp_win->w, &winattrs);
eventMask = winattrs.your_event_mask;
@ -2531,7 +2424,6 @@ Iconify(TwmWindow *tmp_win, int def_x, int def_y)
Scr->Focus = NULL;
Scr->FocusRoot = TRUE;
}
if (t->list) XMapWindow(dpy, t->list->icon);
t->icon = TRUE;
t->icon_on = FALSE;
}
@ -2768,19 +2660,6 @@ BumpWindowColormap (TwmWindow *tmp, int inc)
FetchWmColormapWindows (tmp);
}
static void
HideIconManager (void)
{
SetMapStateProp (Scr->iconmgr.twm_win, WithdrawnState);
XUnmapWindow(dpy, Scr->iconmgr.twm_win->frame);
if (Scr->iconmgr.twm_win->icon_w)
XUnmapWindow (dpy, Scr->iconmgr.twm_win->icon_w);
Scr->iconmgr.twm_win->mapped = FALSE;
Scr->iconmgr.twm_win->icon = TRUE;
}
void
SetBorder (TwmWindow *tmp, Bool onoroff)

View File

@ -52,7 +52,7 @@ in this Software without prior written authorization from The Open Group.
/***********************************************************************
*
* parse the .twmrc file
* parse the .twmruinedrc file
*
* 17-Nov-87 Thomas E. LaStrange File created
* 10-Oct-90 David M. Sternlicht Storing saved colors on root
@ -71,7 +71,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/extensions/sync.h>
#ifndef SYSTEM_INIT_FILE
#define SYSTEM_INIT_FILE "/usr/lib/X11/twm/system.twmrc"
#define SYSTEM_INIT_FILE "/usr/lib/X11/twm/system.twmruinedrc"
#endif
#define BUF_LEN 300
@ -97,8 +97,9 @@ int (*twmInputFunc)(void);
/**
* parse the .twmrc file
* \param filename the filename to parse. NULL indicates $HOME/.twmrc
* parse the .twmruinedrc file
* \param filename the filename to parse.
* NULL indicates $HOME/.twmruinedrc
*/
static int doparse (int (*ifunc)(void),
const char *srctypename, const char *srcname)
@ -130,8 +131,6 @@ static int doparse (int (*ifunc)(void),
&Scr->PointerForeground, &Scr->PointerBackground);
XRecolorCursor(dpy, Scr->IconCursor,
&Scr->PointerForeground, &Scr->PointerBackground);
XRecolorCursor(dpy, Scr->IconMgrCursor,
&Scr->PointerForeground, &Scr->PointerBackground);
XRecolorCursor(dpy, Scr->MoveCursor,
&Scr->PointerForeground, &Scr->PointerBackground);
XRecolorCursor(dpy, Scr->ResizeCursor,
@ -166,8 +165,9 @@ int ParseTwmrc (char *filename)
char tmpfilename[257];
/*
* If filename given, try it, else try ~/.twmrc.# then ~/.twmrc. Then
* try system.twmrc; finally using built-in defaults.
* If filename given, try it, else try ~/.twmruinedrc.# then
* ~/.twmruinedrc. Then try system.twmruinedrc; finally using
* built-in defaults.
*/
for (twmrc = NULL, i = 0; !twmrc && i < 4; i++) {
switch (i) {
@ -175,26 +175,26 @@ int ParseTwmrc (char *filename)
cp = filename;
break;
case 1: /* ~/.twmrc.screennum */
case 1: /* ~/.twmruinedrc.screennum */
if (!filename) {
home = getenv ("HOME");
if (home) {
homelen = strlen (home);
cp = tmpfilename;
(void) snprintf (tmpfilename, sizeof(tmpfilename),
"%s/.twmrc.%d", home, Scr->screen);
"%s/.twmruinedrc.%d", home, Scr->screen);
break;
}
}
continue;
case 2: /* ~/.twmrc */
case 2: /* ~/.twmruinedrc */
if (home) {
tmpfilename[homelen + 7] = '\0';
tmpfilename[homelen + 13] = '\0';
}
break;
case 3: /* system.twmrc */
case 3: /* system.twmruinedrc */
cp = SYSTEM_INIT_FILE;
break;
}
@ -312,11 +312,9 @@ typedef struct _TwmKeyword {
#define kw0_NoDefaults 1
#define kw0_AutoRelativeResize 2
#define kw0_ForceIcons 3
#define kw0_NoIconManagers 4
#define kw0_OpaqueMove 5
#define kw0_InterpolateMenuColors 6
#define kw0_NoVersion 7
#define kw0_SortIconManager 8
#define kw0_NoGrabServer 9
#define kw0_NoMenuShadows 10
#define kw0_NoRaiseOnMove 11
@ -330,8 +328,6 @@ typedef struct _TwmKeyword {
#define kw0_NoTitleFocus 19
#define kw0_RandomPlacement 20
#define kw0_DecorateTransients 21
#define kw0_ShowIconManager 22
#define kw0_NoCaseSensitive 23
#define kw0_NoRaiseOnWarp 24
#define kw0_WarpUnmapped 25
@ -340,7 +336,6 @@ typedef struct _TwmKeyword {
#define kws_ResizeFont 3
#define kws_MenuFont 4
#define kws_TitleFont 5
#define kws_IconManagerFont 6
#define kws_UnknownIcon 7
#define kws_IconDirectory 8
#define kws_MaxWindowSize 9
@ -358,7 +353,6 @@ typedef struct _TwmKeyword {
#define kwn_MenuBorderWidth 11
#define kwcl_BorderColor 1
#define kwcl_IconManagerHighlight 2
#define kwcl_BorderTileForeground 3
#define kwcl_BorderTileBackground 4
#define kwcl_TitleForeground 5
@ -366,8 +360,6 @@ typedef struct _TwmKeyword {
#define kwcl_IconForeground 7
#define kwcl_IconBackground 8
#define kwcl_IconBorderColor 9
#define kwcl_IconManagerForeground 10
#define kwcl_IconManagerBackground 11
#define kwc_DefaultForeground 1
#define kwc_DefaultBackground 2
@ -414,7 +406,6 @@ static TwmKeyword keytable[] = {
{ "east", DKEYWORD, D_EAST },
{ "f", FRAME, 0 },
{ "f.autoraise", FKEYWORD, F_AUTORAISE },
{ "f.backiconmgr", FKEYWORD, F_BACKICONMGR },
{ "f.beep", FKEYWORD, F_BEEP },
{ "f.bottomzoom", FKEYWORD, F_BOTTOMZOOM },
{ "f.circledown", FKEYWORD, F_CIRCLEDOWN },
@ -426,29 +417,23 @@ static TwmKeyword keytable[] = {
{ "f.delete", FKEYWORD, F_DELETE },
{ "f.deltastop", FKEYWORD, F_DELTASTOP },
{ "f.destroy", FKEYWORD, F_DESTROY },
{ "f.downiconmgr", FKEYWORD, F_DOWNICONMGR },
{ "f.exec", FSKEYWORD, F_EXEC },
{ "f.file", FSKEYWORD, F_FILE },
{ "f.focus", FKEYWORD, F_FOCUS },
{ "f.forcemove", FKEYWORD, F_FORCEMOVE },
{ "f.forwiconmgr", FKEYWORD, F_FORWICONMGR },
{ "f.fullzoom", FKEYWORD, F_FULLZOOM },
{ "f.function", FSKEYWORD, F_FUNCTION },
{ "f.hbzoom", FKEYWORD, F_BOTTOMZOOM },
{ "f.hideiconmgr", FKEYWORD, F_HIDELIST },
{ "f.horizoom", FKEYWORD, F_HORIZOOM },
{ "f.htzoom", FKEYWORD, F_TOPZOOM },
{ "f.hzoom", FKEYWORD, F_HORIZOOM },
{ "f.iconify", FKEYWORD, F_ICONIFY },
{ "f.identify", FKEYWORD, F_IDENTIFY },
{ "f.lefticonmgr", FKEYWORD, F_LEFTICONMGR },
{ "f.leftzoom", FKEYWORD, F_LEFTZOOM },
{ "f.lower", FKEYWORD, F_LOWER },
{ "f.menu", FSKEYWORD, F_MENU },
{ "f.move", FKEYWORD, F_MOVE },
{ "f.nexticonmgr", FKEYWORD, F_NEXTICONMGR },
{ "f.nop", FKEYWORD, F_NOP },
{ "f.previconmgr", FKEYWORD, F_PREVICONMGR },
{ "f.priority", FSKEYWORD, F_PRIORITY },
{ "f.quit", FKEYWORD, F_QUIT },
{ "f.raise", FKEYWORD, F_RAISE },
@ -456,18 +441,14 @@ static TwmKeyword keytable[] = {
{ "f.refresh", FKEYWORD, F_REFRESH },
{ "f.resize", FKEYWORD, F_RESIZE },
{ "f.restart", FKEYWORD, F_RESTART },
{ "f.righticonmgr", FKEYWORD, F_RIGHTICONMGR },
{ "f.rightzoom", FKEYWORD, F_RIGHTZOOM },
{ "f.saveyourself", FKEYWORD, F_SAVEYOURSELF },
{ "f.showiconmgr", FKEYWORD, F_SHOWLIST },
{ "f.sorticonmgr", FKEYWORD, F_SORTICONMGR },
{ "f.source", FSKEYWORD, F_BEEP }, /* XXX - don't work */
{ "f.startwm", FSKEYWORD, F_STARTWM },
{ "f.title", FKEYWORD, F_TITLE },
{ "f.topzoom", FKEYWORD, F_TOPZOOM },
{ "f.twmrc", FKEYWORD, F_RESTART },
{ "f.unfocus", FKEYWORD, F_UNFOCUS },
{ "f.upiconmgr", FKEYWORD, F_UPICONMGR },
{ "f.version", FKEYWORD, F_VERSION },
{ "f.vlzoom", FKEYWORD, F_LEFTZOOM },
{ "f.vrzoom", FKEYWORD, F_RIGHTZOOM },
@ -475,7 +456,6 @@ static TwmKeyword keytable[] = {
{ "f.warpprev", FKEYWORD, F_WARPPREV },
{ "f.warpring", FSKEYWORD, F_WARPRING },
{ "f.warpto", FSKEYWORD, F_WARPTO },
{ "f.warptoiconmgr", FSKEYWORD, F_WARPTOICONMGR },
{ "f.warptoscreen", FSKEYWORD, F_WARPTOSCREEN },
{ "f.winrefresh", FKEYWORD, F_WINREFRESH },
{ "f.zoom", FKEYWORD, F_ZOOM },
@ -494,15 +474,6 @@ static TwmKeyword keytable[] = {
{ "iconfont", SKEYWORD, kws_IconFont },
{ "iconforeground", CLKEYWORD, kwcl_IconForeground },
{ "iconifybyunmapping", ICONIFY_BY_UNMAPPING, 0 },
{ "iconmanagerbackground", CLKEYWORD, kwcl_IconManagerBackground },
{ "iconmanagerdontshow", ICONMGR_NOSHOW, 0 },
{ "iconmanagerfont", SKEYWORD, kws_IconManagerFont },
{ "iconmanagerforeground", CLKEYWORD, kwcl_IconManagerForeground },
{ "iconmanagergeometry", ICONMGR_GEOMETRY, 0 },
{ "iconmanagerhighlight", CLKEYWORD, kwcl_IconManagerHighlight },
{ "iconmanagers", ICONMGRS, 0 },
{ "iconmanagershow", ICONMGR_SHOW, 0 },
{ "iconmgr", ICONMGR, 0 },
{ "iconregion", ICON_REGION, 0 },
{ "icons", ICONS, 0 },
{ "interpolatemenucolors", KEYWORD, kw0_InterpolateMenuColors },
@ -528,11 +499,9 @@ static TwmKeyword keytable[] = {
{ "move", MOVE, 0 },
{ "movedelta", NKEYWORD, kwn_MoveDelta },
{ "nobackingstore", KEYWORD, kw0_NoBackingStore },
{ "nocasesensitive", KEYWORD, kw0_NoCaseSensitive },
{ "nodefaults", KEYWORD, kw0_NoDefaults },
{ "nograbserver", KEYWORD, kw0_NoGrabServer },
{ "nohighlight", NO_HILITE, 0 },
{ "noiconmanagers", KEYWORD, kw0_NoIconManagers },
{ "nomenushadows", KEYWORD, kw0_NoMenuShadows },
{ "noraiseondeiconify", KEYWORD, kw0_NoRaiseOnDeiconify },
{ "noraiseonmove", KEYWORD, kw0_NoRaiseOnMove },
@ -562,8 +531,6 @@ static TwmKeyword keytable[] = {
{ "savecolor", SAVECOLOR, 0},
{ "select", SELECT, 0 },
{ "shift", SHIFT, 0 },
{ "showiconmanager", KEYWORD, kw0_ShowIconManager },
{ "sorticonmanager", KEYWORD, kw0_SortIconManager },
{ "south", DKEYWORD, D_SOUTH },
{ "squeezetitle", SQUEEZE_TITLE, 0 },
{ "starticonified", START_ICONIFIED, 0 },
@ -634,10 +601,6 @@ int do_single_keyword (int keyword)
if (Scr->FirstTime) Scr->ForceIcon = TRUE;
return 1;
case kw0_NoIconManagers:
Scr->NoIconManagers = TRUE;
return 1;
case kw0_OpaqueMove:
Scr->OpaqueMove = TRUE;
return 1;
@ -650,10 +613,6 @@ int do_single_keyword (int keyword)
/* obsolete */
return 1;
case kw0_SortIconManager:
if (Scr->FirstTime) Scr->SortIconMgr = TRUE;
return 1;
case kw0_NoGrabServer:
Scr->NoGrabServer = TRUE;
return 1;
@ -706,14 +665,6 @@ int do_single_keyword (int keyword)
Scr->DecorateTransients = TRUE;
return 1;
case kw0_ShowIconManager:
Scr->ShowIconManager = TRUE;
return 1;
case kw0_NoCaseSensitive:
Scr->CaseSensitive = FALSE;
return 1;
case kw0_NoRaiseOnWarp:
Scr->NoRaiseWarp = TRUE;
return 1;
@ -759,10 +710,6 @@ int do_string_keyword (int keyword, char *s)
if (!Scr->HaveFonts) Scr->TitleBarFont.name = s;
return 1;
case kws_IconManagerFont:
if (!Scr->HaveFonts) Scr->IconManagerFont.name = s;
return 1;
case kws_UnknownIcon:
if (Scr->FirstTime) GetUnknownIcon (s);
return 1;
@ -851,10 +798,6 @@ name_list **do_colorlist_keyword (int keyword, int colormode, char *s)
GetColor (colormode, &Scr->BorderColor, s);
return &Scr->BorderColorL;
case kwcl_IconManagerHighlight:
GetColor (colormode, &Scr->IconManagerHighlight, s);
return &Scr->IconManagerHighlightL;
case kwcl_BorderTileForeground:
GetColor (colormode, &Scr->BorderTileC.fore, s);
return &Scr->BorderTileForegroundL;
@ -882,14 +825,6 @@ name_list **do_colorlist_keyword (int keyword, int colormode, char *s)
case kwcl_IconBorderColor:
GetColor (colormode, &Scr->IconBorderColor, s);
return &Scr->IconBorderColorL;
case kwcl_IconManagerForeground:
GetColor (colormode, &Scr->IconManagerC.fore, s);
return &Scr->IconManagerFL;
case kwcl_IconManagerBackground:
GetColor (colormode, &Scr->IconManagerC.back, s);
return &Scr->IconManagerBL;
}
return NULL;
}
@ -1003,7 +938,7 @@ do_var_savecolor(int key)
}
/**
* traverse the var save color list placeing the pixels
* traverse the var save color list placing the pixels
* in the root window property.
*/
void
@ -1015,9 +950,6 @@ assign_var_savecolor(void)
case kwcl_BorderColor:
put_pixel_on_root(Scr->BorderColor);
break;
case kwcl_IconManagerHighlight:
put_pixel_on_root(Scr->IconManagerHighlight);
break;
case kwcl_BorderTileForeground:
put_pixel_on_root(Scr->BorderTileC.fore);
break;
@ -1039,12 +971,6 @@ assign_var_savecolor(void)
case kwcl_IconBorderColor:
put_pixel_on_root(Scr->IconBorderColor);
break;
case kwcl_IconManagerForeground:
put_pixel_on_root(Scr->IconManagerC.fore);
break;
case kwcl_IconManagerBackground:
put_pixel_on_root(Scr->IconManagerC.back);
break;
}
cp = cp->next;
}

View File

@ -117,15 +117,6 @@ extern int mods;
#define F_SAVEYOURSELF 29
#define F_VERSION 30
#define F_TITLE 31
#define F_RIGHTICONMGR 32
#define F_LEFTICONMGR 33
#define F_UPICONMGR 34
#define F_DOWNICONMGR 35
#define F_FORWICONMGR 36
#define F_BACKICONMGR 37
#define F_NEXTICONMGR 38
#define F_PREVICONMGR 39
#define F_SORTICONMGR 40
#define F_CIRCLEUP 41
#define F_CIRCLEDOWN 42
#define F_CUTFILE 43
@ -136,7 +127,6 @@ extern int mods;
#define F_WARPNEXT 112 /* string */
#define F_WARPPREV 113 /* string */
#define F_WARPTO 102 /* string */
#define F_WARPTOICONMGR 103 /* string */
#define F_WARPRING 104 /* string */
#define F_FILE 105 /* string */
#define F_EXEC 106 /* string */

View File

@ -63,7 +63,6 @@ in this Software without prior written authorization from The Open Group.
#include "parse.h"
#include "util.h"
#include "resize.h"
#include "iconmgr.h"
#include "add_window.h"
#include "screen.h"
#include "events.h"
@ -220,7 +219,7 @@ MenuStartResize(TwmWindow *tmp_win, int x, int y, int w, int h)
}
/**
* begin a windorew resize operation from AddWindow
* begin a window resize operation from AddWindow
* \param tmp_win the TwmWindow pointer
*/
void
@ -547,17 +546,6 @@ EndResize(void)
SetupWindow (tmp_win, dragx - tmp_win->frame_bw, dragy - tmp_win->frame_bw,
dragWidth, dragHeight, -1);
if (tmp_win->iconmgr)
{
int ncols = tmp_win->iconmgrp->cur_columns;
if (ncols == 0) ncols = 1;
tmp_win->iconmgrp->width = (int) ((dragWidth *
(long) tmp_win->iconmgrp->columns)
/ ncols);
PackIconManager(tmp_win->iconmgrp);
}
if (!Scr->NoRaiseResize)
XRaiseWindow(dpy, tmp_win->frame);
@ -777,11 +765,6 @@ void SetupFrame (TwmWindow *tmp_win, int x, int y, int w, int h, int bw, Bool se
if (bw < 0)
bw = tmp_win->frame_bw; /* -1 means current frame width */
if (tmp_win->iconmgr) {
tmp_win->iconmgrp->width = w;
h = tmp_win->iconmgrp->height + tmp_win->title_height;
}
/*
* According to the July 27, 1988 ICCCM draft, we should send a
* "synthetic" ConfigureNotify event to the client if the window

View File

@ -39,7 +39,6 @@ in this Software without prior written authorization from The Open Group.
#include <X11/cursorfont.h>
#include "list.h"
#include "menus.h"
#include "iconmgr.h"
typedef struct _StdCmap {
struct _StdCmap *next; /* next link in chain */
@ -90,7 +89,7 @@ typedef struct ScreenInfo
MenuRoot *Windows; /* the TwmWindows menu */
TwmWindow *Ring; /* one of the windows in window ring */
TwmWindow *RingLeader; /* current winodw in ring */
TwmWindow *RingLeader; /* current window in ring */
MouseButton Mouse[MAX_BUTTONS+1][NUM_CONTEXTS][MOD_SIZE];
MouseButton DefaultFunction;
@ -128,7 +127,6 @@ typedef struct ScreenInfo
ColorPair MenuC; /* menu colors */
ColorPair MenuTitleC; /* menu title colors */
ColorPair IconC; /* icon colors */
ColorPair IconManagerC; /* icon manager colors */
XColor PointerForeground; /* pointer foreground color */
XColor PointerBackground; /* pointer background color */
ColorPair DefaultC; /* default colors */
@ -136,12 +134,10 @@ typedef struct ScreenInfo
Pixel MenuShadowColor; /* menu shadow color */
Pixel MenuBorderColor; /* menu border color */
Pixel IconBorderColor; /* icon border color */
Pixel IconManagerHighlight; /* icon manager highlight */
Cursor TitleCursor; /* title bar cursor */
Cursor FrameCursor; /* frame cursor */
Cursor IconCursor; /* icon cursor */
Cursor IconMgrCursor; /* icon manager cursor */
Cursor ButtonCursor; /* title bar button cursor */
Cursor MoveCursor; /* move cursor */
Cursor ResizeCursor; /* resize cursor */
@ -158,9 +154,6 @@ typedef struct ScreenInfo
name_list *TitleBackgroundL;
name_list *IconForegroundL;
name_list *IconBackgroundL;
name_list *IconManagerFL;
name_list *IconManagerBL;
name_list *IconMgrs;
name_list *NoTitle; /* list of window names with no title bar */
name_list *MakeTitle; /* list of window names with title bar */
name_list *AutoRaise; /* list of window names to auto-raise */
@ -169,11 +162,8 @@ typedef struct ScreenInfo
name_list *NoStackModeL; /* windows to ignore stack mode requests */
name_list *NoTitleHighlight;/* list of windows to not highlight the TB*/
name_list *DontIconify; /* don't iconify by unmapping */
name_list *IconMgrNoShow; /* don't show in the icon manager */
name_list *IconMgrShow; /* show in the icon manager */
name_list *IconifyByUn; /* windows to iconify by unmapping */
name_list *StartIconified; /* windows to start iconic */
name_list *IconManagerHighlightL; /* icon manager highlight colors */
name_list *SqueezeTitleL; /* windows of which to squeeze title */
name_list *DontSqueezeTitleL; /* windows of which not to squeeze */
name_list *WindowRingL; /* windows in ring */
@ -190,9 +180,7 @@ typedef struct ScreenInfo
MyFont MenuFont; /* menu font structure */
MyFont IconFont; /* icon font structure */
MyFont SizeFont; /* resize font structure */
MyFont IconManagerFont; /* window list font structure */
MyFont DefaultFont;
IconMgr iconmgr; /* default icon manager */
struct IconRegion *FirstRegion; /* pointer to icon regions */
struct IconRegion *LastRegion; /* pointer to the last icon region */
const char *IconDirectory; /* icon directory to search */
@ -227,8 +215,6 @@ typedef struct ScreenInfo
short NoTitlebar; /* put title bars on windows */
short DecorateTransients; /* put title bars on transients */
short IconifyByUnmapping; /* simply unmap windows when iconifying */
short ShowIconManager; /* display the window list */
short IconManagerDontShow; /* show nothing in the icon manager */
short BackingStore; /* use backing store for menus */
short SaveUnder; /* use save under's for menus */
short RandomPlacement; /* randomly place windows that no give hints */
@ -238,10 +224,8 @@ typedef struct ScreenInfo
short TitleHighlight; /* should we highlight the titlebar */
short MoveDelta; /* number of pixels before f.move starts */
short ZoomCount; /* zoom outline count */
short SortIconMgr; /* sort entries in the icon manager */
short Shadow; /* show the menu shadow */
short InterpolateMenuColors;/* make pretty menus */
short NoIconManagers; /* Don't create any icon managers */
short ClientBorderWidth; /* respect client window border width */
short SqueezeTitle; /* make title as small as possible */
short HaveFonts; /* set if fonts have been loaded */

View File

@ -15,7 +15,6 @@ TitleFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
ResizeFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
MenuFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*"
IconFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*"
IconManagerFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*"
#ClientBorderWidth
Color
@ -33,8 +32,6 @@ Color
IconBackground "rgb:2/a/9"
IconForeground "gray85"
IconBorderColor "gray85"
IconManagerBackground "rgb:2/a/9"
IconManagerForeground "gray85"
}
#
@ -60,9 +57,6 @@ Button2 = : title : f.raiselower
Button1 = : icon : f.function "move-or-iconify"
Button2 = : icon : f.iconify
Button1 = : iconmgr : f.iconify
Button2 = : iconmgr : f.iconify
#
# And a menus with the usual things
#
@ -77,8 +71,6 @@ menu "defops"
"" f.nop
"Focus" f.focus
"Unfocus" f.unfocus
"Show Iconmgr" f.showiconmgr
"Hide Iconmgr" f.hideiconmgr
"" f.nop
"Xterm" f.exec "exec xterm &"
"" f.nop

View File

@ -64,7 +64,6 @@ in this Software without prior written authorization from The Open Group.
#include <signal.h>
#include <fcntl.h>
#include "twm.h"
#include "iconmgr.h"
#include "add_window.h"
#include "gc.h"
#include "parse.h"
@ -121,7 +120,6 @@ Cursor LeftButt;
XContext TwmContext; /* context for twm windows */
XContext MenuContext; /* context for all menu windows */
XContext IconManagerContext; /* context for all window list windows */
XContext ScreenContext; /* context to get screen data */
XContext ColormapContext; /* context for colormap operations */
@ -351,7 +349,6 @@ main(int argc, char *argv[])
HasSync = XSyncQueryExtension(dpy, &SyncEventBase, &SyncErrorBase);
TwmContext = XUniqueContext();
MenuContext = XUniqueContext();
IconManagerContext = XUniqueContext();
ScreenContext = XUniqueContext();
ColormapContext = XUniqueContext();
@ -451,12 +448,7 @@ main(int argc, char *argv[])
Scr->NoStackModeL = NULL;
Scr->NoTitleHighlight = NULL;
Scr->DontIconify = NULL;
Scr->IconMgrNoShow = NULL;
Scr->IconMgrShow = NULL;
Scr->IconifyByUn = NULL;
Scr->IconManagerFL = NULL;
Scr->IconManagerBL = NULL;
Scr->IconMgrs = NULL;
Scr->StartIconified = NULL;
Scr->SqueezeTitleL = NULL;
Scr->DontSqueezeTitleL = NULL;
@ -528,22 +520,6 @@ main(int argc, char *argv[])
NewFontCursor(&MiddleButt, "middlebutton");
}
Scr->iconmgr.x = 0;
Scr->iconmgr.y = 0;
Scr->iconmgr.width = 150;
Scr->iconmgr.height = 5;
Scr->iconmgr.next = NULL;
Scr->iconmgr.prev = NULL;
Scr->iconmgr.lasti = &(Scr->iconmgr);
Scr->iconmgr.first = NULL;
Scr->iconmgr.last = NULL;
Scr->iconmgr.active = NULL;
Scr->iconmgr.scr = Scr;
Scr->iconmgr.columns = 1;
Scr->iconmgr.count = 0;
Scr->iconmgr.name = "TWM";
Scr->iconmgr.icon_name = "Icons";
Scr->IconDirectory = NULL;
Scr->siconifyPm = None;
@ -580,9 +556,6 @@ main(int argc, char *argv[])
JunkY = 0;
XQueryTree(dpy, Scr->Root, &root, &parent, &children, &nchildren);
CreateIconManagers();
if (!Scr->NoIconManagers)
Scr->iconmgr.twm_win->icon = TRUE;
/*
* weed out icon windows
@ -617,18 +590,6 @@ main(int argc, char *argv[])
}
}
if (Scr->ShowIconManager && !Scr->NoIconManagers)
{
Scr->iconmgr.twm_win->icon = FALSE;
if (Scr->iconmgr.count)
{
SetMapStateProp (Scr->iconmgr.twm_win, NormalState);
XMapWindow(dpy, Scr->iconmgr.w);
XMapWindow(dpy, Scr->iconmgr.twm_win->frame);
}
}
attributes.border_pixel = Scr->DefaultC.fore;
attributes.background_pixel = Scr->DefaultC.back;
attributes.event_mask = (ExposureMask | ButtonPressMask |
@ -693,9 +654,6 @@ InitVariables(void)
FreeList(&Scr->TitleBackgroundL);
FreeList(&Scr->IconForegroundL);
FreeList(&Scr->IconBackgroundL);
FreeList(&Scr->IconManagerFL);
FreeList(&Scr->IconManagerBL);
FreeList(&Scr->IconMgrs);
FreeList(&Scr->NoTitle);
FreeList(&Scr->MakeTitle);
FreeList(&Scr->AutoRaise);
@ -704,11 +662,8 @@ InitVariables(void)
FreeList(&Scr->NoStackModeL);
FreeList(&Scr->NoTitleHighlight);
FreeList(&Scr->DontIconify);
FreeList(&Scr->IconMgrNoShow);
FreeList(&Scr->IconMgrShow);
FreeList(&Scr->IconifyByUn);
FreeList(&Scr->StartIconified);
FreeList(&Scr->IconManagerHighlightL);
FreeList(&Scr->SqueezeTitleL);
FreeList(&Scr->DontSqueezeTitleL);
FreeList(&Scr->WindowRingL);
@ -717,7 +672,6 @@ InitVariables(void)
NewFontCursor(&Scr->FrameCursor, "top_left_arrow");
NewFontCursor(&Scr->TitleCursor, "top_left_arrow");
NewFontCursor(&Scr->IconCursor, "top_left_arrow");
NewFontCursor(&Scr->IconMgrCursor, "top_left_arrow");
NewFontCursor(&Scr->MoveCursor, "fleur");
NewFontCursor(&Scr->ResizeCursor, "fleur");
NewFontCursor(&Scr->MenuCursor, "sb_left_arrow");
@ -751,9 +705,6 @@ InitVariables(void)
Scr->PointerBackground.pixel = white;
XQueryColor(dpy, Scr->TwmRoot.cmaps.cwins[0]->colormap->c,
&Scr->PointerBackground);
Scr->IconManagerC.fore = black;
Scr->IconManagerC.back = white;
Scr->IconManagerHighlight = black;
Scr->FramePadding = 2; /* values that look "nice" on */
Scr->TitlePadding = 8; /* 75 and 100dpi displays */
@ -782,8 +733,6 @@ InitVariables(void)
Scr->NoTitlebar = FALSE;
Scr->DecorateTransients = FALSE;
Scr->IconifyByUnmapping = FALSE;
Scr->ShowIconManager = FALSE;
Scr->IconManagerDontShow =FALSE;
Scr->BackingStore = TRUE;
Scr->SaveUnder = TRUE;
Scr->RandomPlacement = FALSE;
@ -793,10 +742,8 @@ InitVariables(void)
Scr->TitleHighlight = TRUE;
Scr->MoveDelta = 1; /* so that f.deltastop will work */
Scr->ZoomCount = 8;
Scr->SortIconMgr = FALSE;
Scr->Shadow = TRUE;
Scr->InterpolateMenuColors = FALSE;
Scr->NoIconManagers = FALSE;
Scr->ClientBorderWidth = FALSE;
Scr->SqueezeTitle = -1;
Scr->FirstRegion = NULL;
@ -822,9 +769,6 @@ InitVariables(void)
Scr->SizeFont.font = NULL;
Scr->SizeFont.fontset = NULL;
Scr->SizeFont.name = DEFAULT_FAST_FONT;
Scr->IconManagerFont.font = NULL;
Scr->IconManagerFont.fontset = NULL;
Scr->IconManagerFont.name = DEFAULT_NICE_FONT;
Scr->DefaultFont.font = NULL;
Scr->DefaultFont.fontset = NULL;
Scr->DefaultFont.name = DEFAULT_FAST_FONT;
@ -838,7 +782,6 @@ CreateFonts (void)
GetFont(&Scr->MenuFont);
GetFont(&Scr->IconFont);
GetFont(&Scr->SizeFont);
GetFont(&Scr->IconManagerFont);
GetFont(&Scr->DefaultFont);
Scr->HaveFonts = TRUE;
}

View File

@ -105,21 +105,19 @@ typedef void (*SigProc)(int); /* type of function returned by signal() */
#define C_ICON 2
#define C_ROOT 3
#define C_FRAME 4
#define C_ICONMGR 5
#define C_NAME 6
#define C_IDENTIFY 7
#define NUM_CONTEXTS 8
#define C_NAME 5
#define C_IDENTIFY 6
#define NUM_CONTEXTS 7
#define C_WINDOW_BIT (1 << C_WINDOW)
#define C_TITLE_BIT (1 << C_TITLE)
#define C_ICON_BIT (1 << C_ICON)
#define C_ROOT_BIT (1 << C_ROOT)
#define C_FRAME_BIT (1 << C_FRAME)
#define C_ICONMGR_BIT (1 << C_ICONMGR)
#define C_NAME_BIT (1 << C_NAME)
#define C_ALL_BITS (C_WINDOW_BIT | C_TITLE_BIT | C_ICON_BIT |\
C_ROOT_BIT | C_FRAME_BIT | C_ICONMGR_BIT)
C_ROOT_BIT | C_FRAME_BIT)
/* modifiers for button presses */
#define MOD_SIZE ((ShiftMask | ControlMask | Mod1Mask \
@ -256,7 +254,6 @@ typedef struct TwmWindow
XWMHints *wmhints; /* WM hints */
Window group; /* group ID */
XClassHint class;
struct WList *list;
/***********************************************************************
* color definitions per window
**********************************************************************/
@ -276,11 +273,9 @@ typedef struct TwmWindow
short highlight; /* should highlight this window */
short stackmode; /* honor stackmode requests */
short iconify_by_unmapping; /* unmap window to iconify it */
short iconmgr; /* this is an icon manager window */
short transient; /* this is a transient window */
Window transientfor; /* window contained in XA_XM_TRANSIENT_FOR */
short titlehighlight; /* should I highlight the title bar */
struct IconMgr *iconmgrp; /* pointer to it if this is an icon manager */
int save_frame_x; /* x position of frame */
int save_frame_y; /* y position of frame */
int save_frame_width; /* width of frame */
@ -366,7 +361,6 @@ extern XClassHint NoClass;
extern XContext TwmContext;
extern XContext MenuContext;
extern XContext IconManagerContext;
extern XContext ScreenContext;
extern XContext ColormapContext;