From 38b231b848d349341e6aabf8d63d40d22ac0924c Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 29 Nov 2010 22:25:55 +0100 Subject: [PATCH] handlers.c: remove obsolete code --- src/handlers.c | 60 -------------------------------------------------- 1 file changed, 60 deletions(-) diff --git a/src/handlers.c b/src/handlers.c index d8e859b1..ed59f528 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -28,30 +28,6 @@ void add_ignore_event(const int sequence) { SLIST_INSERT_HEAD(&ignore_events, event, ignore_events); } -/* - * Unignores the given sequence. Called when unmap events (generated by - * reparenting) should be ignored and the unmap event actually happens, in - * order to not ignore too many unmap events (leading to ghost window - * decorations). - * - */ -static void unignore_event(const int sequence) { - struct Ignore_Event *event; - for (event = SLIST_FIRST(&ignore_events); - event != SLIST_END(&ignore_events); - event = SLIST_NEXT(event, ignore_events)) { - if (event->sequence != sequence) - continue; - - DLOG("Unignoring sequence number %d\n", sequence); - struct Ignore_Event *save = event; - event = SLIST_NEXT(event, ignore_events); - SLIST_REMOVE(&ignore_events, save, Ignore_Event, ignore_events); - free(save); - break; - } -} - /* * Checks if the given sequence is ignored and returns true if so. * @@ -658,42 +634,6 @@ int handle_expose_event(void *data, xcb_connection_t *conn, xcb_expose_event_t * xcb_flush(conn); return 1; - -#if 0 - else { - uint32_t background_color; - if (client->urgent) - background_color = config.client.urgent.background; - /* Distinguish if the window is currently focused… */ - else if (CUR_CELL != NULL && CUR_CELL->currently_focused == client) - background_color = config.client.focused.background; - /* …or if it is the focused window in a not focused container */ - else background_color = config.client.focused_inactive.background; - - /* Set foreground color to current focused color, line width to 2 */ - uint32_t values[] = {background_color, 2}; - xcb_change_gc(conn, client->titlegc, XCB_GC_FOREGROUND | XCB_GC_LINE_WIDTH, values); - - /* Draw the border, the ±1 is for line width = 2 */ - xcb_point_t points[] = {{1, 0}, /* left upper edge */ - {1, client->rect.height-1}, /* left bottom edge */ - {client->rect.width-1, client->rect.height-1}, /* right bottom edge */ - {client->rect.width-1, 0}}; /* right upper edge */ - xcb_poly_line(conn, XCB_COORD_MODE_ORIGIN, client->frame, client->titlegc, 4, points); - - /* Draw a black background */ - xcb_change_gc_single(conn, client->titlegc, XCB_GC_FOREGROUND, get_colorpixel(conn, "#000000")); - if (client->titlebar_position == TITLEBAR_OFF && !client->borderless) { - xcb_rectangle_t crect = {1, 0, client->rect.width - (1 + 1), client->rect.height - 1}; - xcb_poly_fill_rectangle(conn, client->frame, client->titlegc, 1, &crect); - } else { - xcb_rectangle_t crect = {2, 0, client->rect.width - (2 + 2), client->rect.height - 2}; - xcb_poly_fill_rectangle(conn, client->frame, client->titlegc, 1, &crect); - } - } - xcb_flush(conn); - return 1; -#endif } /* -- 2.39.5