]> git.sur5r.net Git - i3/i3/commitdiff
Merge pull request #1632 from Deiz/binding-border
authorMichael Stapelberg <stapelberg@users.noreply.github.com>
Sun, 19 Apr 2015 16:28:08 +0000 (09:28 -0700)
committerMichael Stapelberg <stapelberg@users.noreply.github.com>
Sun, 19 Apr 2015 16:28:08 +0000 (09:28 -0700)
Add a --border flag to enable mouse binds to trigger on border click

28 files changed:
.gitignore
Makefile
RELEASE-NOTES-4.10.1 [deleted file]
RELEASE-NOTES-4.10.2 [new file with mode: 0644]
common.mk
debian/changelog
docs/userguide
i3-config-wizard/i3-config-wizard.mk
i3-dump-log/i3-dump-log.mk
i3-input/i3-input.mk
i3-msg/i3-msg.mk
i3-nagbar/i3-nagbar.mk
i3bar/i3bar.mk
i3bar/include/xcb.h
i3bar/src/child.c
i3bar/src/xcb.c
include/i3.h
man/asciidoc.conf
release.sh
src/con.c
src/config_parser.c
src/i3.mk
src/ipc.c
src/main.c
src/tree.c
src/version.c [new file with mode: 0644]
testcases/Makefile.PL
testcases/complete-run.pl

index 1d4c1678aa4ed2abc89b7e5d856be089a3741022..617421ac1e92f3edc338c7b7c75d868e6696a608 100644 (file)
@@ -33,3 +33,4 @@ docs/*.html
 i3-command-parser.stamp
 i3-config-parser.stamp
 .clang_complete
+LAST_VERSION
index 1fed4df1ac59185a4540413db3c5b9e436f15344..fd3021017650d11c1daa6cfed7ee327a853b7dc8 100644 (file)
--- 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 (file)
index 61b4770..0000000
+++ /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 (file)
index 0000000..49c06e5
--- /dev/null
@@ -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
index dcc90c964f968c975c7a7bbf2e62352d895de524..c568fb60dba42d557e73ac33c167a46b7c6a2230 100644 (file)
--- 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)
index 183e59406b9d8d96a388158a725ef9ac956ef34e..023eeac10b6e000570cfc0c624f2ca04c1248cd9 100644 (file)
@@ -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 <stapelberg@debian.org>  Sun, 29 Mar 2015 19:10:38 +0200
+ -- Michael Stapelberg <stapelberg@debian.org>  Thu, 16 Apr 2015 09:08:30 +0200
+
+i3-wm (4.10.2-1) experimental; urgency=medium
+
+  * New upstream release.
+
+ -- Michael Stapelberg <stapelberg@debian.org>  Thu, 16 Apr 2015 09:02:53 +0200
 
 i3-wm (4.10.1-1) experimental; urgency=medium
 
index 13ff3fe562bff6c1fc3f3f1ae3e12307e6af9b33..96b369024d40a7c2eeb98554cf469aae98f4d614 100644 (file)
@@ -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*:
 -------------------------
index 1dab64526165e73c1642172c459ac4e33f9e8d3a..900893f5e85297824fc0ae1ee0621d9c826b7d5a 100644 (file)
@@ -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"
index bbce356fddd78eba858f993acb91c77d2724d6d0..7e5d4499fab7dc5d8f3dde55f401437b0d9f8f02 100644 (file)
@@ -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"
index 03f4e0a6e5f53fbe994e102a90b8769c7e902db4..be3e28331d263d02d820be553ae4e0d82508b491 100644 (file)
@@ -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"
index fda56dad003e524c797da9f9e9954319283deca3..277c43e7b788407013dccf69f408330e802cc1e4 100644 (file)
@@ -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"
index e98d65824c845ce3ddc3faf5d6e3617d6118fad3..aba3c09ab49223fce156f0a61cf5b83d307a5dc4 100644 (file)
@@ -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"
index 53227a8e10fbb29d0468389bc1bb1a65c2fefa99..737b0b6999db1aed5e9dbe75d95fe4515bad08bf 100644 (file)
@@ -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"
index 8e48c0c138e0734ea34ea77eae1ceddd689107c8..bb37e7d517921066922fca075ff6b591421c7834 100644 (file)
@@ -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'.
index 9cc50f2a25f7b5e3a3d9bb0981ecc4ea93ee8be3..41f8880dd2b736f6c0b4fa3af41723f2aae5145e 100644 (file)
@@ -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;
 }
index e53b92262df976bd99d3bdccdfded1e04915c98a..ba57b9fa397d11a8fabc238da2727ba09c4095ab 100644 (file)
@@ -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;
index 5ca875417bb163c386e5da8d462ffcc6d1a2c486..70ebc0006110dfd7d301a3cecc1fbae373152679 100644 (file)
@@ -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. */
index 9a04b75c92180b07ba3920b54f22ab47b86c0b5b..9fbce99157e3087c7aa87b3e08c25959b27b1846 100644 (file)
@@ -7,7 +7,7 @@ template::[header-declarations]
 <refentrytitle>{mantitle}</refentrytitle>
 <manvolnum>{manvolnum}</manvolnum>
 <refmiscinfo class="source">i3</refmiscinfo>
-<refmiscinfo class="version">4.10.1</refmiscinfo>
+<refmiscinfo class="version">4.10.2</refmiscinfo>
 <refmiscinfo class="manual">i3 Manual</refmiscinfo>
 </refmeta>
 <refnamediv>
index 631ff42561f7b527ee80ec659787263c9669ebc6..16227111c4973e86e37d9790d128a167f7d6c28c 100755 (executable)
@@ -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 <<EOT
 From: Michael Stapelberg <michael@i3wm.org>
 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"
index 41dd0196ba8931e9793a7ba7c103e99a2ec0cbf8..dab8d29d439a36e56c21587819e03de0dfaaba99 100644 (file)
--- 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)
index eef03cae238e0cf7455fd64ca1b18658e47d977f..f325481275b7f07d09e4dbf02ffbc3d8ade03a63 100644 (file)
@@ -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");
 
index 8c7634643ab7cc10292abda8869e24dfd435556d..76c1da899ce7610489a28eefe98446010eb3cd1c 100644 (file)
--- 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
index 8fed75f1b13dbf3993d7ac4c7dbbfa80bf4fbd58..f8138f0a995bb47685b61f024f2a8c9f6e80a7d2 100644 (file)
--- 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);
 
index 8b514178bbbf3283fc9391f11ef5c6f42643ba1a..ac40e7a389bc2eb41c303a2dd28637e4fea8007c 100644 (file)
@@ -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))
index b40ba2a2879203b503d7640937184fae91f3ea13..753b02fcd35734073f7afa4e241045323bae054f 100644 (file)
@@ -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 (file)
index 0000000..d7d31b3
--- /dev/null
@@ -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;
index f2c15013f5246b7e9346819d60365818d4fd68dd..3c2a26f97255c09161e13c03f48ee4658aaa8b0e 100755 (executable)
@@ -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,
index 8a3b89f0ffe447f75be832c1270a9ba3d9cca830..911558e51c658721ae138e37503c558f9b4dfc66 100755 (executable)
@@ -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