# HG changeset patch # User cannam # Date 1060865773 0 # Thu Aug 14 12:56:13 2003 +0000 # Branch wm2 # Node ID 36d0b09c3fb4795760117225b488d0abcf38f724 # Parent 71a976331740bfc4e998b40bce2841dd02144265 Fixes merged from Debian wm2_4-7 package. diff --git a/Border.C b/Border.C --- a/Border.C +++ b/Border.C @@ -41,7 +41,7 @@ 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 @@ 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; diff --git a/Client.C b/Client.C --- a/Client.C +++ b/Client.C @@ -399,27 +399,6 @@ 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; diff --git a/Client.h b/Client.h --- a/Client.h +++ b/Client.h @@ -125,8 +125,9 @@ 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 *); diff --git a/Events.C b/Events.C --- a/Events.C +++ b/Events.C @@ -13,6 +13,9 @@ nextEvent(&ev); m_currentTime = CurrentTime; + if( !m_looping ) + break; + switch (ev.type) { case ButtonPress: @@ -175,7 +178,7 @@ { 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 WindowManager::eventCreate(XCreateWindowEvent *e) { if (e->override_redirect) return; - Client *c = windowToClient(e->window, True); + windowToClient(e->window, True); } diff --git a/General.h b/General.h --- a/General.h +++ b/General.h @@ -10,7 +10,9 @@ #undef _POSIX_SOURCE #endif +#ifndef __FreeBSD__ #define _POSIX_SOURCE 1 +#endif #include #include diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -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 @@ $(CCC) -c $(CFLAGS) $< wm2: $(OBJECTS) - mv -f wm2 wm2.old >& /dev/null || true $(CCC) -o wm2 $(OBJECTS) $(LIBS) depend: diff --git a/Manager.C b/Manager.C --- a/Manager.C +++ b/Manager.C @@ -28,7 +28,7 @@ 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); diff --git a/README b/README --- a/README +++ b/README @@ -170,5 +170,5 @@ -Chris Cannam, cannam@zands.demon.co.uk -October 1996 +Chris Cannam, cannam@all-day-breakfast.com +http://www.all-day-breakfast.com/wm2/ diff --git a/Rotated.C b/Rotated.C --- a/Rotated.C +++ b/Rotated.C @@ -64,8 +64,8 @@ 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 @@ 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) diff --git a/listmacro2.h b/listmacro2.h --- a/listmacro2.h +++ b/listmacro2.h @@ -41,7 +41,7 @@ #define implementList(List, T) \ \ -List::List() : m_count(0), m_items(0) { } \ +List::List() : m_items(0), m_count(0) { } \ \ List::~List() { remove_all(); } \ \