M Border.C +2 -2
@@ 41,7 41,7 @@ void BorderRectangleList::appendRect(int
Border::Border(Client *const c, Window child) :
m_client(c), m_parent(0), m_tab(0),
m_child(child), m_button(0), m_resize(0), m_label(0),
- m_tabHeight(-1), m_prevW(-1), m_prevH(-1)
+ m_prevW(-1), m_prevH(-1), m_tabHeight(-1)
{
m_parent = root();
@@ 643,7 643,7 @@ void Border::configure(int x, int y, int
shapeParent(w, h);
setFrameVisibility(m_client->isActive(), w, h);
- if (force ||
+ if (force || w != m_prevW ||
prevTabHeight != m_tabHeight || m_prevW < 0 || m_prevH < 0) {
wc.x = 0;
M Client.C +0 -21
@@ 399,27 399,6 @@ char *Client::getProperty(Atom a)
return (char *)p;
}
-
-int Client::getAtomProperty(Atom a, Atom type)
-{
- char **p, *x;
- if (getProperty_aux(display(), m_window, a, type, 1L,
- (unsigned char **)&p) <= 0) {
- return 0;
- }
-
- x = *p;
- XFree((void *)p);
- return (int)x;
-}
-
-
-int Client::getIntegerProperty(Atom a)
-{
- return getAtomProperty(a, XA_INTEGER);
-}
-
-
void Client::setState(int state)
{
m_state = state;
M Client.h +3 -2
@@ 125,8 125,9 @@ private:
WindowManager *const m_windowManager;
char *getProperty(Atom);
- int getAtomProperty(Atom, Atom);
- int getIntegerProperty(Atom);
+ // Removing, as I do not know if it works correctly for 64-bit thingies
+ // int getAtomProperty(Atom, Atom);
+ //int getIntegerProperty(Atom);
// accessors
Boolean getState(int *);
M Events.C +5 -2
@@ 13,6 13,9 @@ int WindowManager::loop()
nextEvent(&ev);
m_currentTime = CurrentTime;
+ if( !m_looping )
+ break;
+
switch (ev.type) {
case ButtonPress:
@@ 175,7 178,7 @@ void WindowManager::checkDelaysForFocus(
{
if (!CONFIG_AUTO_RAISE) return;
- int t = timestamp(True);
+ Time t = timestamp(True);
if (m_focusPointerMoved) { // only raise when pointer stops
@@ 439,7 442,7 @@ void Client::eventUnmap(XUnmapEvent *e)
void WindowManager::eventCreate(XCreateWindowEvent *e)
{
if (e->override_redirect) return;
- Client *c = windowToClient(e->window, True);
+ windowToClient(e->window, True);
}
M General.h +2 -0
@@ 10,7 10,9 @@
#undef _POSIX_SOURCE
#endif
+#ifndef __FreeBSD__
#define _POSIX_SOURCE 1
+#endif
#include <stdio.h>
#include <signal.h>
M Makefile +3 -3
@@ 1,9 1,10 @@
-LIBS = -L/usr/X11/lib -lXext -lX11 -lXmu -lm
+LIBS = -L/usr/X11R6/lib -lXext -lX11 -lXt -lXmu -lSM -lICE -lm
+INCS = -I/usr/X11R6/include
CC = gcc
CCC = g++
-CFLAGS = -O2
+CFLAGS = -O2 $(INCS)
OBJECTS = Border.o Buttons.o Client.o Events.o Main.o Manager.o Rotated.o
.c.o:
@@ 13,7 14,6 @@ OBJECTS = Border.o Buttons.o Client.o Ev
$(CCC) -c $(CFLAGS) $<
wm2: $(OBJECTS)
- mv -f wm2 wm2.old >& /dev/null || true
$(CCC) -o wm2 $(OBJECTS) $(LIBS)
depend:
M Manager.C +1 -1
@@ 28,7 28,7 @@ WindowManager::WindowManager() :
m_menuGC(0), m_menuWindow(0), m_menuFont(0), m_focusChanging(False)
{
fprintf(stderr, "\nwm2: Copyright (c) 1996-7 Chris Cannam."
- " Fourth release, March 1997\n"
+ " Not a release\n"
" Parts derived from 9wm Copyright (c) 1994-96 David Hogan\n"
" %s\n Copying and redistribution encouraged. "
"No warranty.\n\n", XV_COPYRIGHT);
M README +2 -2
@@ 170,5 170,5 @@ if you find a bug, please report it to m
-Chris Cannam, cannam@zands.demon.co.uk
-October 1996
+Chris Cannam, cannam@all-day-breakfast.com
+http://www.all-day-breakfast.com/wm2/
M Rotated.C +4 -3
@@ 64,8 64,8 @@ static char *my_strdup(char *str)
static char *my_strtok(char *str1, char *str2)
{
char *ret;
- int i, j, stop;
- static int start, len;
+ size_t i, j, stop;
+ static size_t start, len;
static char *stext;
/* this error should never occur ... */
@@ 468,7 468,8 @@ void XRotDrawAlignedString(Display *dpy,
char *text, int align)
{
int xp = 0, yp = 0, dir;
- int i, nl = 1, max_width = 0, this_width;
+ size_t i;
+ int nl = 1, max_width = 0, this_width;
char *str1, *str2 = "\n\0", *str3;
if (text == NULL)
M listmacro2.h +1 -1
@@ 41,7 41,7 @@ private: \
#define implementList(List, T) \
\
-List::List() : m_count(0), m_items(0) { } \
+List::List() : m_items(0), m_count(0) { } \
\
List::~List() { remove_all(); } \
\