From 7e74bffdd626649972cadad177bbd6884869afe7 Mon Sep 17 00:00:00 2001 From: buffet Date: Mon, 29 Oct 2018 11:44:06 +0100 Subject: [PATCH] Removed events.? Was a mistake all along --- src/kiwmi/events.c | 27 --------------------------- src/kiwmi/events.h | 15 --------------- src/kiwmi/main.c | 4 +--- 3 files changed, 1 insertion(+), 45 deletions(-) delete mode 100644 src/kiwmi/events.c delete mode 100644 src/kiwmi/events.h diff --git a/src/kiwmi/events.c b/src/kiwmi/events.c deleted file mode 100644 index f8fe5f1..0000000 --- a/src/kiwmi/events.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (c), Niclas Meyer - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at https://mozilla.org/MPL/2.0/. - */ - -#include "events.h" - -#include - -#include - -void -handle_xcb_event(xcb_generic_event_t *event) -{ - switch (event->response_type) { - case XCB_CREATE_NOTIFY: - // TODO: insert into tree - break; - case XCB_DESTROY_NOTIFY: - // TODO: destroy window - break; - } - - free(event); -} diff --git a/src/kiwmi/events.h b/src/kiwmi/events.h deleted file mode 100644 index 1efe606..0000000 --- a/src/kiwmi/events.h +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c), Niclas Meyer - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at https://mozilla.org/MPL/2.0/. - */ - -#ifndef EVENTS_H -#define EVENTS_H - -#include - -void handle_xcb_event(xcb_generic_event_t *event); - -#endif /* EVENTS_H */ diff --git a/src/kiwmi/main.c b/src/kiwmi/main.c index 7080afc..d3159dd 100644 --- a/src/kiwmi/main.c +++ b/src/kiwmi/main.c @@ -20,7 +20,6 @@ #include -#include "events.h" #include "ipc.h" #include "xcb.h" @@ -124,12 +123,11 @@ main(int argc, char *argv[]) if (!event) { die("XCB connection broke\n"); } - - handle_xcb_event(event); } } close(g_sock_fd); + xcb_disconnect(g_dpy); } static void