From: Michael Stapelberg Date: Sun, 19 Apr 2015 16:28:08 +0000 (-0700) Subject: Merge pull request #1632 from Deiz/binding-border X-Git-Tag: 4.11~130 X-Git-Url: https://git.sur5r.net/?p=i3%2Fi3;a=commitdiff_plain;h=8a608ee63a2c7d791211e86c98a3f7c13f905d79;hp=547157d19bc73763f5d676dde23b1474a7254599 Merge pull request #1632 from Deiz/binding-border Add a --border flag to enable mouse binds to trigger on border click --- diff --git a/.gitignore b/.gitignore index 1d4c1678..617421ac 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ docs/*.html i3-command-parser.stamp i3-config-parser.stamp .clang_complete +LAST_VERSION diff --git a/Makefile b/Makefile index 1fed4df1..fd302101 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,12 @@ include i3-dump-log/i3-dump-log.mk include docs/docs.mk include man/man.mk +# Update $(TOPDIR)/LAST_VERSION if it differs from $I3_VERSION +CACHED_VERSION := '$(shell [ -f $(TOPDIR)/LAST_VERSION ] && cat $(TOPDIR)/LAST_VERSION)' +ifneq ($(CACHED_VERSION),$(I3_VERSION)) +$(shell echo -n ${I3_VERSION} > $(TOPDIR)/LAST_VERSION) +endif + real-all: $(ALL_TARGETS) install: $(INSTALL_TARGETS) 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/common.mk b/common.mk index dcc90c96..c568fb60 100644 --- a/common.mk +++ b/common.mk @@ -2,9 +2,13 @@ UNAME=$(shell uname) DEBUG=1 INSTALL=install LN=ln +PKG_CONFIG=pkg-config ifndef PREFIX PREFIX=/usr endif +ifndef EXEC_PREFIX + EXEC_PREFIX=$(PREFIX) +endif ifndef SYSCONFDIR ifeq ($(PREFIX),/usr) SYSCONFDIR=/etc @@ -59,7 +63,7 @@ I3_CPPFLAGS += -DI3__FILE__=__FILE__ ## Libraries flags -ifeq ($(shell which pkg-config 2>/dev/null 1>/dev/null || echo 1),1) +ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null 1>/dev/null || echo 1),1) $(error "pkg-config was not found") endif @@ -73,15 +77,15 @@ endif # # We redirect stderr to /dev/null because pkg-config prints an error if support # for gnome-config was enabled but gnome-config is not actually installed. -cflags_for_lib = $(shell pkg-config --silence-errors --cflags $(1) 2>/dev/null) -ldflags_for_lib = $(shell pkg-config --exists 2>/dev/null $(1) && pkg-config --libs $(1) 2>/dev/null || echo -l$(2)) +cflags_for_lib = $(shell $(PKG_CONFIG) --silence-errors --cflags $(1) 2>/dev/null) +ldflags_for_lib = $(shell $(PKG_CONFIG) --exists 2>/dev/null $(1) && $(PKG_CONFIG) --libs $(1) 2>/dev/null || echo -l$(2)) # XCB common stuff XCB_CFLAGS := $(call cflags_for_lib, xcb) XCB_CFLAGS += $(call cflags_for_lib, xcb-event) XCB_LIBS := $(call ldflags_for_lib, xcb,xcb) XCB_LIBS += $(call ldflags_for_lib, xcb-event,xcb-event) -ifeq ($(shell pkg-config --exists xcb-util 2>/dev/null || echo 1),1) +ifeq ($(shell $(PKG_CONFIG) --exists xcb-util 2>/dev/null || echo 1),1) XCB_CFLAGS += $(call cflags_for_lib, xcb-atom) XCB_CFLAGS += $(call cflags_for_lib, xcb-aux) XCB_LIBS += $(call ldflags_for_lib, xcb-atom,xcb-atom) @@ -124,7 +128,7 @@ LIBEV_LIBS := $(call ldflags_for_lib, libev,ev) # libpcre PCRE_CFLAGS := $(call cflags_for_lib, libpcre) -ifeq ($(shell pkg-config --atleast-version=8.10 libpcre 2>/dev/null && echo 1),1) +ifeq ($(shell $(PKG_CONFIG) --atleast-version=8.10 libpcre 2>/dev/null && echo 1),1) I3_CPPFLAGS += -DPCRE_HAS_UCP=1 endif PCRE_LIBS := $(call ldflags_for_lib, libpcre,pcre) diff --git a/debian/changelog b/debian/changelog index 183e5940..023eeac1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,14 @@ -i3-wm (4.10.2-1) experimental; urgency=medium +i3-wm (4.10.3-1) experimental; urgency=medium * NOT YET RELEASED. - -- Michael Stapelberg Sun, 29 Mar 2015 19:10:38 +0200 + -- Michael Stapelberg Thu, 16 Apr 2015 09:08:30 +0200 + +i3-wm (4.10.2-1) experimental; urgency=medium + + * New upstream release. + + -- Michael Stapelberg Thu, 16 Apr 2015 09:02:53 +0200 i3-wm (4.10.1-1) experimental; urgency=medium diff --git a/docs/userguide b/docs/userguide index 13ff3fe5..96b36902 100644 --- a/docs/userguide +++ b/docs/userguide @@ -1322,8 +1322,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/i3-config-wizard/i3-config-wizard.mk b/i3-config-wizard/i3-config-wizard.mk index 1dab6452..900893f5 100644 --- a/i3-config-wizard/i3-config-wizard.mk +++ b/i3-config-wizard/i3-config-wizard.mk @@ -20,8 +20,8 @@ i3-config-wizard/i3-config-wizard: libi3.a $(i3_config_wizard_OBJECTS) install-i3-config-wizard: i3-config-wizard/i3-config-wizard echo "[i3-config-wizard] Install" - $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin - $(INSTALL) -m 0755 i3-config-wizard/i3-config-wizard $(DESTDIR)$(PREFIX)/bin/ + $(INSTALL) -d -m 0755 $(DESTDIR)$(EXEC_PREFIX)/bin + $(INSTALL) -m 0755 i3-config-wizard/i3-config-wizard $(DESTDIR)$(EXEC_PREFIX)/bin/ clean-i3-config-wizard: echo "[i3-config-wizard] Clean" diff --git a/i3-dump-log/i3-dump-log.mk b/i3-dump-log/i3-dump-log.mk index bbce356f..7e5d4499 100644 --- a/i3-dump-log/i3-dump-log.mk +++ b/i3-dump-log/i3-dump-log.mk @@ -20,8 +20,8 @@ i3-dump-log/i3-dump-log: libi3.a $(i3_dump_log_OBJECTS) install-i3-dump-log: i3-dump-log/i3-dump-log echo "[i3-dump-log] Install" - $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin - $(INSTALL) -m 0755 i3-dump-log/i3-dump-log $(DESTDIR)$(PREFIX)/bin/ + $(INSTALL) -d -m 0755 $(DESTDIR)$(EXEC_PREFIX)/bin + $(INSTALL) -m 0755 i3-dump-log/i3-dump-log $(DESTDIR)$(EXEC_PREFIX)/bin/ clean-i3-dump-log: echo "[i3-dump-log] Clean" diff --git a/i3-input/i3-input.mk b/i3-input/i3-input.mk index 03f4e0a6..be3e2833 100644 --- a/i3-input/i3-input.mk +++ b/i3-input/i3-input.mk @@ -20,8 +20,8 @@ i3-input/i3-input: libi3.a $(i3_input_OBJECTS) install-i3-input: i3-input/i3-input echo "[i3-input] Install" - $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin - $(INSTALL) -m 0755 i3-input/i3-input $(DESTDIR)$(PREFIX)/bin/ + $(INSTALL) -d -m 0755 $(DESTDIR)$(EXEC_PREFIX)/bin + $(INSTALL) -m 0755 i3-input/i3-input $(DESTDIR)$(EXEC_PREFIX)/bin/ clean-i3-input: echo "[i3-input] Clean" diff --git a/i3-msg/i3-msg.mk b/i3-msg/i3-msg.mk index fda56dad..277c43e7 100644 --- a/i3-msg/i3-msg.mk +++ b/i3-msg/i3-msg.mk @@ -20,8 +20,8 @@ i3-msg/i3-msg: libi3.a $(i3_msg_OBJECTS) install-i3-msg: i3-msg/i3-msg echo "[i3-msg] Install" - $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin - $(INSTALL) -m 0755 i3-msg/i3-msg $(DESTDIR)$(PREFIX)/bin/ + $(INSTALL) -d -m 0755 $(DESTDIR)$(EXEC_PREFIX)/bin + $(INSTALL) -m 0755 i3-msg/i3-msg $(DESTDIR)$(EXEC_PREFIX)/bin/ clean-i3-msg: echo "[i3-msg] Clean" diff --git a/i3-nagbar/i3-nagbar.mk b/i3-nagbar/i3-nagbar.mk index e98d6582..aba3c09a 100644 --- a/i3-nagbar/i3-nagbar.mk +++ b/i3-nagbar/i3-nagbar.mk @@ -20,8 +20,8 @@ i3-nagbar/i3-nagbar: libi3.a $(i3_nagbar_OBJECTS) install-i3-nagbar: i3-nagbar/i3-nagbar echo "[i3-nagbar] Install" - $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin - $(INSTALL) -m 0755 i3-nagbar/i3-nagbar $(DESTDIR)$(PREFIX)/bin/ + $(INSTALL) -d -m 0755 $(DESTDIR)$(EXEC_PREFIX)/bin + $(INSTALL) -m 0755 i3-nagbar/i3-nagbar $(DESTDIR)$(EXEC_PREFIX)/bin/ clean-i3-nagbar: echo "[i3-nagbar] Clean" diff --git a/i3bar/i3bar.mk b/i3bar/i3bar.mk index 53227a8e..737b0b69 100644 --- a/i3bar/i3bar.mk +++ b/i3bar/i3bar.mk @@ -20,8 +20,8 @@ i3bar/i3bar: libi3.a $(i3bar_OBJECTS) install-i3bar: i3bar/i3bar echo "[i3bar] Install" - $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin - $(INSTALL) -m 0755 i3bar/i3bar $(DESTDIR)$(PREFIX)/bin/ + $(INSTALL) -d -m 0755 $(DESTDIR)$(EXEC_PREFIX)/bin + $(INSTALL) -m 0755 i3bar/i3bar $(DESTDIR)$(EXEC_PREFIX)/bin/ clean-i3bar: echo "[i3bar] Clean" 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; diff --git a/include/i3.h b/include/i3.h index 5ca87541..70ebc000 100644 --- a/include/i3.h +++ b/include/i3.h @@ -24,6 +24,9 @@ #include "data.h" #include "xcb.h" +/** Git commit identifier, from version.c */ +extern const char *i3_version; + /** The original value of RLIMIT_CORE when i3 was started. We need to restore * this before starting any other process, since we set RLIMIT_CORE to * RLIM_INFINITY for i3 debugging versions. */ 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 diff --git a/release.sh b/release.sh index 631ff425..16227111 100755 --- a/release.sh +++ b/release.sh @@ -1,9 +1,9 @@ #!/bin/zsh # This script is used to prepare a new release of i3. -export RELEASE_VERSION="4.10.1" -export PREVIOUS_VERSION="4.10" -export RELEASE_BRANCH="next" +export RELEASE_VERSION="4.10.2" +export PREVIOUS_VERSION="4.10.1" +export RELEASE_BRANCH="master" if [ ! -e "../i3.github.io" ] then @@ -135,6 +135,10 @@ debsign -k4AC8EE1D ${TMPDIR}/debian/*.changes # Section 3: website ################################################################################ +# Ensure we are in the correct branch for copying the docs. +cd ${TMPDIR}/i3 +git checkout ${RELEASE_BRANCH} + cd ${TMPDIR} git clone --quiet ${STARTDIR}/../i3.github.io cd i3.github.io @@ -172,6 +176,7 @@ git commit -a -m "update docs for ${RELEASE_VERSION}" git remote remove origin git remote add origin git@github.com:i3/i3.github.io.git +git config --add remote.origin.push "+refs/heads/master:refs/heads/master" ################################################################################ # Section 4: prepare release announcement email @@ -182,12 +187,14 @@ cat >email.txt < To: i3-announce@i3.zekjur.net Subject: i3 v${RELEASE_VERSION} released +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: 8bit Hi, I just released i3 v${RELEASE_VERSION}. Release notes follow: EOT -cat ${TMPDIR}/i3/RELEASE-NOTES-${RELEASE_VERSION}.txt >>email.txt +cat ${TMPDIR}/i3/RELEASE-NOTES-${RELEASE_VERSION} >>email.txt ################################################################################ # Section 5: final push instructions @@ -199,6 +206,7 @@ echo "When satisfied, run:" echo " cd ${TMPDIR}/i3" echo " git checkout next" echo " vi debian/changelog" +echo " git commit -a -m \"debian: update changelog\"" echo " git push" echo "" echo " cd ${TMPDIR}/i3.github.io" @@ -208,7 +216,7 @@ echo " cd ${TMPDIR}/debian" echo " dput *.changes" echo "" echo " cd ${TMPDIR}" -echo " sendmail < email.txt" +echo " sendmail -t < email.txt" echo "" echo "Announce on:" echo " twitter" diff --git a/src/con.c b/src/con.c index 41dd0196..dab8d29d 100644 --- a/src/con.c +++ b/src/con.c @@ -1355,11 +1355,7 @@ void con_set_layout(Con *con, layout_t layout) { * with an orientation). Since we switched to splith/splitv layouts, * using the "default" layout (which "only" should happen when using * legacy configs) is using the last split layout (either splith or - * splitv) in order to still do the same thing. - * - * Starting from v4.6 though, we will nag users about using "layout - * default", and in v4.9 we will remove it entirely (with an - * appropriate i3-migrate-config mechanism). */ + * splitv) in order to still do the same thing. */ con->layout = con->last_split_layout; /* In case last_split_layout was not initialized… */ if (con->layout == L_DEFAULT) diff --git a/src/config_parser.c b/src/config_parser.c index eef03cae..f3254812 100644 --- a/src/config_parser.c +++ b/src/config_parser.c @@ -996,7 +996,7 @@ bool parse_file(const char *f, bool use_nagbar) { check_for_duplicate_bindings(context); if (use_nagbar && (context->has_errors || context->has_warnings)) { - ELOG("FYI: You are using i3 version " I3_VERSION "\n"); + ELOG("FYI: You are using i3 version %s\n", i3_version); if (version == 3) ELOG("Please convert your configfile first, then fix any remaining errors (see above).\n"); diff --git a/src/i3.mk b/src/i3.mk index 8c763464..76c1da89 100644 --- a/src/i3.mk +++ b/src/i3.mk @@ -32,6 +32,10 @@ include/all.h.pch: $(i3_HEADERS) echo "[i3] PCH all.h" $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -x c-header include/all.h -o include/all.h.pch +src/version.o: src/version.c LAST_VERSION $(i3_HEADERS_DEP) + echo "[i3] CC $<" + $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) $(PCH_FLAGS) -c -o $@ ${canonical_path}/$< + src/%.o: src/%.c $(i3_HEADERS_DEP) echo "[i3] CC $<" $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) $(PCH_FLAGS) -c -o $@ ${canonical_path}/$< @@ -70,26 +74,26 @@ i3: libi3.a $(i3_OBJECTS) install-i3: i3 echo "[i3] Install" - $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin + $(INSTALL) -d -m 0755 $(DESTDIR)$(EXEC_PREFIX)/bin $(INSTALL) -d -m 0755 $(DESTDIR)$(SYSCONFDIR)/i3 - $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/include/i3 + $(INSTALL) -d -m 0755 $(DESTDIR)$(EXEC_PREFIX)/include/i3 $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/share/xsessions $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/share/applications - $(INSTALL) -m 0755 i3 $(DESTDIR)$(PREFIX)/bin/ - $(LN) -sf i3 $(DESTDIR)$(PREFIX)/bin/i3-with-shmlog - $(INSTALL) -m 0755 i3-migrate-config-to-v4 $(DESTDIR)$(PREFIX)/bin/ - $(INSTALL) -m 0755 i3-sensible-editor $(DESTDIR)$(PREFIX)/bin/ - $(INSTALL) -m 0755 i3-sensible-pager $(DESTDIR)$(PREFIX)/bin/ - $(INSTALL) -m 0755 i3-sensible-terminal $(DESTDIR)$(PREFIX)/bin/ - $(INSTALL) -m 0755 i3-save-tree $(DESTDIR)$(PREFIX)/bin/ - $(INSTALL) -m 0755 i3-dmenu-desktop $(DESTDIR)$(PREFIX)/bin/ + $(INSTALL) -m 0755 i3 $(DESTDIR)$(EXEC_PREFIX)/bin/ + $(LN) -sf i3 $(DESTDIR)$(EXEC_PREFIX)/bin/i3-with-shmlog + $(INSTALL) -m 0755 i3-migrate-config-to-v4 $(DESTDIR)$(EXEC_PREFIX)/bin/ + $(INSTALL) -m 0755 i3-sensible-editor $(DESTDIR)$(EXEC_PREFIX)/bin/ + $(INSTALL) -m 0755 i3-sensible-pager $(DESTDIR)$(EXEC_PREFIX)/bin/ + $(INSTALL) -m 0755 i3-sensible-terminal $(DESTDIR)$(EXEC_PREFIX)/bin/ + $(INSTALL) -m 0755 i3-save-tree $(DESTDIR)$(EXEC_PREFIX)/bin/ + $(INSTALL) -m 0755 i3-dmenu-desktop $(DESTDIR)$(EXEC_PREFIX)/bin/ test -e $(DESTDIR)$(SYSCONFDIR)/i3/config || $(INSTALL) -m 0644 i3.config $(DESTDIR)$(SYSCONFDIR)/i3/config test -e $(DESTDIR)$(SYSCONFDIR)/i3/config.keycodes || $(INSTALL) -m 0644 i3.config.keycodes $(DESTDIR)$(SYSCONFDIR)/i3/config.keycodes $(INSTALL) -m 0644 i3.xsession.desktop $(DESTDIR)$(PREFIX)/share/xsessions/i3.desktop $(INSTALL) -m 0644 i3-with-shmlog.xsession.desktop $(DESTDIR)$(PREFIX)/share/xsessions/i3-with-shmlog.desktop $(INSTALL) -m 0644 i3.applications.desktop $(DESTDIR)$(PREFIX)/share/applications/i3.desktop - $(INSTALL) -m 0644 include/i3/ipc.h $(DESTDIR)$(PREFIX)/include/i3/ + $(INSTALL) -m 0644 include/i3/ipc.h $(DESTDIR)$(EXEC_PREFIX)/include/i3/ clean-i3: echo "[i3] Clean" - rm -f $(i3_OBJECTS) $(i3_SOURCES_GENERATED) $(i3_HEADERS_CMDPARSER) include/loglevels.h loglevels.tmp include/all.h.pch i3-command-parser.stamp i3-config-parser.stamp i3 test.config_parser test.commands_parser src/*.gcno src/cfgparse.* src/cmdparse.* + rm -f $(i3_OBJECTS) $(i3_SOURCES_GENERATED) $(i3_HEADERS_CMDPARSER) include/loglevels.h loglevels.tmp include/all.h.pch i3-command-parser.stamp i3-config-parser.stamp i3 test.config_parser test.commands_parser src/*.gcno src/cfgparse.* src/cmdparse.* LAST_VERSION diff --git a/src/ipc.c b/src/ipc.c index 8fed75f1..f8138f0a 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -791,7 +791,7 @@ IPC_HANDLER(get_version) { y(integer, PATCH_VERSION); ystr("human_readable"); - ystr(I3_VERSION); + ystr(i3_version); y(map_close); diff --git a/src/main.c b/src/main.c index 8b514178..ac40e7a3 100644 --- a/src/main.c +++ b/src/main.c @@ -188,7 +188,7 @@ static void handle_signal(int sig, siginfo_t *info, void *data) { int main(int argc, char *argv[]) { /* Keep a symbol pointing to the I3_VERSION string constant so that we have * it in gdb backtraces. */ - const char *i3_version __attribute__((unused)) = I3_VERSION; + const char *_i3_version __attribute__((unused)) = i3_version; char *override_configpath = NULL; bool autostart = true; char *layout_path = NULL; @@ -261,11 +261,11 @@ int main(int argc, char *argv[]) { only_check_config = true; break; case 'v': - printf("i3 version " I3_VERSION " © 2009-2014 Michael Stapelberg and contributors\n"); + printf("i3 version %s © 2009-2014 Michael Stapelberg and contributors\n", i3_version); exit(EXIT_SUCCESS); break; case 'm': - printf("Binary i3 version: " I3_VERSION " © 2009-2014 Michael Stapelberg and contributors\n"); + printf("Binary i3 version: %s © 2009-2014 Michael Stapelberg and contributors\n", i3_version); display_running_version(); exit(EXIT_SUCCESS); break; @@ -456,7 +456,7 @@ int main(int argc, char *argv[]) { free(cwd); } - LOG("i3 " I3_VERSION " starting\n"); + LOG("i3 %s starting\n", i3_version); conn = xcb_connect(NULL, &conn_screen); if (xcb_connection_has_error(conn)) 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); diff --git a/src/version.c b/src/version.c new file mode 100644 index 00000000..d7d31b36 --- /dev/null +++ b/src/version.c @@ -0,0 +1,11 @@ +/* + * vim:ts=4:sw=4:expandtab + * + * i3 - an improved dynamic tiling window manager + * © 2009-2015 Michael Stapelberg and contributors (see also: LICENSE) + * + * Stores the latest Git commit identifier so that it can be linked into i3 + * and used dynamically without recompiling every object file. + * + */ +const char *i3_version = I3_VERSION; diff --git a/testcases/Makefile.PL b/testcases/Makefile.PL index f2c15013..3c2a26f9 100755 --- a/testcases/Makefile.PL +++ b/testcases/Makefile.PL @@ -8,8 +8,8 @@ WriteMakefile( MIN_PERL_VERSION => '5.010000', # 5.10.0 PREREQ_PM => { 'AnyEvent' => 0, - 'AnyEvent::I3' => '0.15', - 'X11::XCB' => '0.09', + 'AnyEvent::I3' => '0.16', + 'X11::XCB' => '0.12', 'Inline' => 0, 'Inline::C' => 0, 'ExtUtils::PkgConfig' => 0, diff --git a/testcases/complete-run.pl b/testcases/complete-run.pl index 8a3b89f0..911558e5 100755 --- a/testcases/complete-run.pl +++ b/testcases/complete-run.pl @@ -8,7 +8,6 @@ use v5.10; use utf8; # the following are modules which ship with Perl (>= 5.10): use Pod::Usage; -use Cwd qw(abs_path); use File::Temp qw(tempfile tempdir); use Getopt::Long; use POSIX (); @@ -17,8 +16,20 @@ use TAP::Parser; use TAP::Parser::Aggregator; use Time::HiRes qw(time); use IO::Handle; + +my $dirname; + +BEGIN { + use File::Basename; + use Cwd qw(abs_path); + + # fileparse()[1] contains the directory portion of the specified path. + # See File::Basename(3p) for more details. + $dirname = (fileparse(abs_path($0)))[1]; +} + # these are shipped with the testsuite -use lib qw(lib); +use lib $dirname . 'lib'; use StartXServer; use StatusLine; use TestWorker; @@ -70,6 +81,8 @@ my $result = GetOptions( pod2usage(-verbose => 2, -exitcode => 0) if $help; +chdir $dirname or die "Could not chdir into $dirname"; + # Check for missing executables my @binaries = qw( ../i3