From 84cf3ec3cb3f6c7d22aa5fba3407c7e8084b66f8 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Tue, 15 Nov 2011 23:39:43 +0000 Subject: [PATCH 1/2] ipc: set CLOEXEC on client file descriptors (Thanks biiter) --- src/ipc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ipc.c b/src/ipc.c index 0a738427..fe1464e6 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -823,6 +823,9 @@ void ipc_new_client(EV_P_ struct ev_io *w, int revents) { return; } + /* Close this file descriptor on exec() */ + (void)fcntl(client, F_SETFD, FD_CLOEXEC); + set_nonblock(client); struct ev_io *package = scalloc(sizeof(struct ev_io)); From 5f8d719835832a91232d0331a25512e9a0853494 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 21 Nov 2011 19:55:41 +0000 Subject: [PATCH 2/2] Bugfix: Skip dock clients when handling FocusIn events (Thanks cradle) --- src/handlers.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/handlers.c b/src/handlers.c index 5e628bdf..7ef562e5 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -968,6 +968,12 @@ static int handle_focus_in(xcb_focus_in_event_t *event) { return 1; } + /* Skip dock clients, they cannot get the i3 focus. */ + if (con->parent->type == CT_DOCKAREA) { + DLOG("This is a dock client, not focusing.\n"); + return 1; + } + DLOG("focus is different, updating decorations\n"); /* Get the currently focused workspace to check if the focus change also