From d8e532215b295299d67651a2f47964d6664d17b8 Mon Sep 17 00:00:00 2001 From: "Anselm R. Garbe" Date: Wed, 26 Apr 2006 15:19:56 +0200 Subject: [PATCH] applied Maxi's error handler patch (though with shutting up) --- cmd/wm/column.c | 8 ++++---- cmd/wm/wm.c | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cmd/wm/column.c b/cmd/wm/column.c index c40f8ae5..242e9fe7 100644 --- a/cmd/wm/column.c +++ b/cmd/wm/column.c @@ -50,12 +50,11 @@ relax_column(Area *a) fallthrough = True; break; case Colstack: - yoff = a->rect.y; h = a->rect.height - (a->frame.size - 1) * height_of_bar(); if(h < 3 * height_of_bar()) fallthrough = True; - break; default: + yoff = a->rect.y; break; } @@ -81,9 +80,8 @@ relax_column(Area *a) h += f->rect.height; } - /* try to add rest space to all clients if not COL_STACK mode */ hdiff = a->rect.height - h; - if(hdiff > 0 && (a->mode != Colstack)) { + if((a->mode == Coldefault) && (hdiff > 0)) { int hx; for(hx = 1; hx < hdiff; hx++) for(i = 0; (hx < hdiff) && (i < a->frame.size); i++) { @@ -95,6 +93,8 @@ relax_column(Area *a) } } + if(hdiff < 0) + hdiff = 0; hdiff /= a->frame.size; yoff = a->rect.y + hdiff / 2; for(i = 0; i < a->frame.size; i++) { diff --git a/cmd/wm/wm.c b/cmd/wm/wm.c index 06723b39..f9852004 100644 --- a/cmd/wm/wm.c +++ b/cmd/wm/wm.c @@ -169,6 +169,8 @@ wmii_error_handler(Display *dpy, XErrorEvent *error) || (error->request_code == X_PolySegment && error->error_code == BadDrawable) || (error->request_code == X_ConfigureWindow + && error->error_code == BadMatch) + || (error->request_code == X_GrabKey && error->error_code == BadMatch)) return 0; fprintf(stderr, "%s", "wmiiwm: fatal error");