Hello community, here is the log from the commit of package i3-gaps for openSUSE:Factory checked in at 2019-04-11 08:48:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/i3-gaps (Old) and /work/SRC/openSUSE:Factory/.i3-gaps.new.27019 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "i3-gaps" Thu Apr 11 08:48:01 2019 rev:6 rq:692721 version:4.16.1 Changes: -------- --- /work/SRC/openSUSE:Factory/i3-gaps/i3-gaps.changes 2018-11-06 14:41:23.620414308 +0100 +++ /work/SRC/openSUSE:Factory/.i3-gaps.new.27019/i3-gaps.changes 2019-04-11 08:48:01.936544137 +0200 @@ -1,0 +2,14 @@ +Wed Apr 10 01:08:24 UTC 2019 - Avindra Goolcharan <[email protected]> + +- update to 4.16.1 + * Truncate wm_name utf8 strings to first zero byte (fixes window + title corruption) + * Apply title_align to non-leaf containers. Also, marks will now + display for non-leaf containers. + * attach_to_workspace: set new parent before tree_render (fixes + a heap-use-after-free) + * Use ipc queue for all messages (fixes an i3bar crash) + * Fix crash with popups when fullscreen is non-leaf + * Fix: render_con shows floating containers on wrong workspace + +------------------------------------------------------------------- Old: ---- i3-gaps-4.16.tar.bz2 New: ---- i3-gaps-4.16.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ i3-gaps.spec ++++++ --- /var/tmp/diff_new_pack.cFvchY/_old 2019-04-11 08:48:02.584544805 +0200 +++ /var/tmp/diff_new_pack.cFvchY/_new 2019-04-11 08:48:02.584544805 +0200 @@ -1,7 +1,7 @@ # # spec file for package i3-gaps # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: i3-gaps -Version: 4.16 +Version: 4.16.1 Release: 0 Summary: Tiling window manager License: BSD-3-Clause ++++++ i3-gaps-4.16.tar.bz2 -> i3-gaps-4.16.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/I3_VERSION new/i3-4.16.1/I3_VERSION --- old/i3-4.16/I3_VERSION 2018-11-04 15:30:46.000000000 +0100 +++ new/i3-4.16.1/I3_VERSION 2019-01-27 22:09:32.000000000 +0100 @@ -1 +1 @@ -4.16 (2018-11-04) +4.16.1 (2019-01-27) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/Makefile.am new/i3-4.16.1/Makefile.am --- old/i3-4.16/Makefile.am 2018-11-04 15:27:11.000000000 +0100 +++ new/i3-4.16.1/Makefile.am 2019-01-27 22:07:32.000000000 +0100 @@ -118,7 +118,7 @@ I3_VERSION \ LICENSE \ PACKAGE-MAINTAINER \ - RELEASE-NOTES-4.16 \ + RELEASE-NOTES-4.16.1 \ generate-command-parser.pl \ parser-specs/commands.spec \ parser-specs/config.spec \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/Makefile.in new/i3-4.16.1/Makefile.in --- old/i3-4.16/Makefile.in 2018-11-04 15:30:55.000000000 +0100 +++ new/i3-4.16.1/Makefile.in 2019-01-27 22:10:27.000000000 +0100 @@ -889,7 +889,7 @@ I3_VERSION \ LICENSE \ PACKAGE-MAINTAINER \ - RELEASE-NOTES-4.16 \ + RELEASE-NOTES-4.16.1 \ generate-command-parser.pl \ parser-specs/commands.spec \ parser-specs/config.spec \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/RELEASE-NOTES-4.16 new/i3-4.16.1/RELEASE-NOTES-4.16 --- old/i3-4.16/RELEASE-NOTES-4.16 2018-11-04 15:27:11.000000000 +0100 +++ new/i3-4.16.1/RELEASE-NOTES-4.16 1970-01-01 01:00:00.000000000 +0100 @@ -1,145 +0,0 @@ - - ┌────────────────────────────┐ - │ Release notes for i3 v4.16 │ - └────────────────────────────┘ - -This is i3 v4.16. This version is considered stable. All users of i3 are -strongly encouraged to upgrade. - -This release contains a number of assorted fixes and improvements across pretty -much all individual components of i3. - - ┌────────────────────────────┐ - │ Changes in i3 v4.16 │ - └────────────────────────────┘ - - • build: add conditionals for building docs/mans - • docs/i3bar-protocol: mention skipping blocks with empty full_text - • docs/ipc: add window_properties to tree node - • docs/layout-saving: clarify JSON non-compliance - • docs/userguide: clarify X resource value format - • docs/userguide: fix move_to_outputs link - • docs/userguide: link workspace_auto_back_and_forth from workspace - command - • docs/userguide: mention known issues for assign - • docs/userguide: use anchor for list_of_commands - • docs/userguide: add the default keybinding for focus parent - • man/*: fix title markers (for asciidoctor) - • man/i3-msg.man: add get_config and send_tick - • ipc: kill misbehaving subscribed clients instead of hanging - • ipc: introduce the sync IPC command for synchronization with i3bar - • ipc: scratchpad show now returns correct success - • ipc: send_tick now sets the already-documented “first” field - • i3bar-protocol: add modifiers to events sent by i3bar - • dump-asy: use Pod::Usage for --help and perldoc - • dump-asy: introduce -gv flag to disable opening ghostview - • dump-asy: introduce -save flag to store the rendered tree in a file - • dump-asy: add marks - • dump-asy: include floating containers - • i3bar: add --verbose flag - • i3bar: make modifier accept combinations (like floating_modifier) - • i3-config-wizard: add --modifier flag to allow for headless config - • i3-config-wizard: support startup notifications - • i3-msg: only print input + error position if they are set - • i3-msg: check replies also in quiet mode (-q) - • i3-msg: add support for the SUBSCRIBE message type - • i3-nagbar: support startup notifications - • i3-nagbar: add option for button that runs commands without a terminal - • i3-save-tree: exclude unsupported transient_for property - • i3-sensible-terminal: add alacritty - • i3-sensible-terminal: add hyper - • introduce strip_workspace_name alongside strip_workspace_numbers - • introduce title_align config directive - • “border toggle” now accepts an optional pixel argument - • “resize set” now interprets 0 as “no change” - • “resize set” now accepts the “width” and “height” keywords - • “resize” with pixel values now works for tiling containers - • the optional “absolute” method is now silently ignored in “move position” - commands, where it did not cause a visible difference anyway - • the _NET_WM_STATE_FOCUSED atom is now supported, resulting in e.g. - GTK applications displaying the correct window decoration - • moving fullscreen containers now moves them across outputs - • floating windows can now be used with a geometry of e.g. +1+1, i.e. - their top-left corner can be outside any output as long as the window - is contained partially by one - • prefer floating fullscreen containers when switching focus - • moving containers to an active workspace no longer changes focus - • the rename workspace command no longer confuses directions (e.g. “left”) - with output names - • prefer $XDG_CONFIG_HOME/i3/config over ~/.i3/config - • allow multiple assignments of workspaces to output - • respect maximum size in WM_NORMAL_HINTS - • reject requests for WM_STATE_ICONIC, which avoids e.g. wine - applications being stuck in paused state - • a number of code refactorings and cleanups, some of which tool-assisted - - ┌────────────────────────────┐ - │ Bugfixes │ - └────────────────────────────┘ - - • build: fix static linking - • i3bar: fix various memory leaks - • i3bar: fix crash when no status_command is provided - • i3bar: fix chopping the first character on the very left when using the - full width of the output - • i3bar: fix relative_x and width properties of click events - • i3bar: fix the tray disappearing in some cases when using "tray_output" - • fix various memory leaks and memory correctness issues - • refocus focused window on FOCUS_IN events for the root window. This - fixes incorrect behavior with steam and some tk apps - • fix focus bugs when moving unfocused containers - • fix incorrect urgent window state edge case - • moving an unfocused container from inside a split container to another - workspace doesn’t focus siblings - • toggling and killing floating windows now maintains focus order - • don’t incorrectly focus siblings when scrolling on window decorations - • fix crash when moving a container to a marked workspace - • fix swap when first is behind a fullscreen window - • fix crash when renaming an existing workspace to a name assigned to the - focused output - • reframe swallowed windows if depth doesn’t match - • use detectable autorepeat so that --release bindings are run only when - the key is actually released (and not when it is repeated) - • fix border artifacts when moving windows - • correctly handle bindings for the same mod key with and without --release - • reset B_UPON_KEYRELEASE_IGNORE_MODS bindings when switching modes - • fix height offset calculation in pango text drawing - • fix detection of libiconv on OpenBSD - • free workspace assignments on reload - • fix mouse position at startup with multiple outputs - • no longer allow dragging global fullscreen floating containers - • fix rendering artifacts with global fullscreen containers - • fix disabling floating for scratchpad windows - • fix a crash when renaming an unfocused empty workspace matching an - assignment - • ensure containers have a size of at least 1px after resize - • permit invalid UTF-8 in layout JSON files (e.g. for window titles) - • correct invalid UTF-8 characters in window and container titles - • fix a crash when moving to a child of a floating container - • fix a crash when matching __focused__ with no window open - • fix no_focus when only using floating windows - • fix max_aspect calculation - • moving an unfocused container from another output now maintains - the correct focus order - • don’t change focus order when swapping containers - • correctly update _NET_CURRENT_DESKTOP when moving containers between outputs - using the directional move command - • don’t produce move events after attempting to directionally move a container - towards a direction it can’t go - • fix sticky focus when switching to workspace on different output - - - ┌────────────────────────────┐ - │ Thanks! │ - └────────────────────────────┘ - -Thanks for testing, bugfixes, discussions and everything I forgot go out to: - - Adrian Cybulski, Aestek, Alan Barr, Andriy Yablonskyy, Cassandra Fox, - Christian Duerr, Dan Elkouby, downzer0, Elouan Martinet, Felix Buehler, - Gravemind, Harry Lawrence, Hritik Vijay, hwangcc23, Ingo Bürk, Joona, Klorax, - lasers, Łukasz Adamczak, Martin, Michael Stapelberg, Oliver Graff, - Orestis Floros, Soumya, Takashi Iwai, Thomas Fischer, Todd Walton, Tony - Crisci, Uli Schlachter, Vivien Didelot - --- Michael Stapelberg, 2018-11-04 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/RELEASE-NOTES-4.16.1 new/i3-4.16.1/RELEASE-NOTES-4.16.1 --- old/i3-4.16/RELEASE-NOTES-4.16.1 1970-01-01 01:00:00.000000000 +0100 +++ new/i3-4.16.1/RELEASE-NOTES-4.16.1 2019-01-27 22:07:32.000000000 +0100 @@ -0,0 +1,35 @@ + + ┌──────────────────────────────┐ + │ Release notes for i3 v4.16.1 │ + └──────────────────────────────┘ + +This is i3 v4.16.1. This version is considered stable. All users of i3 are +strongly encouraged to upgrade. + +This is a bugfix release for v4.16. + + ┌────────────────────────────┐ + │ Bugfixes │ + └────────────────────────────┘ + + • Truncate wm_name utf8 strings to first zero byte + (fixes window title corruption) + • Apply title_align to non-leaf containers + Additionally, marks will now display for non-leaf containers. + • attach_to_workspace: set new parent before tree_render + (fixes a heap-use-after-free) + • Use ipc queue for all messages + (fixes an i3bar crash) + • Fix crash with popups when fullscreen is non-leaf + • Fix: render_con shows floating containers on wrong workspace + + + ┌────────────────────────────┐ + │ Thanks! │ + └────────────────────────────┘ + +Thanks for testing, bugfixes, discussions and everything I forgot go out to: + + Orestis Floros + +-- Michael Stapelberg, 2019-01-27 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/configure new/i3-4.16.1/configure --- old/i3-4.16/configure 2018-11-04 15:30:54.000000000 +0100 +++ new/i3-4.16.1/configure 2019-01-27 22:10:26.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for i3 4.16. +# Generated by GNU Autoconf 2.69 for i3 4.16.1. # # Report bugs to <https://github.com/i3/i3/issues>. # @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='i3' PACKAGE_TARNAME='i3' -PACKAGE_VERSION='4.16' -PACKAGE_STRING='i3 4.16' +PACKAGE_VERSION='4.16.1' +PACKAGE_STRING='i3 4.16.1' PACKAGE_BUGREPORT='https://github.com/i3/i3/issues' PACKAGE_URL='' @@ -1374,7 +1374,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures i3 4.16 to adapt to many kinds of systems. +\`configure' configures i3 4.16.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1445,7 +1445,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of i3 4.16:";; + short | recursive ) echo "Configuration of i3 4.16.1:";; esac cat <<\_ACEOF @@ -1602,7 +1602,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -i3 configure 4.16 +i3 configure 4.16.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2025,7 +2025,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by i3 $as_me 4.16, which was +It was created by i3 $as_me 4.16.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3100,7 +3100,7 @@ # Define the identity of the package. PACKAGE='i3' - VERSION='4.16' + VERSION='4.16.1' cat >>confdefs.h <<_ACEOF @@ -10333,7 +10333,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by i3 $as_me 4.16, which was +This file was extended by i3 $as_me 4.16.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -10399,7 +10399,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -i3 config.status 4.16 +i3 config.status 4.16.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/configure.ac new/i3-4.16.1/configure.ac --- old/i3-4.16/configure.ac 2018-11-04 15:27:11.000000000 +0100 +++ new/i3-4.16.1/configure.ac 2019-01-27 22:07:32.000000000 +0100 @@ -2,7 +2,7 @@ # Run autoreconf -fi to generate a configure script from this file. AC_PREREQ([2.69]) -AC_INIT([i3], [4.16], [https://github.com/i3/i3/issues]) +AC_INIT([i3], [4.16.1], [https://github.com/i3/i3/issues]) # For AX_EXTEND_SRCDIR AX_ENABLE_BUILDDIR AM_INIT_AUTOMAKE([foreign subdir-objects -Wall no-dist-gzip dist-bzip2]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/docs/userguide.html new/i3-4.16.1/docs/userguide.html --- old/i3-4.16/docs/userguide.html 2018-11-04 15:31:08.000000000 +0100 +++ new/i3-4.16.1/docs/userguide.html 2019-01-27 22:10:57.000000000 +0100 @@ -3857,7 +3857,7 @@ <div id="footer"> <div id="footer-text"> Last updated - 2018-11-04 15:27:11 CET + 2019-01-27 22:04:46 CET </div> </div> </body> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/include/ipc.h new/i3-4.16.1/include/ipc.h --- old/i3-4.16/include/ipc.h 2018-11-04 15:27:11.000000000 +0100 +++ new/i3-4.16.1/include/ipc.h 2019-01-27 22:07:32.000000000 +0100 @@ -35,7 +35,8 @@ * event has been sent by i3. */ bool first_tick_sent; - struct ev_io *callback; + struct ev_io *read_callback; + struct ev_io *write_callback; struct ev_timer *timeout; uint8_t *buffer; size_t buffer_size; @@ -54,12 +55,12 @@ * message_type is the type of the message as the sender specified it. * */ -typedef void (*handler_t)(int, uint8_t *, int, uint32_t, uint32_t); +typedef void (*handler_t)(ipc_client *, uint8_t *, int, uint32_t, uint32_t); /* Macro to declare a callback */ -#define IPC_HANDLER(name) \ - static void handle_##name(int fd, uint8_t *message, \ - int size, uint32_t message_size, \ +#define IPC_HANDLER(name) \ + static void handle_##name(ipc_client *client, uint8_t *message, \ + int size, uint32_t message_size, \ uint32_t message_type) /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/man/i3-config-wizard.1 new/i3-4.16.1/man/i3-config-wizard.1 --- old/i3-4.16/man/i3-config-wizard.1 2018-11-04 15:31:06.000000000 +0100 +++ new/i3-4.16.1/man/i3-config-wizard.1 2019-01-27 22:10:56.000000000 +0100 @@ -2,12 +2,12 @@ .\" Title: i3-config-wizard .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 11/04/2018 +.\" Date: 01/27/2019 .\" Manual: i3 Manual -.\" Source: i3 4.16 +.\" Source: i3 4.16.1 .\" Language: English .\" -.TH "I3\-CONFIG\-WIZARD" "1" "11/04/2018" "i3 4\&.16" "i3 Manual" +.TH "I3\-CONFIG\-WIZARD" "1" "01/27/2019" "i3 4\&.16\&.1" "i3 Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/man/i3-dmenu-desktop.1 new/i3-4.16.1/man/i3-dmenu-desktop.1 --- old/i3-4.16/man/i3-dmenu-desktop.1 2018-11-04 15:31:04.000000000 +0100 +++ new/i3-4.16.1/man/i3-dmenu-desktop.1 2019-01-27 22:10:54.000000000 +0100 @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "I3-DMENU-DESKTOP 1" -.TH I3-DMENU-DESKTOP 1 "2017-09-24" "perl v5.28.0" "User Contributed Perl Documentation" +.TH I3-DMENU-DESKTOP 1 "2017-09-24" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/man/i3-dump-log.1 new/i3-4.16.1/man/i3-dump-log.1 --- old/i3-4.16/man/i3-dump-log.1 2018-11-04 15:31:07.000000000 +0100 +++ new/i3-4.16.1/man/i3-dump-log.1 2019-01-27 22:10:57.000000000 +0100 @@ -2,12 +2,12 @@ .\" Title: i3-dump-log .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 11/04/2018 +.\" Date: 01/27/2019 .\" Manual: i3 Manual -.\" Source: i3 4.16 +.\" Source: i3 4.16.1 .\" Language: English .\" -.TH "I3\-DUMP\-LOG" "1" "11/04/2018" "i3 4\&.16" "i3 Manual" +.TH "I3\-DUMP\-LOG" "1" "01/27/2019" "i3 4\&.16\&.1" "i3 Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/man/i3-input.1 new/i3-4.16.1/man/i3-input.1 --- old/i3-4.16/man/i3-input.1 2018-11-04 15:31:06.000000000 +0100 +++ new/i3-4.16.1/man/i3-input.1 2019-01-27 22:10:56.000000000 +0100 @@ -2,12 +2,12 @@ .\" Title: i3-input .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 11/04/2018 +.\" Date: 01/27/2019 .\" Manual: i3 Manual -.\" Source: i3 4.16 +.\" Source: i3 4.16.1 .\" Language: English .\" -.TH "I3\-INPUT" "1" "11/04/2018" "i3 4\&.16" "i3 Manual" +.TH "I3\-INPUT" "1" "01/27/2019" "i3 4\&.16\&.1" "i3 Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/man/i3-migrate-config-to-v4.1 new/i3-4.16.1/man/i3-migrate-config-to-v4.1 --- old/i3-4.16/man/i3-migrate-config-to-v4.1 2018-11-04 15:31:06.000000000 +0100 +++ new/i3-4.16.1/man/i3-migrate-config-to-v4.1 2019-01-27 22:10:56.000000000 +0100 @@ -2,12 +2,12 @@ .\" Title: i3-migrate-config-to-v4 .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 11/04/2018 +.\" Date: 01/27/2019 .\" Manual: i3 Manual -.\" Source: i3 4.16 +.\" Source: i3 4.16.1 .\" Language: English .\" -.TH "I3\-MIGRATE\-CONFIG\" "1" "11/04/2018" "i3 4\&.16" "i3 Manual" +.TH "I3\-MIGRATE\-CONFIG\" "1" "01/27/2019" "i3 4\&.16\&.1" "i3 Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/man/i3-msg.1 new/i3-4.16.1/man/i3-msg.1 --- old/i3-4.16/man/i3-msg.1 2018-11-04 15:31:06.000000000 +0100 +++ new/i3-4.16.1/man/i3-msg.1 2019-01-27 22:10:55.000000000 +0100 @@ -2,12 +2,12 @@ .\" Title: i3-msg .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 11/04/2018 +.\" Date: 01/27/2019 .\" Manual: i3 Manual -.\" Source: i3 4.16 +.\" Source: i3 4.16.1 .\" Language: English .\" -.TH "I3\-MSG" "1" "11/04/2018" "i3 4\&.16" "i3 Manual" +.TH "I3\-MSG" "1" "01/27/2019" "i3 4\&.16\&.1" "i3 Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/man/i3-nagbar.1 new/i3-4.16.1/man/i3-nagbar.1 --- old/i3-4.16/man/i3-nagbar.1 2018-11-04 15:31:06.000000000 +0100 +++ new/i3-4.16.1/man/i3-nagbar.1 2019-01-27 22:10:56.000000000 +0100 @@ -2,12 +2,12 @@ .\" Title: i3-nagbar .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 11/04/2018 +.\" Date: 01/27/2019 .\" Manual: i3 Manual -.\" Source: i3 4.16 +.\" Source: i3 4.16.1 .\" Language: English .\" -.TH "I3\-NAGBAR" "1" "11/04/2018" "i3 4\&.16" "i3 Manual" +.TH "I3\-NAGBAR" "1" "01/27/2019" "i3 4\&.16\&.1" "i3 Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/man/i3-save-tree.1 new/i3-4.16.1/man/i3-save-tree.1 --- old/i3-4.16/man/i3-save-tree.1 2018-11-04 15:31:04.000000000 +0100 +++ new/i3-4.16.1/man/i3-save-tree.1 2019-01-27 22:10:54.000000000 +0100 @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "I3-SAVE-TREE 1" -.TH I3-SAVE-TREE 1 "2018-11-04" "perl v5.28.0" "User Contributed Perl Documentation" +.TH I3-SAVE-TREE 1 "2018-11-04" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/man/i3-sensible-editor.1 new/i3-4.16.1/man/i3-sensible-editor.1 --- old/i3-4.16/man/i3-sensible-editor.1 2018-11-04 15:31:07.000000000 +0100 +++ new/i3-4.16.1/man/i3-sensible-editor.1 2019-01-27 22:10:57.000000000 +0100 @@ -2,12 +2,12 @@ .\" Title: i3-sensible-editor .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 11/04/2018 +.\" Date: 01/27/2019 .\" Manual: i3 Manual -.\" Source: i3 4.16 +.\" Source: i3 4.16.1 .\" Language: English .\" -.TH "I3\-SENSIBLE\-EDITOR" "1" "11/04/2018" "i3 4\&.16" "i3 Manual" +.TH "I3\-SENSIBLE\-EDITOR" "1" "01/27/2019" "i3 4\&.16\&.1" "i3 Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/man/i3-sensible-pager.1 new/i3-4.16.1/man/i3-sensible-pager.1 --- old/i3-4.16/man/i3-sensible-pager.1 2018-11-04 15:31:07.000000000 +0100 +++ new/i3-4.16.1/man/i3-sensible-pager.1 2019-01-27 22:10:57.000000000 +0100 @@ -2,12 +2,12 @@ .\" Title: i3-sensible-pager .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 11/04/2018 +.\" Date: 01/27/2019 .\" Manual: i3 Manual -.\" Source: i3 4.16 +.\" Source: i3 4.16.1 .\" Language: English .\" -.TH "I3\-SENSIBLE\-PAGER" "1" "11/04/2018" "i3 4\&.16" "i3 Manual" +.TH "I3\-SENSIBLE\-PAGER" "1" "01/27/2019" "i3 4\&.16\&.1" "i3 Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/man/i3-sensible-terminal.1 new/i3-4.16.1/man/i3-sensible-terminal.1 --- old/i3-4.16/man/i3-sensible-terminal.1 2018-11-04 15:31:08.000000000 +0100 +++ new/i3-4.16.1/man/i3-sensible-terminal.1 2019-01-27 22:10:57.000000000 +0100 @@ -2,12 +2,12 @@ .\" Title: i3-sensible-terminal .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 11/04/2018 +.\" Date: 01/27/2019 .\" Manual: i3 Manual -.\" Source: i3 4.16 +.\" Source: i3 4.16.1 .\" Language: English .\" -.TH "I3\-SENSIBLE\-TERMIN" "1" "11/04/2018" "i3 4\&.16" "i3 Manual" +.TH "I3\-SENSIBLE\-TERMIN" "1" "01/27/2019" "i3 4\&.16\&.1" "i3 Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/man/i3.1 new/i3-4.16.1/man/i3.1 --- old/i3-4.16/man/i3.1 2018-11-04 15:31:06.000000000 +0100 +++ new/i3-4.16.1/man/i3.1 2019-01-27 22:10:55.000000000 +0100 @@ -2,12 +2,12 @@ .\" Title: i3 .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 11/04/2018 +.\" Date: 01/27/2019 .\" Manual: i3 Manual -.\" Source: i3 4.16 +.\" Source: i3 4.16.1 .\" Language: English .\" -.TH "I3" "1" "11/04/2018" "i3 4\&.16" "i3 Manual" +.TH "I3" "1" "01/27/2019" "i3 4\&.16\&.1" "i3 Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/man/i3bar.1 new/i3-4.16.1/man/i3bar.1 --- old/i3-4.16/man/i3bar.1 2018-11-04 15:31:06.000000000 +0100 +++ new/i3-4.16.1/man/i3bar.1 2019-01-27 22:10:55.000000000 +0100 @@ -2,12 +2,12 @@ .\" Title: i3bar .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 11/04/2018 +.\" Date: 01/27/2019 .\" Manual: i3 Manual -.\" Source: i3 4.16 +.\" Source: i3 4.16.1 .\" Language: English .\" -.TH "I3BAR" "1" "11/04/2018" "i3 4\&.16" "i3 Manual" +.TH "I3BAR" "1" "01/27/2019" "i3 4\&.16\&.1" "i3 Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/src/commands.c new/i3-4.16.1/src/commands.c --- old/i3-4.16/src/commands.c 2018-11-04 15:27:11.000000000 +0100 +++ new/i3-4.16.1/src/commands.c 2019-01-27 22:07:32.000000000 +0100 @@ -13,10 +13,6 @@ #include <float.h> #include <stdarg.h> -#ifdef I3_ASAN_ENABLED -#include <sanitizer/lsan_interface.h> -#endif - #include "shmlog.h" // Macros to make the YAJL API a bit easier to use. @@ -1567,12 +1563,6 @@ */ void cmd_exit(I3_CMD) { LOG("Exiting due to user command.\n"); -#ifdef I3_ASAN_ENABLED - __lsan_do_leak_check(); -#endif - ipc_shutdown(SHUTDOWN_REASON_EXIT); - unlink(config.ipc_socket_path); - xcb_disconnect(conn); exit(0); /* unreached */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/src/floating.c new/i3-4.16.1/src/floating.c --- old/i3-4.16/src/floating.c 2018-11-04 15:27:11.000000000 +0100 +++ new/i3-4.16.1/src/floating.c 2019-01-27 22:08:36.000000000 +0100 @@ -907,8 +907,7 @@ /* Workspace change will already result in a tree_render. */ if (!reassigned) { - render_con(con, false, true); - x_push_node(con); + tree_render(); } return true; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/src/ipc.c new/i3-4.16.1/src/ipc.c --- old/i3-4.16/src/ipc.c 2018-11-04 15:27:11.000000000 +0100 +++ new/i3-4.16.1/src/ipc.c 2019-01-27 22:07:32.000000000 +0100 @@ -38,46 +38,6 @@ err(-1, "Could not set O_NONBLOCK"); } -/* - * Given a message and a message type, create the corresponding header, merge it - * with the message and append it to the given client's output buffer. - * - */ -static void append_payload(ipc_client *client, uint32_t message_type, const char *payload) { - const size_t size = strlen(payload); - const i3_ipc_header_t header = { - .magic = {'i', '3', '-', 'i', 'p', 'c'}, - .size = size, - .type = message_type}; - const size_t header_size = sizeof(i3_ipc_header_t); - const size_t message_size = header_size + size; - - client->buffer = srealloc(client->buffer, client->buffer_size + message_size); - memcpy(client->buffer + client->buffer_size, ((void *)&header), header_size); - memcpy(client->buffer + client->buffer_size + header_size, payload, size); - client->buffer_size += message_size; -} - -static void free_ipc_client(ipc_client *client) { - close(client->fd); - - ev_io_stop(main_loop, client->callback); - FREE(client->callback); - if (client->timeout) { - ev_timer_stop(main_loop, client->timeout); - FREE(client->timeout); - } - - free(client->buffer); - - for (int i = 0; i < client->num_events; i++) { - free(client->events[i]); - } - free(client->events); - TAILQ_REMOVE(&all_clients, client, clients); - free(client); -} - static void ipc_client_timeout(EV_P_ ev_timer *w, int revents); static void ipc_socket_writeable_cb(EV_P_ struct ev_io *w, int revents); @@ -89,8 +49,8 @@ /* * Try to write the contents of the pending buffer to the client's subscription - * socket. Will set, reset or clear the timeout and io callbacks depending on - * the result of the write operation. + * socket. Will set, reset or clear the timeout and io write callbacks depending + * on the result of the write operation. * */ static void ipc_push_pending(ipc_client *client) { @@ -108,13 +68,13 @@ ev_timer_stop(main_loop, client->timeout); FREE(client->timeout); } - ev_io_stop(main_loop, client->callback); + ev_io_stop(main_loop, client->write_callback); return; } /* Otherwise, make sure that the io callback is enabled and create a new * timer if needed. */ - ev_io_start(main_loop, client->callback); + ev_io_start(main_loop, client->write_callback); if (!client->timeout) { struct ev_timer *timeout = scalloc(1, sizeof(struct ev_timer)); @@ -141,6 +101,54 @@ } /* + * Given a message and a message type, create the corresponding header, merge it + * with the message and append it to the given client's output buffer. Also, + * send the message if the client's buffer was empty. + * + */ +static void ipc_send_client_message(ipc_client *client, size_t size, const uint32_t message_type, const uint8_t *payload) { + const i3_ipc_header_t header = { + .magic = {'i', '3', '-', 'i', 'p', 'c'}, + .size = size, + .type = message_type}; + const size_t header_size = sizeof(i3_ipc_header_t); + const size_t message_size = header_size + size; + + const bool push_now = (client->buffer_size == 0); + client->buffer = srealloc(client->buffer, client->buffer_size + message_size); + memcpy(client->buffer + client->buffer_size, ((void *)&header), header_size); + memcpy(client->buffer + client->buffer_size + header_size, payload, size); + client->buffer_size += message_size; + + if (push_now) { + ipc_push_pending(client); + } +} + +static void free_ipc_client(ipc_client *client) { + DLOG("Disconnecting client on fd %d\n", client->fd); + close(client->fd); + + ev_io_stop(main_loop, client->read_callback); + FREE(client->read_callback); + ev_io_stop(main_loop, client->write_callback); + FREE(client->write_callback); + if (client->timeout) { + ev_timer_stop(main_loop, client->timeout); + FREE(client->timeout); + } + + free(client->buffer); + + for (int i = 0; i < client->num_events; i++) { + free(client->events[i]); + } + free(client->events); + TAILQ_REMOVE(&all_clients, client, clients); + free(client); +} + +/* * Sends the specified event to all IPC clients which are currently connected * and subscribed to this kind of event. * @@ -148,21 +156,11 @@ void ipc_send_event(const char *event, uint32_t message_type, const char *payload) { ipc_client *current; TAILQ_FOREACH(current, &all_clients, clients) { - /* see if this client is interested in this event */ - bool interested = false; for (int i = 0; i < current->num_events; i++) { - if (strcasecmp(current->events[i], event) != 0) - continue; - interested = true; - break; - } - if (!interested) - continue; - - const bool push_now = (current->buffer_size == 0); - append_payload(current, message_type, payload); - if (push_now) { - ipc_push_pending(current); + if (strcasecmp(current->events[i], event) == 0) { + ipc_send_client_message(current, strlen(payload), message_type, (uint8_t *)payload); + break; + } } } } @@ -234,8 +232,8 @@ ylength length; yajl_gen_get_buf(gen, &reply, &length); - ipc_send_message(fd, length, I3_IPC_REPLY_TYPE_COMMAND, - (const uint8_t *)reply); + ipc_send_client_message(client, length, I3_IPC_REPLY_TYPE_COMMAND, + (const uint8_t *)reply); yajl_gen_free(gen); } @@ -855,7 +853,7 @@ ylength length; y(get_buf, &payload, &length); - ipc_send_message(fd, length, I3_IPC_REPLY_TYPE_TREE, payload); + ipc_send_client_message(client, length, I3_IPC_REPLY_TYPE_TREE, payload); y(free); } @@ -919,7 +917,7 @@ ylength length; y(get_buf, &payload, &length); - ipc_send_message(fd, length, I3_IPC_REPLY_TYPE_WORKSPACES, payload); + ipc_send_client_message(client, length, I3_IPC_REPLY_TYPE_WORKSPACES, payload); y(free); } @@ -973,7 +971,7 @@ ylength length; y(get_buf, &payload, &length); - ipc_send_message(fd, length, I3_IPC_REPLY_TYPE_OUTPUTS, payload); + ipc_send_client_message(client, length, I3_IPC_REPLY_TYPE_OUTPUTS, payload); y(free); } @@ -1000,7 +998,7 @@ ylength length; y(get_buf, &payload, &length); - ipc_send_message(fd, length, I3_IPC_REPLY_TYPE_MARKS, payload); + ipc_send_client_message(client, length, I3_IPC_REPLY_TYPE_MARKS, payload); y(free); } @@ -1033,7 +1031,7 @@ ylength length; y(get_buf, &payload, &length); - ipc_send_message(fd, length, I3_IPC_REPLY_TYPE_VERSION, payload); + ipc_send_client_message(client, length, I3_IPC_REPLY_TYPE_VERSION, payload); y(free); } @@ -1058,7 +1056,7 @@ ylength length; y(get_buf, &payload, &length); - ipc_send_message(fd, length, I3_IPC_REPLY_TYPE_BAR_CONFIG, payload); + ipc_send_client_message(client, length, I3_IPC_REPLY_TYPE_BAR_CONFIG, payload); y(free); return; } @@ -1095,7 +1093,7 @@ ylength length; y(get_buf, &payload, &length); - ipc_send_message(fd, length, I3_IPC_REPLY_TYPE_BAR_CONFIG, payload); + ipc_send_client_message(client, length, I3_IPC_REPLY_TYPE_BAR_CONFIG, payload); y(free); } @@ -1117,7 +1115,7 @@ ylength length; y(get_buf, &payload, &length); - ipc_send_message(fd, length, I3_IPC_REPLY_TYPE_BINDING_MODES, payload); + ipc_send_client_message(client, length, I3_IPC_REPLY_TYPE_BINDING_MODES, payload); y(free); } @@ -1156,21 +1154,6 @@ IPC_HANDLER(subscribe) { yajl_handle p; yajl_status stat; - ipc_client *current, *client = NULL; - - /* Search the ipc_client structure for this connection */ - TAILQ_FOREACH(current, &all_clients, clients) { - if (current->fd != fd) - continue; - - client = current; - break; - } - - if (client == NULL) { - ELOG("Could not find ipc_client data structure for fd %d\n", fd); - return; - } /* Setup the JSON parser */ static yajl_callbacks callbacks = { @@ -1187,13 +1170,13 @@ yajl_free_error(p, err); const char *reply = "{\"success\":false}"; - ipc_send_message(fd, strlen(reply), I3_IPC_REPLY_TYPE_SUBSCRIBE, (const uint8_t *)reply); + ipc_send_client_message(client, strlen(reply), I3_IPC_REPLY_TYPE_SUBSCRIBE, (const uint8_t *)reply); yajl_free(p); return; } yajl_free(p); const char *reply = "{\"success\":true}"; - ipc_send_message(fd, strlen(reply), I3_IPC_REPLY_TYPE_SUBSCRIBE, (const uint8_t *)reply); + ipc_send_client_message(client, strlen(reply), I3_IPC_REPLY_TYPE_SUBSCRIBE, (const uint8_t *)reply); if (client->first_tick_sent) { return; @@ -1212,7 +1195,7 @@ client->first_tick_sent = true; const char *payload = "{\"first\":true,\"payload\":\"\"}"; - ipc_send_message(client->fd, strlen(payload), I3_IPC_EVENT_TICK, (const uint8_t *)payload); + ipc_send_client_message(client, strlen(payload), I3_IPC_EVENT_TICK, (const uint8_t *)payload); } /* @@ -1232,7 +1215,7 @@ ylength length; y(get_buf, &payload, &length); - ipc_send_message(fd, length, I3_IPC_REPLY_TYPE_CONFIG, payload); + ipc_send_client_message(client, length, I3_IPC_REPLY_TYPE_CONFIG, payload); y(free); } @@ -1261,7 +1244,7 @@ y(free); const char *reply = "{\"success\":true}"; - ipc_send_message(fd, strlen(reply), I3_IPC_REPLY_TYPE_TICK, (const uint8_t *)reply); + ipc_send_client_message(client, strlen(reply), I3_IPC_REPLY_TYPE_TICK, (const uint8_t *)reply); DLOG("Sent tick event\n"); } @@ -1312,7 +1295,7 @@ yajl_free_error(p, err); const char *reply = "{\"success\":false}"; - ipc_send_message(fd, strlen(reply), I3_IPC_REPLY_TYPE_SYNC, (const uint8_t *)reply); + ipc_send_client_message(client, strlen(reply), I3_IPC_REPLY_TYPE_SYNC, (const uint8_t *)reply); yajl_free(p); return; } @@ -1321,7 +1304,7 @@ DLOG("received IPC sync request (rnd = %d, window = 0x%08x)\n", state.rnd, state.window); sync_respond(state.window, state.rnd); const char *reply = "{\"success\":true}"; - ipc_send_message(fd, strlen(reply), I3_IPC_REPLY_TYPE_SYNC, (const uint8_t *)reply); + ipc_send_client_message(client, strlen(reply), I3_IPC_REPLY_TYPE_SYNC, (const uint8_t *)reply); } /* The index of each callback function corresponds to the numeric @@ -1355,6 +1338,8 @@ uint32_t message_type; uint32_t message_length; uint8_t *message = NULL; + ipc_client *client = (ipc_client *)w->data; + assert(client->fd == w->fd); int ret = ipc_recv_message(w->fd, &message_type, &message_length, &message); /* EOF or other error */ @@ -1367,25 +1352,8 @@ /* If not, there was some kind of error. We don’t bother and close the * connection. Delete the client from the list of clients. */ - bool closed = false; - ipc_client *current; - TAILQ_FOREACH(current, &all_clients, clients) { - if (current->fd != w->fd) - continue; - - free_ipc_client(current); - closed = true; - break; - } - if (!closed) { - close(w->fd); - } - - ev_io_stop(EV_A_ w); - free(w); + free_ipc_client(client); FREE(message); - - DLOG("IPC: client disconnected\n"); return; } @@ -1393,7 +1361,7 @@ DLOG("Unhandled message type: %d\n", message_type); else { handler_t h = handlers[message_type]; - h(w->fd, message, 0, message_length, message_type); + h(client, message, 0, message_length, message_type); } FREE(message); @@ -1465,36 +1433,33 @@ void ipc_new_client(EV_P_ struct ev_io *w, int revents) { struct sockaddr_un peer; socklen_t len = sizeof(struct sockaddr_un); - int client; - if ((client = accept(w->fd, (struct sockaddr *)&peer, &len)) < 0) { - if (errno == EINTR) - return; - else + int fd; + if ((fd = accept(w->fd, (struct sockaddr *)&peer, &len)) < 0) { + if (errno != EINTR) { perror("accept()"); + } return; } /* Close this file descriptor on exec() */ - (void)fcntl(client, F_SETFD, FD_CLOEXEC); + (void)fcntl(fd, F_SETFD, FD_CLOEXEC); - set_nonblock(client); + set_nonblock(fd); - struct ev_io *package = scalloc(1, sizeof(struct ev_io)); - ev_io_init(package, ipc_receive_message, client, EV_READ); - ev_io_start(EV_A_ package); + ipc_client *client = scalloc(1, sizeof(ipc_client)); + client->fd = fd; - ipc_client *new = scalloc(1, sizeof(ipc_client)); + client->read_callback = scalloc(1, sizeof(struct ev_io)); + client->read_callback->data = client; + ev_io_init(client->read_callback, ipc_receive_message, fd, EV_READ); + ev_io_start(EV_A_ client->read_callback); - package = scalloc(1, sizeof(struct ev_io)); - package->data = new; - ev_io_init(package, ipc_socket_writeable_cb, client, EV_WRITE); + client->write_callback = scalloc(1, sizeof(struct ev_io)); + client->write_callback->data = client; + ev_io_init(client->write_callback, ipc_socket_writeable_cb, fd, EV_WRITE); DLOG("IPC: new client connected on fd %d\n", w->fd); - - new->fd = client; - new->callback = package; - - TAILQ_INSERT_TAIL(&all_clients, new, clients); + TAILQ_INSERT_TAIL(&all_clients, client, clients); } /* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/src/main.c new/i3-4.16.1/src/main.c --- old/i3-4.16/src/main.c 2018-11-04 15:27:11.000000000 +0100 +++ new/i3-4.16.1/src/main.c 2019-01-27 22:07:32.000000000 +0100 @@ -160,13 +160,6 @@ * */ static void i3_exit(void) { -/* We need ev >= 4 for the following code. Since it is not *that* important (it - * only makes sure that there are no i3-nagbar instances left behind) we still - * support old systems with libev 3. */ -#if EV_VERSION_MAJOR >= 4 - ev_loop_destroy(main_loop); -#endif - if (*shmlogname != '\0') { fprintf(stderr, "Closing SHM log \"%s\"\n", shmlogname); fflush(stderr); @@ -174,6 +167,18 @@ } ipc_shutdown(SHUTDOWN_REASON_EXIT); unlink(config.ipc_socket_path); + xcb_disconnect(conn); + +/* We need ev >= 4 for the following code. Since it is not *that* important (it + * only makes sure that there are no i3-nagbar instances left behind) we still + * support old systems with libev 3. */ +#if EV_VERSION_MAJOR >= 4 + ev_loop_destroy(main_loop); +#endif + +#ifdef I3_ASAN_ENABLED + __lsan_do_leak_check(); +#endif } /* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/src/move.c new/i3-4.16.1/src/move.c --- old/i3-4.16/src/move.c 2018-11-04 15:27:11.000000000 +0100 +++ new/i3-4.16.1/src/move.c 2019-01-27 22:07:32.000000000 +0100 @@ -178,9 +178,7 @@ */ static void attach_to_workspace(Con *con, Con *ws, direction_t direction) { con_detach(con); - con_fix_percent(con->parent); - CALL(con->parent, on_remove_child); - + Con *old_parent = con->parent; con->parent = ws; if (direction == D_RIGHT || direction == D_DOWN) { @@ -195,6 +193,9 @@ * does not make sense anyways. */ con->percent = 0.0; con_fix_percent(ws); + + con_fix_percent(old_parent); + CALL(old_parent, on_remove_child); } /* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/src/render.c new/i3-4.16.1/src/render.c --- old/i3-4.16/src/render.c 2018-11-04 15:27:11.000000000 +0100 +++ new/i3-4.16.1/src/render.c 2019-01-27 22:07:32.000000000 +0100 @@ -272,7 +272,7 @@ * fullscreen work correctly (ticket #564). Exception to the * above rule: smart popup_during_fullscreen handling (popups * belonging to the fullscreen app will be rendered). */ - if (config.popup_during_fullscreen != PDF_SMART) { + if (config.popup_during_fullscreen != PDF_SMART || fullscreen->window == NULL) { continue; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/src/window.c new/i3-4.16.1/src/window.c --- old/i3-4.16/src/window.c 2017-09-24 20:40:44.000000000 +0200 +++ new/i3-4.16.1/src/window.c 2019-01-27 22:07:32.000000000 +0100 @@ -74,8 +74,12 @@ } i3string_free(win->name); - win->name = i3string_from_utf8_with_length(xcb_get_property_value(prop), - xcb_get_property_value_length(prop)); + + /* Truncate the name at the first zero byte. See #3515. */ + const int len = xcb_get_property_value_length(prop); + char *name = sstrndup(xcb_get_property_value(prop), len); + win->name = i3string_from_utf8(name); + free(name); Con *con = con_by_window_id(win->id); if (con != NULL && con->title_format != NULL) { @@ -119,8 +123,10 @@ } i3string_free(win->name); - win->name = i3string_from_utf8_with_length(xcb_get_property_value(prop), - xcb_get_property_value_length(prop)); + const int len = xcb_get_property_value_length(prop); + char *name = sstrndup(xcb_get_property_value(prop), len); + win->name = i3string_from_utf8(name); + free(name); Con *con = con_by_window_id(win->id); if (con != NULL && con->title_format != NULL) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/src/x.c new/i3-4.16.1/src/x.c --- old/i3-4.16/src/x.c 2018-11-04 15:27:11.000000000 +0100 +++ new/i3-4.16.1/src/x.c 2019-01-27 22:07:32.000000000 +0100 @@ -579,31 +579,6 @@ /* 6: draw the title */ int text_offset_y = (con->deco_rect.height - config.font.height) / 2; - struct Window *win = con->window; - if (win == NULL) { - i3String *title; - if (con->title_format == NULL) { - char *_title; - char *tree = con_get_tree_representation(con); - sasprintf(&_title, "i3: %s", tree); - free(tree); - - title = i3string_from_utf8(_title); - FREE(_title); - } else { - title = con_parse_title_format(con); - } - - draw_util_text(title, &(parent->frame_buffer), - p->color->text, p->color->background, - con->deco_rect.x + logical_px(2), - con->deco_rect.y + text_offset_y, - con->deco_rect.width - 2 * logical_px(2)); - I3STRING_FREE(title); - - goto after_title; - } - const int title_padding = logical_px(2); const int deco_width = (int)con->deco_rect.width; int mark_width = 0; @@ -643,7 +618,23 @@ FREE(formatted_mark); } - i3String *title = con->title_format == NULL ? win->name : con_parse_title_format(con); + i3String *title = NULL; + struct Window *win = con->window; + if (win == NULL) { + if (con->title_format == NULL) { + char *_title; + char *tree = con_get_tree_representation(con); + sasprintf(&_title, "i3: %s", tree); + free(tree); + + title = i3string_from_utf8(_title); + FREE(_title); + } else { + title = con_parse_title_format(con); + } + } else { + title = con->title_format == NULL ? win->name : con_parse_title_format(con); + } if (title == NULL) { goto copy_pixmaps; } @@ -676,11 +667,10 @@ con->deco_rect.y + text_offset_y, deco_width - mark_width - 2 * title_padding); - if (con->title_format != NULL) { + if (win == NULL || con->title_format != NULL) { I3STRING_FREE(title); } -after_title: x_draw_decoration_after_title(con, p); copy_pixmaps: draw_util_copy_surface(&(con->frame_buffer), &(con->frame), 0, 0, 0, 0, con->rect.width, con->rect.height); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/i3-4.16/testcases/t/303-regress-move-floating.t new/i3-4.16.1/testcases/t/303-regress-move-floating.t --- old/i3-4.16/testcases/t/303-regress-move-floating.t 1970-01-01 01:00:00.000000000 +0100 +++ new/i3-4.16.1/testcases/t/303-regress-move-floating.t 2019-01-27 22:07:32.000000000 +0100 @@ -0,0 +1,33 @@ +#!perl +# vim:ts=4:sw=4:expandtab +# +# Please read the following documents before working on tests: +# • https://build.i3wm.org/docs/testsuite.html +# (or docs/testsuite) +# +# • https://build.i3wm.org/docs/lib-i3test.html +# (alternatively: perldoc ./testcases/lib/i3test.pm) +# +# • https://build.i3wm.org/docs/ipc.html +# (or docs/ipc) +# +# • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf +# (unless you are already familiar with Perl) +# +# Regression: moving a container which is the only child of the only child of a +# floating container crashes i3. +# Ticket: #3556 +# Bug still in: 4.16-61-g376833db4 +use i3test; + +my $ws = fresh_workspace; +open_window; +open_window; +cmd 'split v, focus parent, floating toggle, focus child, move right'; +does_i3_live; + +$ws = get_ws($ws); +is(scalar @{$ws->{floating_nodes}}, 0, 'No floating nodes in workspace'); +is(scalar @{$ws->{nodes}}, 2, 'Two tiling nodes in workspace'); + +done_testing;
