aboutsummaryrefslogtreecommitdiffstats
path: root/calmwm.c
diff options
context:
space:
mode:
authorokan2009-01-16 15:24:14 +0000
committerokan2009-01-16 15:24:14 +0000
commit13a190c9c75ba29a569c4adf686cd05b0cd698ac (patch)
tree83f36d330560f5871cd994ba90e3c855514d0766 /calmwm.c
parentf069a19b033cc9adb37dea328d36f15bcdc0c892 (diff)
downloadcwm-13a190c9c75ba29a569c4adf686cd05b0cd698ac.tar.gz
remove pwin, bringing us to one client, one window. we no longer have
to push attributes around, so things get a lot simplier, while fixing a few issues in the meantime; original suggestion by Edd Barrett many many moons ago. annoying window placement and race, found in c2k8 by todd, fix by oga! lots of feedback from todd and oga - thanks! "commit that bad boy" oga@
Diffstat (limited to 'calmwm.c')
-rw-r--r--calmwm.c26
1 files changed, 3 insertions, 23 deletions
diff --git a/calmwm.c b/calmwm.c
index f0833c0..8280647 100644
--- a/calmwm.c
+++ b/calmwm.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: calmwm.c,v 1.32 2009/01/15 17:23:12 oga Exp $
+ * $Id: calmwm.c,v 1.33 2009/01/16 15:24:14 okan Exp $
*/
#include "headers.h"
@@ -35,16 +35,10 @@ u_int Nscreens;
struct client_ctx_q Clientq;
-int Doshape, Shape_ev;
int HasXinerama, HasRandr, Randr_ev;
int Starting;
struct conf Conf;
-/* From TWM */
-#define gray_width 2
-#define gray_height 2
-static char gray_bits[] = {0x02, 0x01};
-
static void _sigchld_cb(int);
static void dpy_init(const char *);
@@ -116,8 +110,6 @@ dpy_init(const char *dpyname)
XSetErrorHandler(x_errorhandler);
- Doshape = XShapeQueryExtension(X_Dpy, &Shape_ev, &i);
-
HasRandr = XRRQueryExtension(X_Dpy, &Randr_ev, &i);
TAILQ_INIT(&Screenq);
@@ -181,7 +173,7 @@ x_setupscreen(struct screen_ctx *sc, u_int which)
XAllocNamedColor(X_Dpy, DefaultColormap(X_Dpy, which),
"red", &sc->redcolor, &tmp);
XAllocNamedColor(X_Dpy, DefaultColormap(X_Dpy, which),
- "#00ccc8", &sc->cyancolor, &tmp);
+ "#666666", &sc->graycolor, &tmp);
XAllocNamedColor(X_Dpy, DefaultColormap(X_Dpy, which),
"white", &sc->whitecolor, &tmp);
XAllocNamedColor(X_Dpy, DefaultColormap(X_Dpy, which),
@@ -191,19 +183,7 @@ x_setupscreen(struct screen_ctx *sc, u_int which)
sc->whitepixl = WhitePixel(X_Dpy, sc->which);
sc->bluepixl = sc->fccolor.pixel;
sc->redpixl = sc->redcolor.pixel;
- sc->cyanpixl = sc->cyancolor.pixel;
-
- sc->gray = XCreatePixmapFromBitmapData(X_Dpy, sc->rootwin,
- gray_bits, gray_width, gray_height,
- sc->blackpixl, sc->whitepixl, DefaultDepth(X_Dpy, sc->which));
-
- sc->blue = XCreatePixmapFromBitmapData(X_Dpy, sc->rootwin,
- gray_bits, gray_width, gray_height,
- sc->bluepixl, sc->whitepixl, DefaultDepth(X_Dpy, sc->which));
-
- sc->red = XCreatePixmapFromBitmapData(X_Dpy, sc->rootwin,
- gray_bits, gray_width, gray_height,
- sc->redpixl, sc->whitepixl, DefaultDepth(X_Dpy, sc->which));
+ sc->graypixl = sc->graycolor.pixel;
gv.foreground = sc->blackpixl^sc->whitepixl;
gv.background = sc->whitepixl;