From 341af54af772476543659ef316011b8cd1352a7a Mon Sep 17 00:00:00 2001 From: tonnerre Date: Thu, 17 Oct 2013 22:41:12 +0000 Subject: Update i3 to version 4.6. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also, install a few more scripts and their manual pages, and put the correct Perl interpreter in all Perl scripts. Changes since version 4.4: • docs/hacking-howto: refer people to cr.i3wm.org • docs/ipc: Adds Go IPC lib to the docs. • docs/userguide: remove obsolete sentence about client.background • docs/userguide: be explicit about assignment processing order • docs/userguide: be more clear about the resize command arguments • docs/userguide: fix typo: s/11x/11px/ • i3-dmenu-desktop: don’t add “geany” if “Geany” is already present • i3-dmenu-desktop: strip newlines from dmenu ≥ 4.4 • i3-dmenu-desktop: skip files with broken utf8 but warn about it • i3-dmenu-desktop: skip broken files (no/empty Exec=) but warn about them • i3-dmenu-desktop: List filenames of .desktop files • i3-dmenu-desktop: remove %i from commandline • i3-nagbar: Work around terminals not supporting -e with quoted arguments • i3-nagbar: use the same font as configured for i3 • i3bar: set _NET_SYSTEM_TRAY_COLORS for symbolic icons (gtk3+) • i3bar: don’t use X11 borders to avoid overlapping in hide mode • i3bar: separator color via config; separator width and on/off via ipc • i3bar: Allow min_width of a block in i3bar to be a string • i3-msg: parse command replies and display errors nicely if there were errors • Draw 1px tab separators left/right instead of 2px on the right only • Render tree before destroying X11 containers upon unmap • scratchpad show: move visible scratchpad window from another workspace to focused workspace instead of doing nothing • ignore MotionNotify events generated while warping the pointer • Allow X11 servers which do not support the XKB extension. • remove the urgency indicator when a window is closed • wrap when moving containers to outputs with direction • scratchpad_show: focus unfocused scratchpad window • Split workspace instead of changing orientation • scratchpad: always auto center on 'scratchpad show' if window hasn't been repositioned by the user • Add a new IPC event for changes on windows. • config: accept “smart” as popup_during_fullscreen parameter • Add support for _NET_WM_STATE_DEMANDS_ATTENTION. • Obey WM_SIZE_HINTS's resize increments in floating mode • Do not move focus if a container is moved across outputs • docs/userguide: mention forgotten layout splitv/splith • docs/multi-monitor: nVidia ≥ 302.17 works just fine • docs/wsbar: update (we have i3bar now, i3-wsbar is just an example) • docs/testsuite: Document fixes and workarounds for test failures • man/i3-msg.man: updated man page to include all options • lib/i3test: clarify how to identify open_window() windows in i3 commands • Use a saner sanity check for floating_reposition • tabbed: floor(), put extra pixels into the last tab • raise fullscreen windows on top of all other X11 windows • Draw indicator border only for split layouts • re-shuffle struct members to save a bit of memory • Add 'NoDisplay=true' to i3.application.desktop • Store aspect_ratio instead of weird proportional_{width,height} • Implement shmlog command • Implement debuglog command • Implement unmark command • actively delete _NET_WORKAREA on startup • Handle the _NET_REQUEST_FRAME_EXTENTS ClientMessage (java compat) • i3bar: add click events • i3bar: fix -b parameter, fix usage description • i3bar: restore compatibility with libyajl version 1 • i3bar: unhide hidden i3bar when mode is active • i3bar: fix font display height in i3bar • i3bar: introduced i3 command for changing the hidden state and mode • i3bar: fix wrong placement of i3bar when connecting/disconnecting outputs • i3bar: draw workspace buttons at x=0 instead of x=1 • i3-nagbar: take our terminal execution kludge to the next level • i3-nagbar: Bugfix: -m requires an argument (crashes if none specified) • i3-dmenu-desktop: run commands when they don’t match a .desktop file (e.g. enter “i3 layout stacking”) • i3-dmenu-desktop: honor Path= key • contrib/dump-asy.pl: Fix $ and & in window titles • contrib/dump-asy.pl: Display nicer double-quotes • contrib/gtk-tree-watch.pl: Remove bogus default socket path • Ignore ConfigureRequests for scratchpad windows • Correctly parse `move ... workspace *_on_output` • i3bar: Set separator color properly when drawing • Properly parse commands like “move workspace torrent” • Handle nested transient popups properly • Fix decoration rect size for windows without border • parse outputs as "word", not "string", to ignore trailing whitespace • fix crash when disabling output without any windows • scratchpad: fix crash when moving last window of an invisible workspace • fix coordinates of scratchpad windows on output changes • call scratchpad_show() when focusing scratchpad windows via criteria • fix continuous resize bug in floating mode, e.g. with xbmc • fix “overlapping” --release key bindings • fix IPC messages writes with low buffer sizes • unregister as window manager before restarting (fixes a race condition) • Fix bind[code|sym] --release • remove superfluous #include • Makefile: Repect AR environment variable • i3-input: restore input focus on exit() • Also draw right tab border for split containers • Fix scrolling on a tabbed titlebar which contains split cons • Correctly close floating windows • handle MapRequests sent between i3 registering as a wm and handling events • i3bar: fake DestroyNotify and send MANAGER ClientMessages to fix tray restarts • ipc: use correct workspace in workspace change event • fix floating window size with hide_edge_borders • Fix parsing of comments in the config file • Fix error messages for the debug log • shm_unlink the correct file when handling errors • Fix shm logging on FreeBSD • Fix restarting with 32 bit depth windows • Fix scratchpad_show on non-scratchpad windows • i3bar: mark IPC fd CLOEXEC • fix crash when not having tray_output configured • make sure that resize will take place even if pixel is smaller than size increments. • render_con: fix height rounding in aspect ratio computation • fix problem when moving fullscreen window to scratchpad • Unmap windows before reparenting them to the root window (fixes Mathematica) • update parent urgency hint if a child is removed. • fix bus error on OpenBSD/sparc64 • fix focus handling in 'floating disable' on non-visible windows • ignore spaces in front of default workspace name • call i3-nagbar correctly for configfiles without the font directive • resize and center a scratchpad even when a criteria is used. --- wm/i3/Makefile | 23 ++++---- wm/i3/PLIST | 9 +++- wm/i3/distinfo | 12 ++--- wm/i3/patches/patch-common.mk | 30 ----------- wm/i3/patches/patch-libi3_ipc_send_message.c | 51 ------------------ wm/i3/patches/patch-src_log.c | 79 ++++++++++++---------------- 6 files changed, 60 insertions(+), 144 deletions(-) delete mode 100644 wm/i3/patches/patch-common.mk delete mode 100644 wm/i3/patches/patch-libi3_ipc_send_message.c (limited to 'wm/i3') diff --git a/wm/i3/Makefile b/wm/i3/Makefile index ba5fd6433c9..33c3a9333d0 100644 --- a/wm/i3/Makefile +++ b/wm/i3/Makefile @@ -1,8 +1,7 @@ -# $NetBSD: Makefile,v 1.2 2013/05/31 12:42:30 wiz Exp $ +# $NetBSD: Makefile,v 1.3 2013/10/17 22:41:12 tonnerre Exp $ # -DISTNAME= i3-4.4 -PKGREVISION= 1 +DISTNAME= i3-4.6 CATEGORIES= wm MASTER_SITES= http://i3wm.org/downloads/ EXTRACT_SUFX= .tar.bz2 @@ -28,27 +27,33 @@ MAKE_ENV+= SYSCONFDIR=${PKG_SYSCONFDIR:C/\/i3//} MAKE_ENV+= DEBUG=0 MAKE_ENV+= SHM_SUPPORT=0 +REPLACE_INTERPRETER+= perl +REPLACE.perl.old= /usr/bin/env perl +REPLACE.perl.new= ${TOOLS_PATH.perl} +REPLACE_FILES.perl= i3-dmenu-desktop i3-migrate-config-to-v4 + do-install: ${INSTALL_PROGRAM} ${WRKSRC}/i3 ${DESTDIR}${PREFIX}/bin/ ${INSTALL_MAN} ${WRKSRC}/man/i3.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/ -.for i in i3bar i3-config-wizard i3-input i3-msg i3-nagbar - ${INSTALL_PROGRAM} ${WRKSRC}/${i}/${i} ${DESTDIR}${PREFIX}/bin/ +.for i in i3 i3-dmenu-desktop i3-migrate-config-to-v4 i3-sensible-editor \ + i3-sensible-pager i3-sensible-terminal + ${INSTALL_SCRIPT} ${WRKSRC}/${i} ${DESTDIR}${PREFIX}/bin/ ${INSTALL_MAN} ${WRKSRC}/man/${i}.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/ .endfor -.for i in i3-config-wizard +.for i in i3bar i3-config-wizard i3-input i3-msg i3-nagbar ${INSTALL_PROGRAM} ${WRKSRC}/${i}/${i} ${DESTDIR}${PREFIX}/bin/ + ${INSTALL_MAN} ${WRKSRC}/man/${i}.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/ .endfor ${INSTALL_DATA} ${WRKSRC}/i3.config ${DESTDIR}${EGDIR}/config ${INSTALL_DATA} ${WRKSRC}/i3.config.keycodes ${DESTDIR}${EGDIR}/config.keycodes ${INSTALL_DATA} ${WRKSRC}/i3.xsession.desktop ${DESTDIR}${PREFIX}/share/xsessions/ ${INSTALL_DATA} ${WRKSRC}/include/i3/ipc.h ${DESTDIR}${PREFIX}/include/i3/ - ${INSTALL_SCRIPT} ${WRKSRC}/i3-sensible-editor ${DESTDIR}${PREFIX}/bin/ - ${INSTALL_SCRIPT} ${WRKSRC}/i3-sensible-pager ${DESTDIR}${PREFIX}/bin/ - ${INSTALL_SCRIPT} ${WRKSRC}/i3-sensible-terminal ${DESTDIR}${PREFIX}/bin/ .include "../../devel/libev/buildlink3.mk" .include "../../devel/yajl/buildlink3.mk" +.include "../../devel/pango/buildlink3.mk" .include "../../devel/pcre/buildlink3.mk" +.include "../../graphics/cairo/buildlink3.mk" .include "../../x11/xcb-util/buildlink3.mk" .include "../../x11/xcb-util-wm/buildlink3.mk" .include "../../x11/xcb-util-keysyms/buildlink3.mk" diff --git a/wm/i3/PLIST b/wm/i3/PLIST index b0aabedaa0b..3faeb5182b0 100644 --- a/wm/i3/PLIST +++ b/wm/i3/PLIST @@ -1,7 +1,9 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 2013/02/12 23:25:35 tonnerre Exp $ +@comment $NetBSD: PLIST,v 1.2 2013/10/17 22:41:12 tonnerre Exp $ bin/i3 bin/i3-config-wizard +bin/i3-dmenu-desktop bin/i3-input +bin/i3-migrate-config-to-v4 bin/i3-msg bin/i3-nagbar bin/i3-sensible-editor @@ -10,9 +12,14 @@ bin/i3-sensible-terminal bin/i3bar include/i3/ipc.h man/man1/i3-config-wizard.1 +man/man1/i3-dmenu-desktop.1 man/man1/i3-input.1 +man/man1/i3-migrate-config-to-v4.1 man/man1/i3-msg.1 man/man1/i3-nagbar.1 +man/man1/i3-sensible-editor.1 +man/man1/i3-sensible-pager.1 +man/man1/i3-sensible-terminal.1 man/man1/i3.1 man/man1/i3bar.1 share/examples/i3/config diff --git a/wm/i3/distinfo b/wm/i3/distinfo index c004008014c..bb4f7440434 100644 --- a/wm/i3/distinfo +++ b/wm/i3/distinfo @@ -1,10 +1,8 @@ -$NetBSD: distinfo,v 1.1.1.1 2013/02/12 23:25:35 tonnerre Exp $ +$NetBSD: distinfo,v 1.2 2013/10/17 22:41:12 tonnerre Exp $ -SHA1 (i3-4.4.tar.bz2) = bc66bdf492e9596dbd48991c7bfcfd025281001c -RMD160 (i3-4.4.tar.bz2) = 6a5f2f84da32337a991cb85fd1dc4992bf9a72e2 -Size (i3-4.4.tar.bz2) = 884182 bytes +SHA1 (i3-4.6.tar.bz2) = b393eb6e57f5d6e11eb98691d8b392a639c3b516 +RMD160 (i3-4.6.tar.bz2) = 7f25c3b700e5255ad916b4348b22f3569d1f8c8d +Size (i3-4.6.tar.bz2) = 891862 bytes SHA1 (patch-Makefile) = 919f0e87efa951bde531b9172b74589d3e1c474a -SHA1 (patch-common.mk) = ccb5c045ea45f693dcffec972ada0dd28375f485 -SHA1 (patch-libi3_ipc_send_message.c) = 93fa47c2f2bb299819b2e470e5175bffadefaf1a -SHA1 (patch-src_log.c) = ff40c08e36416748d4a5a3d19c15fd99c732bb72 +SHA1 (patch-src_log.c) = d555354ee2200ffcaa61c52f498de7e689084d90 SHA1 (patch-src_main.c) = c03fcb12d404fcdfd14c1892b771ee0c7a86b39d diff --git a/wm/i3/patches/patch-common.mk b/wm/i3/patches/patch-common.mk deleted file mode 100644 index 457986a6b74..00000000000 --- a/wm/i3/patches/patch-common.mk +++ /dev/null @@ -1,30 +0,0 @@ -$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 deleted file mode 100644 index db91fc9e7e1..00000000000 --- a/wm/i3/patches/patch-libi3_ipc_send_message.c +++ /dev/null @@ -1,51 +0,0 @@ -commit f5b7bfb12ef74ddbf250e5076bbfaafd0027474c -Author: Michael Stapelberg -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 - #include - #include -+#include - - #include - -@@ -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 index f809e50bffb..cb00ea695d3 100644 --- a/wm/i3/patches/patch-src_log.c +++ b/wm/i3/patches/patch-src_log.c @@ -1,48 +1,35 @@ -$NetBSD: patch-src_log.c,v 1.1.1.1 2013/02/12 23:25:35 tonnerre Exp $ +$NetBSD: patch-src_log.c,v 1.2 2013/10/17 22:41:12 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); +NetBSD does not support shm_open (3), disable the code in this case + +--- src/log.c.orig 2013-08-07 18:50:24.000000000 +0000 ++++ src/log.c 2013-10-06 16:45:34.000000000 +0000 +@@ -108,6 +108,7 @@ + * For 512 MiB of RAM this will lead to a 5 MiB log buffer. + * At the moment (2011-12-10), no testcase leads to an i3 log + * of more than ~ 600 KiB. */ ++#if !defined(__NetBSD__) + long long physical_mem_bytes; + #if defined(__APPLE__) + int mib[2] = { CTL_HW, HW_MEMSIZE }; +@@ -157,6 +158,7 @@ + logwalk = logbuffer + sizeof(i3_shmlog_header); + loglastwrap = logbuffer + logbuffer_size; + store_log_markers(); ++#endif /* !defined(__NetBSD__) */ + } + + /* +@@ -164,10 +166,12 @@ + * + */ + void close_logbuffer(void) { ++#if !defined(__NetBSD__) + close(logbuffer_shm); + shm_unlink(shmlogname); + logbuffer = NULL; + shmlogname = ""; ++#endif } + + /* -- cgit v1.2.3