diff options
author | tonnerre <tonnerre> | 2013-02-12 23:25:35 +0000 |
---|---|---|
committer | tonnerre <tonnerre> | 2013-02-12 23:25:35 +0000 |
commit | 0a70dc3951b4fbdacfcaa6b17d53bc2737c26ecd (patch) | |
tree | 04b4d398a21b279b3795744e98626aff732a65c4 /wm/i3/patches | |
parent | 75f859b5756d9a64d1c349718c9bbf4240813c8f (diff) | |
download | pkgsrc-0a70dc3951b4fbdacfcaa6b17d53bc2737c26ecd.tar.gz |
Initial import of the i3 window manager, version 4.4.
This package contains the i3 window manager, a small tiling window
manager aimed at providing helpful modern features like Xinerama
multi-screen support while still being completely keyboard
controlled. It is mainly aimed at engineers and people who
love to get their work done without switching between keyboard and
mouse.
Diffstat (limited to 'wm/i3/patches')
-rw-r--r-- | wm/i3/patches/patch-Makefile | 12 | ||||
-rw-r--r-- | wm/i3/patches/patch-common.mk | 30 | ||||
-rw-r--r-- | wm/i3/patches/patch-libi3_ipc_send_message.c | 51 | ||||
-rw-r--r-- | wm/i3/patches/patch-src_log.c | 48 | ||||
-rw-r--r-- | wm/i3/patches/patch-src_main.c | 27 |
5 files changed, 168 insertions, 0 deletions
diff --git a/wm/i3/patches/patch-Makefile b/wm/i3/patches/patch-Makefile new file mode 100644 index 00000000000..4e6434b1a9e --- /dev/null +++ b/wm/i3/patches/patch-Makefile @@ -0,0 +1,12 @@ +$NetBSD: patch-Makefile,v 1.1.1.1 2013/02/12 23:25:35 tonnerre Exp $ + +--- Makefile.orig 2012-11-25 16:04:42.000000000 +0000 ++++ Makefile +@@ -18,7 +18,6 @@ include i3-msg/i3-msg.mk + include i3-input/i3-input.mk + include i3-nagbar/i3-nagbar.mk + include i3bar/i3bar.mk +-include i3-dump-log/i3-dump-log.mk + include docs/docs.mk + include man/man.mk + diff --git a/wm/i3/patches/patch-common.mk b/wm/i3/patches/patch-common.mk new file mode 100644 index 00000000000..457986a6b74 --- /dev/null +++ b/wm/i3/patches/patch-common.mk @@ -0,0 +1,30 @@ +$NetBSD: patch-common.mk,v 1.1.1.1 2013/02/12 23:25:35 tonnerre Exp $ + +--- common.mk.orig 2012-09-19 16:08:09.000000000 +0000 ++++ common.mk +@@ -1,5 +1,7 @@ + UNAME=$(shell uname) +-DEBUG=1 ++ifndef DEBUG ++ DEBUG=1 ++endif + COVERAGE=0 + INSTALL=install + FLEX=flex +@@ -137,11 +139,11 @@ LIBSN_CFLAGS := $(call cflags_for_lib, l + LIBSN_LIBS := $(call ldflags_for_lib, libstartup-notification-1.0,startup-notification-1) + + # Pango +-PANGO_CFLAGS := $(call cflags_for_lib, cairo) +-PANGO_CFLAGS += $(call cflags_for_lib, pangocairo) +-I3_CPPFLAGS += -DPANGO_SUPPORT=1 +-PANGO_LIBS := $(call ldflags_for_lib, cairo) +-PANGO_LIBS += $(call ldflags_for_lib, pangocairo) ++#PANGO_CFLAGS := $(call cflags_for_lib, cairo) ++#PANGO_CFLAGS += $(call cflags_for_lib, pangocairo) ++I3_CPPFLAGS += -DPANGO_SUPPORT=0 ++#PANGO_LIBS := $(call ldflags_for_lib, cairo) ++#PANGO_LIBS += $(call ldflags_for_lib, pangocairo) + + # libi3 + LIBS = -L$(TOPDIR) -li3 diff --git a/wm/i3/patches/patch-libi3_ipc_send_message.c b/wm/i3/patches/patch-libi3_ipc_send_message.c new file mode 100644 index 00000000000..db91fc9e7e1 --- /dev/null +++ b/wm/i3/patches/patch-libi3_ipc_send_message.c @@ -0,0 +1,51 @@ +commit f5b7bfb12ef74ddbf250e5076bbfaafd0027474c +Author: Michael Stapelberg <michael@stapelberg.de> +Date: Wed Jan 9 18:11:03 2013 +0100 + + Bugfix: fix IPC messages writes with low buffer sizes (Thanks jasper, dcoppa) + + Use the following command to reproduce this bug: + + echo 4096 | sudo tee /proc/sys/net/core/wmem_default + + Then just switch workspaces with some windows on it and i3bar would + exit due to malformed IPC messages. + + This bug hits OpenBSD users (and possibly other BSDs) due to their lower + default buffer size. + + fixes #896 + +diff --git a/libi3/ipc_send_message.c b/libi3/ipc_send_message.c +index 850fbdd..88d87a6 100644 +--- libi3/ipc_send_message.c ++++ libi3/ipc_send_message.c +@@ -10,6 +10,7 @@ + #include <unistd.h> + #include <stdint.h> + #include <err.h> ++#include <errno.h> + + #include <i3/ipc.h> + +@@ -38,14 +39,15 @@ int ipc_send_message(int sockfd, uint32_t message_size, + memcpy(walk, payload, message_size); + + int sent_bytes = 0; +- int bytes_to_go = buffer_size; +- while (sent_bytes < bytes_to_go) { +- int n = write(sockfd, msg + sent_bytes, bytes_to_go); +- if (n == -1) ++ while (sent_bytes < buffer_size) { ++ int n = write(sockfd, msg + sent_bytes, buffer_size - sent_bytes); ++ if (n == -1) { ++ if (errno == EAGAIN) ++ continue; + return -1; ++ } + + sent_bytes += n; +- bytes_to_go -= n; + } + + return 0; diff --git a/wm/i3/patches/patch-src_log.c b/wm/i3/patches/patch-src_log.c new file mode 100644 index 00000000000..f809e50bffb --- /dev/null +++ b/wm/i3/patches/patch-src_log.c @@ -0,0 +1,48 @@ +$NetBSD: patch-src_log.c,v 1.1.1.1 2013/02/12 23:25:35 tonnerre Exp $ + +--- src/log.c.orig 2012-12-11 23:08:17.000000000 +0000 ++++ src/log.c +@@ -108,42 +108,7 @@ void init_logging(void) { + #endif + logbuffer_size = min(physical_mem_bytes * 0.01, shmlog_size); + sasprintf(&shmlogname, "/i3-log-%d", getpid()); +- logbuffer_shm = shm_open(shmlogname, O_RDWR | O_CREAT, S_IREAD | S_IWRITE); +- if (logbuffer_shm == -1) { +- ELOG("Could not shm_open SHM segment for the i3 log: %s\n", strerror(errno)); +- return; +- } +- +- if (ftruncate(logbuffer_shm, logbuffer_size) == -1) { +- close(logbuffer_shm); +- shm_unlink("/i3-log-"); +- ELOG("Could not ftruncate SHM segment for the i3 log: %s\n", strerror(errno)); +- return; +- } +- +- logbuffer = mmap(NULL, logbuffer_size, PROT_READ | PROT_WRITE, MAP_SHARED, logbuffer_shm, 0); +- if (logbuffer == MAP_FAILED) { +- close(logbuffer_shm); +- shm_unlink("/i3-log-"); +- ELOG("Could not mmap SHM segment for the i3 log: %s\n", strerror(errno)); +- logbuffer = NULL; +- return; +- } +- +- /* Initialize with 0-bytes, just to be sureā¦ */ +- memset(logbuffer, '\0', logbuffer_size); +- +- header = (i3_shmlog_header*)logbuffer; +- +- pthread_condattr_t cond_attr; +- pthread_condattr_init(&cond_attr); +- if (pthread_condattr_setpshared(&cond_attr, PTHREAD_PROCESS_SHARED) != 0) +- ELOG("pthread_condattr_setpshared() failed, i3-dump-log -f will not work!\n"); +- pthread_cond_init(&(header->condvar), &cond_attr); +- +- logwalk = logbuffer + sizeof(i3_shmlog_header); +- loglastwrap = logbuffer + logbuffer_size; +- store_log_markers(); ++ return; + } + atexit(purge_zerobyte_logfile); + } diff --git a/wm/i3/patches/patch-src_main.c b/wm/i3/patches/patch-src_main.c new file mode 100644 index 00000000000..7e6eea7137e --- /dev/null +++ b/wm/i3/patches/patch-src_main.c @@ -0,0 +1,27 @@ +$NetBSD: patch-src_main.c,v 1.1.1.1 2013/02/12 23:25:35 tonnerre Exp $ + +--- src/main.c.orig 2012-12-11 23:08:17.000000000 +0000 ++++ src/main.c +@@ -218,12 +218,6 @@ static void i3_exit(void) { + #if EV_VERSION_MAJOR >= 4 + ev_loop_destroy(main_loop); + #endif +- +- if (*shmlogname != '\0') { +- fprintf(stderr, "Closing SHM log \"%s\"\n", shmlogname); +- fflush(stderr); +- shm_unlink(shmlogname); +- } + } + + /* +@@ -233,9 +227,6 @@ static void i3_exit(void) { + * + */ + static void handle_signal(int sig, siginfo_t *info, void *data) { +- if (*shmlogname != '\0') { +- shm_unlink(shmlogname); +- } + raise(sig); + } + |