commit 3662ca427dc17129623dda03206a75dfcae2eded
parent 60d88980fbe029d81dbb0e469f5bddf1f433b8a8
Author: Dylan Araps <dylan.araps@gmail.com>
Date: Thu, 17 Oct 2019 09:40:24 +0300
sowm: turns out we can't pass 0 as an error handler. :P
Diffstat:
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
@@ -2,7 +2,7 @@
<a href="https://user-images.githubusercontent.com/6799467/66687576-9747c200-ec72-11e9-947d-5b96753eab03.jpg"><img src="https://user-images.githubusercontent.com/6799467/66687576-9747c200-ec72-11e9-947d-5b96753eab03.jpg" width="43%" align="right"></a>
-An itsy bitsy floating window manager (*260~ sloc / 24kb compiled!*).
+An itsy bitsy floating window manager (*250~ sloc / 24kb compiled!*).
- Floating only.
- Fullscreen toggle.
diff --git a/sowm.c b/sowm.c
@@ -50,6 +50,7 @@ static void win_to_ws(const Arg arg);
static void ws_go(const Arg arg);
static void ws_save(int i);
static void ws_sel(int i);
+static int xerror() { return 0;}
static client *list = {0};
static desktop ws_list[10];
@@ -495,7 +496,7 @@ void configure_request(XEvent *e) {
void map_request(XEvent *e) {
Window w = e->xmaprequest.window;
- XSelectInput(d, w, StructureNotifyMask|EnterWindowMask|LeaveWindowMask);
+ XSelectInput(d, w, StructureNotifyMask|EnterWindowMask);
win_center((Arg){.i = w});
XMapWindow(d, w);
@@ -532,7 +533,7 @@ int main(void) {
if (!(d = XOpenDisplay(0x0))) return 0;
signal(SIGCHLD, SIG_IGN);
- XSetErrorHandler(0);
+ XSetErrorHandler(xerror);
int s = DefaultScreen(d);
root = RootWindow(d, s);