From 29e8167cda5ebbca32aece55d2b952775b583be6 Mon Sep 17 00:00:00 2001 From: Michael Hofmann Date: Sun, 29 Mar 2015 15:15:12 +0200 Subject: [PATCH 1/5] Cope with non-null-terminated x class properties. - fixes #1605 --- src/window.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/window.c b/src/window.c index ace109e3..5485bcc3 100644 --- a/src/window.c +++ b/src/window.c @@ -26,13 +26,16 @@ void window_update_class(i3Window *win, xcb_get_property_reply_t *prop, bool bef /* We cannot use asprintf here since this property contains two * null-terminated strings (for compatibility reasons). Instead, we * use strdup() on both strings */ - char *new_class = xcb_get_property_value(prop); + const size_t prop_length = xcb_get_property_value_length(prop); + char *new_class = smalloc(prop_length + 1); + memcpy(new_class, xcb_get_property_value(prop), prop_length); + new_class[prop_length] = '\0'; FREE(win->class_instance); FREE(win->class_class); win->class_instance = sstrdup(new_class); - if ((strlen(new_class) + 1) < (size_t)xcb_get_property_value_length(prop)) + if ((strlen(new_class) + 1) < prop_length) win->class_class = sstrdup(new_class + strlen(new_class) + 1); else win->class_class = NULL; @@ -40,12 +43,14 @@ void window_update_class(i3Window *win, xcb_get_property_reply_t *prop, bool bef win->class_instance, win->class_class); if (before_mgmt) { + free(new_class); free(prop); return; } run_assignments(win); + free(new_class); free(prop); } From 483a51a2f296da5b9a94d4fc15cd46f136f9baca Mon Sep 17 00:00:00 2001 From: Michael Hofmann Date: Mon, 30 Mar 2015 08:23:00 +0200 Subject: [PATCH 2/5] Get workspace name when renaming current workspace. - fixes #1607 --- src/commands.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/commands.c b/src/commands.c index 9b51b3ec..fd43a693 100644 --- a/src/commands.c +++ b/src/commands.c @@ -1836,6 +1836,7 @@ void cmd_rename_workspace(I3_CMD, char *old_name, char *new_name) { !strcasecmp(child->name, old_name)); } else { workspace = con_get_workspace(focused); + old_name = workspace->name; } if (!workspace) { From 40b9048102b781e262bfe0cf1dade1050b19a63b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20B=C3=BCrk?= Date: Fri, 3 Apr 2015 22:54:59 +0200 Subject: [PATCH 3/5] Use a reasonable default sep_block_width if a separator_symbol is given --- docs/userguide | 3 +-- i3bar/include/xcb.h | 3 +++ i3bar/src/child.c | 5 ++++- i3bar/src/xcb.c | 3 --- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/userguide b/docs/userguide index 3d935e40..80de5c88 100644 --- a/docs/userguide +++ b/docs/userguide @@ -1252,8 +1252,7 @@ bar { === Custom separator symbol Specifies a custom symbol to be used for the separator as opposed to the vertical, -one pixel thick separator. Note that you may have to adjust the +sep_block_width+ -property. +one pixel thick separator. *Syntax*: ------------------------- diff --git a/i3bar/include/xcb.h b/i3bar/include/xcb.h index 8e48c0c1..bb37e7d5 100644 --- a/i3bar/include/xcb.h +++ b/i3bar/include/xcb.h @@ -44,6 +44,9 @@ struct xcb_color_strings_t { typedef struct xcb_colors_t xcb_colors_t; +/* Cached width of the custom separator if one was set */ +int separator_symbol_width; + /* * Early initialization of the connection to X11: Everything which does not * depend on 'config'. diff --git a/i3bar/src/child.c b/i3bar/src/child.c index 9cc50f2a..41f8880d 100644 --- a/i3bar/src/child.c +++ b/i3bar/src/child.c @@ -162,7 +162,10 @@ static int stdin_start_map(void *context) { memset(&(ctx->block), '\0', sizeof(struct status_block)); /* Default width of the separator block. */ - ctx->block.sep_block_width = logical_px(9); + if (config.separator_symbol == NULL) + ctx->block.sep_block_width = logical_px(9); + else + ctx->block.sep_block_width = logical_px(8) + separator_symbol_width; return 1; } diff --git a/i3bar/src/xcb.c b/i3bar/src/xcb.c index e53b9226..ba57b9fa 100644 --- a/i3bar/src/xcb.c +++ b/i3bar/src/xcb.c @@ -63,9 +63,6 @@ static i3Font font; /* Overall height of the bar (based on font size) */ int bar_height; -/* Cached width of the custom separator if one was set */ -int separator_symbol_width; - /* These are only relevant for XKB, which we only need for grabbing modifiers */ int xkb_base; int mod_pressed = 0; From eb04a64067e67cc480d1b353a62659d9dec46576 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 6 Apr 2015 15:40:12 +0200 Subject: [PATCH 4/5] Bugfix: Remove windows from the save set when unmapping. fixes #1617 --- src/tree.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/tree.c b/src/tree.c index b40ba2a2..753b02fc 100644 --- a/src/tree.c +++ b/src/tree.c @@ -253,6 +253,13 @@ bool tree_close(Con *con, kill_window_t kill_window, bool dont_kill_parent, bool cookie = xcb_change_property(conn, XCB_PROP_MODE_REPLACE, con->window->id, A_WM_STATE, A_WM_STATE, 32, 2, data); + /* Remove the window from the save set. All windows in the save set + * will be mapped when i3 closes its connection (e.g. when + * restarting). This is not what we want, since some apps keep + * unmapped windows around and don’t expect them to suddenly be + * mapped. See http://bugs.i3wm.org/1617 */ + xcb_change_save_set(conn, XCB_SET_MODE_DELETE, con->window->id); + /* Ignore X11 errors for the ReparentWindow request. * X11 Errors are returned when the window was already destroyed */ add_ignore_event(cookie.sequence, 0); From 9557a0a5b2f806b21440cf3dfd3bf6c05c650edc Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Thu, 16 Apr 2015 09:02:58 +0200 Subject: [PATCH 5/5] release i3 4.10.2 --- RELEASE-NOTES-4.10.1 | 68 -------------------------------------------- RELEASE-NOTES-4.10.2 | 26 +++++++++++++++++ man/asciidoc.conf | 2 +- 3 files changed, 27 insertions(+), 69 deletions(-) delete mode 100644 RELEASE-NOTES-4.10.1 create mode 100644 RELEASE-NOTES-4.10.2 diff --git a/RELEASE-NOTES-4.10.1 b/RELEASE-NOTES-4.10.1 deleted file mode 100644 index 61b47705..00000000 --- a/RELEASE-NOTES-4.10.1 +++ /dev/null @@ -1,68 +0,0 @@ - - ┌──────────────────────────────┐ - │ Release notes for i3 v4.10.1 │ - └──────────────────────────────┘ - -This is i3 v4.10.1. This version is considered stable. All users of i3 are -strongly encouraged to upgrade. - -This release contains mostly bugfixes, but we felt it was necessary since there -are two important changes in behavior: we have reverted the pango markup -parsing by default (introduced with i3 v4.9) and the change in how the -“workspace” command behaves (introduced with i3 v4.9). Both of them broke some -user’s setups, which is not acceptable. In order to help us avoid such mistakes -in the future, please consider using the i3 git version — it is typically -stable. - -PS: The v4.10 release did not contain any of the commits we meant to release -due to a human error in our release automation. Hence the v4.10.1 release. - - ┌────────────────────────────┐ - │ Changes in i3 v4.10.1 │ - └────────────────────────────┘ - - • i3bar: cut long statuslines from the left - • i3bar: add support for the short_text property - • i3-sensible-terminal: launch i3-nagbar when no terminal is found - • i3-config-wizard: switch modifier on key up/down - • docs/layout-saving: added a troubleshooting section - • docs: degender all the terms - • Revert "Workspace command number selection" - • don’t parse blocks as markup by default - • Allow escaping backslashes in commands. - • switch default font from “DejaVu Sans Mono 8” to “monospace 8”, which is - typically a synonym, except for users who prefer a different font. - • When renaming a workspace, look for assignments and move the renamed - workspace to the appropriate output. - • i3-save-tree: make --workspace optional by defaulting to the focused - workspace - • Allow nop command without argument - - ┌────────────────────────────┐ - │ Bugfixes │ - └────────────────────────────┘ - - • i3bar: buffer the statusline to avoid flickering - • i3bar: fix click events for workspace buttons with long statusline - • i3bar: set correct initial position when reconfiguring - • i3bar: reconfigure strut partial on reload - • i3-nagbar: fix sizes/positioning on hi-dpi displays - • i3-config-wizard: fix sizes/positioning on hi-dpi displays - • i3-input: fix sizes/positioning on hi-dpi displays - • Fix scrolling in window decoration with hidden cursor. - • workspace rename focus mismatch - • Don’t overwrite border width when already set (placeholders). - • fix a segfault during config file validation - • Restore placeholder windows after restarting. - • Don’t focus placeholder windows. - - ┌────────────────────────────┐ - │ Thanks! │ - └────────────────────────────┘ - -Thanks for testing, bugfixes, discussions and everything I forgot go out to: - - Chih-Chyuan Hwang, Deiz, Diana Dinosaur, Ingo Bürk, Michael Hofmann, - Michael Tipton, Micha Rosenbaum, shdown, Tony Crisci - --- Michael Stapelberg, 2015-03-29 diff --git a/RELEASE-NOTES-4.10.2 b/RELEASE-NOTES-4.10.2 new file mode 100644 index 00000000..49c06e50 --- /dev/null +++ b/RELEASE-NOTES-4.10.2 @@ -0,0 +1,26 @@ + + ┌──────────────────────────────┐ + │ Release notes for i3 v4.10.2 │ + └──────────────────────────────┘ + +This is i3 v4.10.2. This version is considered stable. All users of i3 are +strongly encouraged to upgrade. + + ┌────────────────────────────┐ + │ Bugfixes │ + └────────────────────────────┘ + + • Cope with non-null-terminated x class properties. + • Get workspace name when renaming current workspace (fixes crash). + • Use a reasonable default sep_block_width if a separator_symbol is given. + • Remove windows from the save set when unmapping. + + ┌────────────────────────────┐ + │ Thanks! │ + └────────────────────────────┘ + +Thanks for testing, bugfixes, discussions and everything I forgot go out to: + + Ingo Bürk, Michael Hofmann, + +-- Michael Stapelberg, 2015-04-16 diff --git a/man/asciidoc.conf b/man/asciidoc.conf index 9a04b75c..9fbce991 100644 --- a/man/asciidoc.conf +++ b/man/asciidoc.conf @@ -7,7 +7,7 @@ template::[header-declarations] {mantitle} {manvolnum} i3 -4.10.1 +4.10.2 i3 Manual