--- wm2-4+svn20090216.orig/Config.h +++ wm2-4+svn20090216/Config.h @@ -7,7 +7,9 @@ #define CONFIG_NASTY_FONT "fixed" #define CONFIG_EXEC_USING_SHELL False +#ifndef CONFIG_NEW_WINDOW_COMMAND #define CONFIG_NEW_WINDOW_COMMAND "xterm" +#endif #define CONFIG_EVERYTHING_ON_ROOT_MENU False // You can't have CLICK_TO_FOCUS without RAISE_ON_FOCUS but the other --- wm2-4+svn20090216.orig/General.h +++ wm2-4+svn20090216/General.h @@ -10,9 +10,7 @@ #undef _POSIX_SOURCE #endif -#ifndef __FreeBSD__ #define _POSIX_SOURCE 1 -#endif #include #include --- wm2-4+svn20090216.orig/Makefile +++ wm2-4+svn20090216/Makefile @@ -4,20 +4,21 @@ CC = gcc CCC = g++ -CFLAGS = -O2 -Wall $(INCS) +CFLAGS = -O2 -Wall +LDFLAGS = OBJECTS = Border.o Buttons.o Client.o Events.o Main.o Manager.o Rotated.o .c.o: - $(CC) -c $(CFLAGS) $< + $(CC) -c $(CFLAGS) $(INCS) $< .C.o: - $(CCC) -c $(CFLAGS) $< + $(CCC) -c $(CFLAGS) $(INCS) $< wm2: $(OBJECTS) - $(CCC) -o wm2 $(OBJECTS) $(LIBS) + $(CCC) -o wm2 $(CFLAGS) $(LDFLAGS) $(OBJECTS) $(LIBS) depend: - makedepend -- $(CFLAGS) -- *.C + makedepend -- $(CFLAGS) $(INCS) -- *.C clean: rm -f *.o core --- wm2-4+svn20090216.orig/Manager.C +++ wm2-4+svn20090216/Manager.C @@ -312,7 +312,7 @@ } -unsigned long WindowManager::allocateColour(char *name, char *desc) +unsigned long WindowManager::allocateColour(const char *name, const char *desc) { XColor nearest, ideal; @@ -551,16 +551,16 @@ } if (CONFIG_EXEC_USING_SHELL) { - execl(m_shell, m_shell, "-c", CONFIG_NEW_WINDOW_COMMAND, 0); + execl(m_shell, m_shell, "-c", CONFIG_NEW_WINDOW_COMMAND, (char*)0); fprintf(stderr, "wm2: exec %s", m_shell); perror(" failed"); } - execlp(CONFIG_NEW_WINDOW_COMMAND, CONFIG_NEW_WINDOW_COMMAND, 0); + execlp(CONFIG_NEW_WINDOW_COMMAND, CONFIG_NEW_WINDOW_COMMAND, (char*)0); fprintf(stderr, "wm2: exec %s", CONFIG_NEW_WINDOW_COMMAND); perror(" failed"); - execlp("xterm", "xterm", "-ut", 0); + execlp("xterm", "xterm", "-ut", (char*)0); perror("wm2: exec xterm failed"); exit(1); } --- wm2-4+svn20090216.orig/Manager.h +++ wm2-4+svn20090216/Manager.h @@ -40,7 +40,7 @@ void installCursor(RootCursor); void installCursorOnWindow(RootCursor, Window); void installColormap(Colormap); - unsigned long allocateColour(char *, char *); + unsigned long allocateColour(const char *, const char *); void considerFocusChange(Client *, Window, Time timestamp); void stopConsideringFocus(); --- wm2-4+svn20090216.orig/Rotated.C +++ wm2-4+svn20090216/Rotated.C @@ -28,8 +28,8 @@ int xv_errno; -static char *my_strdup(char *); -static char *my_strtok(char *, char *); +static char *my_strdup(const char *); +static char *my_strtok(char *, const char *); /* ---------------------------------------------------------------------- */ @@ -37,7 +37,7 @@ /* *** Routine to mimic `strdup()' (some machines don't have it) *** */ -static char *my_strdup(char *str) +static char *my_strdup(const char *str) { char *s; @@ -61,7 +61,7 @@ /* *** Routine to replace `strtok' : this one returns a zero length string if it encounters two consecutive delimiters *** */ -static char *my_strtok(char *str1, char *str2) +static char *my_strtok(char *str1, const char *str2) { char *ret; size_t i, j, stop; @@ -121,7 +121,7 @@ /* *** Load the rotated version of a given font *** */ -XRotFontStruct *XRotLoadFont(Display *dpy, char *fontname, float angle) +XRotFontStruct *XRotLoadFont(Display *dpy, const char *fontname, float angle) { char val; XImage *I1, *I2; @@ -470,7 +470,8 @@ int xp = 0, yp = 0, dir; size_t i; int nl = 1, max_width = 0, this_width; - char *str1, *str2 = "\n\0", *str3; + char *str1, *str3; + const char *str2 = "\n\0"; if (text == NULL) return; --- wm2-4+svn20090216.orig/Rotated.h +++ wm2-4+svn20090216/Rotated.h @@ -58,7 +58,7 @@ extern float XRotVersion(char *, int); -extern XRotFontStruct *XRotLoadFont(Display *, char *, float); +extern XRotFontStruct *XRotLoadFont(Display *, const char *, float); extern void XRotUnloadFont(Display *, XRotFontStruct *); extern int XRotTextWidth(XRotFontStruct *, char *, int); extern void XRotDrawString(Display *, XRotFontStruct *, Drawable, GC, --- wm2-4+svn20090216.orig/debian/README.Debian +++ wm2-4+svn20090216/debian/README.Debian @@ -0,0 +1,7 @@ +wm2 for Debian +-------------- + +wm2 does not allow any run-time configuration. To change the compile +time configurations, get the source, e.g. with "apt-get source -x wm2". + + -- Bernhard R. Link , Thu, 1 Dec 2005 21:25:44 +0100 --- wm2-4+svn20090216.orig/debian/install +++ wm2-4+svn20090216/debian/install @@ -0,0 +1 @@ +wm2 /usr/bin --- wm2-4+svn20090216.orig/debian/control +++ wm2-4+svn20090216/debian/control @@ -0,0 +1,19 @@ +Source: wm2 +Section: x11 +Priority: optional +Maintainer: Bernhard R. Link +Build-Depends: x11proto-core-dev, libx11-dev, libxext-dev, debhelper (>= 5.0.0) +Standards-Version: 3.8.0 +Homepage: http://www.all-day-breakfast.com/wm2/ + +Package: wm2 +Architecture: any +Depends: ${shlibs:Depends} +Recommends: xterm | x-terminal-emulator +Provides: x-window-manager +Description: small, unconfigurable window manager + wm2 is a window manager for X. It provides an unusual style of window + decoration and as little functionality as Chris Cannam feels comfortable + with in a window manager. wm2 is not configurable, except by editing + the source and recompiling the code, and is really intended for people + who don't particularly want their window manager to be too friendly. --- wm2-4+svn20090216.orig/debian/changelog +++ wm2-4+svn20090216/debian/changelog @@ -0,0 +1,145 @@ +wm2 (4+svn20090216-1) unstable; urgency=low + + * upgrade to Debian policy 3.8.0 + * build-depend on x11proto-core-dev instead of x-dev (Closes: 515493) + * new .orig.tar.gz tarball extracted from upstream's SVN. + * move most functional modifications to debian/rules + + -- Bernhard R. Link Mon, 16 Feb 2009 14:03:54 +0100 + +wm2 (4-10) unstable; urgency=low + + * modernize debian/rules (build-arch, dh_install, + don't ignore make clean errors) + * drop pre-sarge compatibility build-dependencies + * dump standards version to 3.7.2 (no changes needed) + * update to new menu layout + * add homepage field to debian/control + + -- Bernhard R. Link Tue, 04 Dec 2007 14:01:19 +0100 + +wm2 (4-9) unstable; urgency=low + + * repack using debhelper compat level 4 + (to get rid of lintian warning against level 1) + * rebuild will fix place menu files are placed + + -- Bernhard R. Link Thu, 1 Dec 2005 22:17:50 +0100 + +wm2 (4-8) unstable; urgency=low + + * Adopted build-depends to xlib split + * switch from dh_installmanpages to dh_installman + * updated to new standards version: no changes needed + + -- Bernhard R. Link Fri, 10 Dec 2004 22:17:13 +0100 + +wm2 (4-7) unstable; urgency=low + + * Now with the correct new Maintainer-field. + * Exiting wm2 no longer hangs till next event. + * added recommends to x-terminal-emulator. + * removed unused code generating warnings on ia64 and alpha. + + -- Bernhard R. Link Sun, 1 Jun 2003 14:28:58 +0200 + +wm2 (4-6) unstable; urgency=low + + * adopting wm2 (closes: #194038) + * Moved binary and manpage out of /usr/X11R6 + + * acknowledge NMU 4-4.1 (closes: #53358, #53694, #35666 and #36022) + * acknowledge NMU 4-4.2 (was there no patch in bts or was it closed?) + * acknowledge NMU 4-5.1 (closes: #105074) + * some cosmetic changes to the code to get rid of compiler warnings. + * removed the unused listmacro.h from the source + * removed call to this crappy dh_installwm... + + -- Bernhard R. Link Fri, 30 May 2003 17:42:26 +0200 + +wm2 (4-5.1) unstable; urgency=low + + * NMU + * Fix g++ 3.0 errors. Closes: #105074. + * Missing Build-Depends: debhelper (and xlibs-dev, but that one gets guessed) + + -- LaMont Jones Mon, 3 Dec 2001 20:15:16 -0700 + +wm2 (4-5) unstable; urgency=low + + * Removed the "debian menus" kludge. (closes: #64188 and #50958) + * Back-ported resizing fix from wmx (closes: #69790) + * Switched terminal starter to use x-terminal-emulator + * Updated copyright and location files for new website. (closes: #71205) + + -- Ted Whalen Fri, 14 Jul 2000 23:44:03 -0500 + +wm2 (4-4.2) unstable; urgency=low + + * Non-maintainer upload for PowerPC. + * Add -lXt to Makefile, so it compiles. + + -- Chris Lawrence Sun, 9 Jan 2000 06:12:15 -0600 + +wm2 (4-4.1) unstable; urgency=low + + * Non-maintainer upload because of release critical bugs. + * Recompile for libstdc++ 2.10 (closes: #53358). + * Changed #!/bin/sh to #!/bin/bash in system.wm2rc-menu because of bashism + (closes: #35666). + * Remove /etc/X11/wm2 on purge (closes: #36022). + * Suggests: menu. + * Provides: x-window-manager and added x-window-manager alternative + (closes: #53694). + * Standards-version: 3.0.1 (FHS). + + -- Ruud de Rooij Fri, 7 Jan 2000 15:35:34 -0600 + +wm2 (4-4) unstable; urgency=low + + * add the #!/bin/sh to postrm -- fixes bug #34830 + + -- Ted Whalen Sat, 20 Mar 1999 10:30:24 -0600 + +wm2 (4-3) unstable; urgency=low + + * updated debian/menu to new format (lintian complained) + * changed debian/rules to use debhelper + + -- Ted Whalen Tue, 9 Mar 1999 21:26:52 -0600 + +wm2 (4-2) unstable frozen; urgency=low + + * recompiled to fix bugs #24513 and #29025. + + -- ted whalen Thu, 18 Feb 1999 11:04:19 -0600 + +wm2 (4-1) unstable; urgency=low + + * New maintainer + * New upstream version + + -- ted whalen Sun, 7 Jun 1998 23:12:53 -0500 + +wm2 (3-3) unstable; urgency=low + + * Recompiled to fix dependencies (bug#12717) + * Fixed Makefile to build with egcs g++ + * Updated to standards-version 2.4.0.0 + * Non-maintainer upload + + -- Hamish Moffatt Fri, 1 May 1998 17:24:00 +1100 + +wm2 (3-2) unstable; urgency=low + + * Fixed Chris' name + * Fixed quoting in /etc/menu-methods/wm2 + + -- joost witteveen Sun, 3 Aug 1997 22:47:17 +0200 + +wm2 (3-1) unstable; urgency=low + + * Initial Release. + * Created (copied) man pages. + + -- joost witteveen Sun, 19 Jan 1997 20:47:27 +0100 --- wm2-4+svn20090216.orig/debian/copyright +++ wm2-4+svn20090216/debian/copyright @@ -0,0 +1,54 @@ +This package was originally debianized by joost witteveen +Sun, 19 Jan 1997 20:47:27 +0100. +and repackaged reusing many parts by Bernhard R. Link +Thu, 1 Dec 2005 + +It can be downloaded from: http://www.all-day-breakfast.com/wm2/wm2-4.tar.gz + +The current .orig.tar.gz was generated with: + +svn export https://wm2.svn.sourceforge.net/svnroot/wm2/trunk/wm2 wm2-4+svn$(date +'%Y%m%d') +tar -czf wm2_4+svn$(date +'%Y%m%d').orig.tar.gz wm2-4+svn$(date +'%Y%m%d') + +Copyright: + +The wm2 code itself is copyright: + + Copyright (c) 1996-7 Chris Cannam. + Third release, January 1997 + Parts derived from 9wm Copyright (c) 1994-96 David Hogan + Copying and redistribution encouraged. + + +The text rotation code is copyright: + + xvertext, Copyright (c) 1992 Alan Richardson (mppa3@uk.ac.sussex.syma) + + Permission to use, copy, modify, and distribute this software and its + documentation for any purpose and without fee is hereby granted, provided + that the above copyright notice appear in all copies and that both the + copyright notice and this permission notice appear in supporting + documentation. All work developed as a consequence of the use of + this program should duly acknowledge such use. No representations are + made about the suitability of this software for any purpose. It is + provided "as is" without express or implied warranty. + + +For those interested, the 9wm code this programme is based on is +copyright: + + 9wm is free software, and is Copyright (c) 1994-1996 by David Hogan. + Permission is granted to all sentient beings to use this software, + to make copies of it, and to distribute those copies, provided + that: + + (1) the copyright and licence notices are left intact + (2) the recipients are aware that it is free software + (3) any unapproved changes in functionality are either + (i) only distributed as patches + or (ii) distributed as a new program which is not called 9wm + and whose documentation gives credit where it is due + (4) the author is not held responsible for any defects + or shortcomings in the software, or damages caused by it. + + There is no warranty for this software. Have a nice day. --- wm2-4+svn20090216.orig/debian/rules +++ wm2-4+svn20090216/debian/rules @@ -0,0 +1,63 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + MAKEFLAGS += -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +endif + +# it's a C++ program, but it uses CFLAGS instead of CXXFLAGS +CFLAGS = -Wall -g +CPPFLAGS = "-DCONFIG_NEW_WINDOW_COMMAND=\"x-terminal-emulator\"" +ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +build-arch: build-arch-stamp +build-indep: +build: build-arch-stamp + +build-arch-stamp: + dh_testdir + $(MAKE) CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs" \ + LIBS="-lXext -lX11" INCS='$(CPPFLAGS)' + touch build-arch-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-arch-stamp + -rm -f Makefile.bak + $(MAKE) distclean + dh_clean + +# Build architecture-independent files +binary-indep: +# We have nothing to do + +# Build architecture-dependent files +binary-arch: build-arch-stamp + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + dh_install + dh_installchangelogs + dh_installdocs + dh_installmenu + dh_installman debian/wm2.1 + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build build-arch build-indep clean binary-indep binary-arch binary --- wm2-4+svn20090216.orig/debian/compat +++ wm2-4+svn20090216/debian/compat @@ -0,0 +1 @@ +5 --- wm2-4+svn20090216.orig/debian/postinst +++ wm2-4+svn20090216/debian/postinst @@ -0,0 +1,15 @@ +#!/bin/sh -e + +if [ "$1" = "configure" ]; then + update-alternatives \ + --install \ + /usr/bin/x-window-manager \ + x-window-manager \ + /usr/bin/wm2 20 \ + --slave \ + /usr/share/man/man1/x-window-manager.1.gz \ + x-window-manager.1.gz \ + /usr/share/man/man1/wm2.1.gz +fi + +#DEBHELPER# --- wm2-4+svn20090216.orig/debian/prerm +++ wm2-4+svn20090216/debian/prerm @@ -0,0 +1,16 @@ +#!/bin/sh -e + +case "$1" in + upgrade) ;; + failed-upgrade) + if dpkg --compare-versions "$2" '<<' "4-6" ; then + update-alternatives --remove x-window-manager /usr/bin/X11/wm2 + update-alternatives --remove x-window-manager /usr/X11R6/bin/wm2 + fi + ;; + remove) + update-alternatives --remove x-window-manager /usr/bin/wm2 + ;; +esac + +#DEBHELPER# --- wm2-4+svn20090216.orig/debian/wm2.1 +++ wm2-4+svn20090216/debian/wm2.1 @@ -0,0 +1,105 @@ +.TH wm2 1 +.SH NAME +wm2 \- Small, non-configurable Window Manager for X +.SH SYNOPSIS +.B wm2 +.SH DESCRIPTION +.I wm2 +is a window manager for X. It provides an unusual style of window +decoration and as little functionality as I feel comfortable with in a +window manager. wm2 is not configurable, except by editing the source +and recompiling the code, and is really intended for people who don't +particularly want their window manager to be too friendly. +.PP +wm2 provides: +.IP -- +Decorative frames for your windows. +.IP -- +The ability to move, resize, hide and restore windows +.IP -- +No icons. +.IP -- +No configurable root menus, buttons or mouse or keyboard bindings. +.IP -- +No virtual desktop, toolbars or integrated applications. +.SH USING wm2 +To run wm2, make sure you're not already running a window manager, +make sure the DISPLAY variable is correctly set, and then execute the +file "wm2". There are no command-line options or X resources, and +there is no start-up file. If your X server doesn't support the Shape +extension, wm2 will exit (and will never work on your server); if it +can't find the required fonts or allocate the required colours, it +will also exit (but you should be able to fix this by changing the +definitions in Config.h and recompiling). +.PP +Available window manipulations are: +.IP -- +To focus a window: Move your mouse in the window. If you +want a different focusing policy, you'll have to recompile +wm2 (see the README for info). +.IP -- +To raise a window: click on its tab or frame, unless you have +auto-raise on focus set in Config.h. +.IP -- +To move a window: make sure it's in focus, then click and drag +on its tab. +.IP -- +To hide a window: make sure it's in focus, then click on the +button at the top of its tab. +.IP -- +To recover a hidden window: click left button on the root +window for the root menu, and choose the window you want. +.IP -- +To start a new xterm: use the first item on root menu ("New"). +.IP -- +To delete a window: make sure it's in focus, click on the +button on the tab, hold the mouse button for at least a +second and a half until the cursor changes to a cross, then +release. (I know, it's not very easy. On the other hand, +things like Windows-95 tend to obscure the fact that most +windows already have a perfectly good Close option.) +.IP -- +To resize a window: make sure it's in focus, then click and +drag on its bottom-right corner. For a constrained resize, +click and drag on the bottom-left or top-right corner of +the enclosing window frame. +.IP -- +To lower a window: click with the right mouse button on its +tab or frame. (This was the only new feature in the second +release.) +.IP -- +To exit from wm2: move the mouse pointer to the very edge of the +screen at the extreme lower-right corner, and click left button on +the root window for the root menu. The menu should have an extra +option labelled "Exit wm2"; select this. (This is a new feature +in the third release.) +.PP +All move and resize operations are opaque. +.PP +Focus policy. This is a compile-time option. To rebuild, see +the README in /usr/share/doc/wm2/README.gz +.SH CREDITS +wm2 was written by Chris Cannam, recycling a lot of code and structure +from "9wm" by David Hogan (see http://www.cs.su.oz.au/~dhog/ ). 9wm +is written in C, so very little of the code is used verbatim, but the +intention was to reuse and a lot of the resulting code is +recognisable. (Also 9wm's minimalism was rather inspiring.) I've +made enough changes to make it very probable that any bugs you find +will be my fault rather than David's. + +wm2 also uses version 2.0 of Alan Richardson's "xvertext" +font-rotation routines. + +The sideways tabs on the window frames were Andy Green's idea. + +If you want to hack the code into something else for your own +amusement, please go ahead. Feel free to modify and redistribute, as +long as you retain the original copyrights as appropriate. + +.SH AUTHOR +Chris Cannam, cannam@zands.demon.co.uk + +.SH BUGS +The principal bug is that wm2 now has too many features. That aside, +if you find a bug, please report it to me (preferably with a fix). + --- wm2-4+svn20090216.orig/debian/dirs +++ wm2-4+svn20090216/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/share/man/man1 --- wm2-4+svn20090216.orig/debian/menu +++ wm2-4+svn20090216/debian/menu @@ -0,0 +1,2 @@ +?package(wm2):command="/usr/bin/wm2" needs="wm" \ + section="Window Managers" title="wm2" --- wm2-4+svn20090216.orig/debian/watch +++ wm2-4+svn20090216/debian/watch @@ -0,0 +1,9 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# See uscan(1) for format + +# Compulsory line, this is a version 3 file +version=3 + +http://www.all-day-breakfast.com/wm2/index.html wm2-(.*)\.tar\.gz