From: Michael Stapelberg Date: Thu, 30 Jul 2015 20:27:15 +0000 (+0200) Subject: Merge branch 'master' into next X-Git-Tag: 4.11~66 X-Git-Url: https://git.sur5r.net/?p=i3%2Fi3;a=commitdiff_plain;h=2bde6f080ecd5d0e2dccb20a1936a5d40af7ff84;hp=a4ffb23d207ce4cf29fa3efe5e64e6ea2cc54a4c Merge branch 'master' into next --- 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/.travis.yml b/.travis.yml index 733daeac..e3e45656 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ before_install: - sudo cp /tmp/pin /etc/apt/preferences.d/trustypin - sudo apt-get update - sudo apt-get install -t trusty libc6 libc6-dev - - sudo apt-get install --no-install-recommends devscripts equivs + - sudo apt-get install --no-install-recommends devscripts equivs xdotool - sudo apt-get install -t utopic clang-format-3.5 - clang-format-3.5 --version install: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7a5e0c5f..39835c14 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,6 +9,11 @@ and https://github.com/i3/i3lock 1. Read http://i3wm.org/docs/debugging.html 2. Make sure you include a link to your logfile in your report (section 3). 3. Make sure you include the i3 version number in your report (section 1). +4. Please be aware that we cannot support compatibility issues with + closed-source software, as digging into compatibility problems without + having access to the source code is too time-consuming. Additionally, + experience has shown that often, the software in question is responsible for + the issue. Please raise an issue with the software in question, not i3. # Pull requests @@ -18,3 +23,10 @@ and https://github.com/i3/i3lock * Use the `next` branch for developing and sending your pull request. * Use `clang-format` to format your code. * Run the testsuite, see http://i3wm.org/docs/testsuite.html + +# Finding something to do + +* Find a [reproducible bug](https://github.com/i3/i3/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3Areproducible+label%3Abug+) from the issue tracker. These issues have been reviewed and confirmed by a project contributor. +* Find an [accepted enhancement](https://github.com/i3/i3/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3Aaccepted+label%3Aenhancement) from the issue tracker. These have been approved and are ok to start working on. + +There's a very good [overview of the codebase](http://i3wm.org/docs/hacking-howto.html) available to get you started. diff --git a/DEPENDS b/DEPENDS index d5dae142..0882f147 100644 --- a/DEPENDS +++ b/DEPENDS @@ -7,29 +7,30 @@ ┌──────────────┬────────┬────────┬────────────────────────────────────────┐ │ dependency │ min. │ lkgv │ URL │ ├──────────────┼────────┼────────┼────────────────────────────────────────┤ -│ pkg-config │ 0.25 │ 0.26 │ http://pkgconfig.freedesktop.org/ │ -│ libxcb │ 1.1.93 │ 1.10 │ http://xcb.freedesktop.org/dist/ │ +│ pkg-config │ 0.25 │ 0.28 │ http://pkgconfig.freedesktop.org/ │ +│ libxcb │ 1.1.93 │ 1.11 │ http://xcb.freedesktop.org/dist/ │ │ xcb-util │ 0.3.3 │ 0.4.1 │ http://xcb.freedesktop.org/dist/ │ -│ xkbcommon │ 0.4.0 │ 0.4.0 │ http://xkbcommon.org/ │ -│ xkbcommon-x11│ 0.4.0 │ 0.4.0 │ http://xkbcommon.org/ │ -│ util-cursor³ │ 0.0.99 │ 0.0.99 │ http://xcb.freedesktop.org/dist/ │ -│ libev │ 4.0 │ 4.11 │ http://libev.schmorp.de/ │ -│ yajl │ 2.0.1 │ 2.0.4 │ http://lloyd.github.com/yajl/ │ -│ asciidoc │ 8.3.0 │ 8.6.4 │ http://www.methods.co.nz/asciidoc/ │ +│ xkbcommon │ 0.4.0 │ 0.5.0 │ http://xkbcommon.org/ │ +│ xkbcommon-x11│ 0.4.0 │ 0.5.0 │ http://xkbcommon.org/ │ +│ util-cursor³⁴│ 0.0.99 │ 0.1.2 │ http://xcb.freedesktop.org/dist/ │ +│ util-wm⁴ │ 0.3.8 │ 0.3.8 │ http://xcb.freedesktop.org/dist/ │ +│ util-keysyms⁴│ 0.3.8 │ 0.4.0 │ http://xcb.freedesktop.org/dist/ │ +│ libev │ 4.0 │ 4.19 │ http://libev.schmorp.de/ │ +│ yajl │ 2.0.1 │ 2.1.0 │ http://lloyd.github.com/yajl/ │ +│ asciidoc │ 8.3.0 │ 8.6.8 │ http://www.methods.co.nz/asciidoc/ │ │ xmlto │ 0.0.23 │ 0.0.23 │ http://www.methods.co.nz/asciidoc/ │ │ Pod::Simple² │ 3.22 │ 3.22 │ http://search.cpan.org/~dwheeler/Pod-Simple-3.23/ │ docbook-xml │ 4.5 │ 4.5 │ http://www.methods.co.nz/asciidoc/ │ -│ Xlib │ 1.3.3 │ 1.4.3 │ http://ftp.x.org/pub/current/src/lib/ │ -│ PCRE │ 8.12 │ 8.12 │ http://www.pcre.org/ │ +│ PCRE │ 8.12 │ 8.35 │ http://www.pcre.org/ │ │ libsn¹ │ 0.10 │ 0.12 │ http://freedesktop.org/wiki/Software/startup-notification -│ pango │ 1.30.0 | 1.30.0 │ http://www.pango.org/ │ -│ cairo │ 1.12.2 │ 1.12.2 │ http://cairographics.org/ │ +│ pango │ 1.30.0 | 1.36.8 │ http://www.pango.org/ │ +│ cairo │ 1.12.2 │ 1.14.0 │ http://cairographics.org/ │ └──────────────┴────────┴────────┴────────────────────────────────────────┘ ¹ libsn = libstartup-notification ² Pod::Simple is a Perl module required for converting the testsuite documentation to HTML. See http://michael.stapelberg.de/cpan/#Pod::Simple - ³ xcb-util-cursor, to be precise. Might be considered part of xcb-util, or not - :-). + ³ xcb-util-cursor, to be precise. + ⁴ Depending on your distribution, this might be considered part of xcb-util. i3bar, i3-msg, i3-input, i3-nagbar and i3-config-wizard do not introduce any new dependencies. 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/common.mk b/common.mk index b9e15a28..c568fb60 100644 --- a/common.mk +++ b/common.mk @@ -1,11 +1,14 @@ UNAME=$(shell uname) DEBUG=1 -COVERAGE=0 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 @@ -60,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 @@ -74,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) @@ -125,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 cc0e5328..023eeac1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,20 @@ -i3-wm (4.10.1-1) experimental; urgency=medium +i3-wm (4.10.3-1) experimental; urgency=medium * NOT YET RELEASED. - -- Michael Stapelberg Sun, 29 Mar 2015 18:08:13 +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 + + * New upstream release. + + -- Michael Stapelberg Sun, 29 Mar 2015 18:54:07 +0200 i3-wm (4.10-1) experimental; urgency=medium diff --git a/debian/i3-wm.docs b/debian/i3-wm.docs index 11a695ba..437175b3 100644 --- a/debian/i3-wm.docs +++ b/debian/i3-wm.docs @@ -8,7 +8,6 @@ docs/snapping.png docs/two_columns.png docs/two_terminals.png docs/modes.png -docs/stacklimit.png docs/ipc.html docs/multi-monitor.html docs/wsbar.html diff --git a/docs/asciidoc-git.conf b/docs/asciidoc-git.conf index 3d42bca8..36bdb6f5 100644 --- a/docs/asciidoc-git.conf +++ b/docs/asciidoc-git.conf @@ -647,7 +647,7 @@ endif::doctype-manpage[] {disable-javascript%

} diff --git a/docs/debugging b/docs/debugging index 1253b0c5..cf61813d 100644 --- a/docs/debugging +++ b/docs/debugging @@ -10,10 +10,10 @@ Thank you for being interested in debugging i3. It really means something to us to get your bug fixed. If you have any questions about the process and/or need further help, do not hesitate to contact us! -== Verify you are using i3 ≥ 4.7 +== Verify you are using i3 ≥ 4.10 -Only the latest major version of i3 is supported, i.e. version 4.7 currently. -To verify which version you are running, use: +Only the latest major version of i3 is supported. To verify which version +you are running, use: --------------- $ i3 --moreversion 2>&- || i3 --version @@ -67,8 +67,37 @@ fly: i3-msg 'debuglog on; shmlog on; reload' --------------------------------------- +== Reproducing the problem + +Before submitting an issue, please make sure to close down on the problem as +much as you can yourself. Here are some steps you should consider: + +* Find a deterministic, reliable way to reproduce the problem and provide it + with your bug report. +* Try using the default i3 config to reproduce the problem. If the issue does + not appear with the default config, gradually adapt it to track down what + change(s) to the config introduce the problem. +* Reproduce the problem with a minimal setup, i.e., only use as few applications, + windows and steps as necessary. +* In addition, try to stick to applications that are common and, even more + importantly, free / open source. +* Before obtaining the log file, restart i3 in-place, execute the steps to + reproduce the problem and then save the logs. This keeps the log file as + small as possible and necessary. + +Please be aware that we cannot support compatibility issues with closed-source +software, as digging into compatibility problems without having access to the +source code is too time-consuming. Additionally, experience has shown that +often, the software in question is responsible for the issue. Please raise an +issue with the software in question, not i3. + == Obtaining the debug logfile +Please note that log files may contain sensitive data such as window titles. +The best way to avoid submitting such information is to only run the necessary +applications to reproduce the behavior when saving the log file. This will also +make analyzing the log file easier. + No matter whether i3 misbehaved in some way without crashing or whether it just crashed, the logfile provides all information necessary to debug the problem. @@ -121,3 +150,19 @@ When debugging with us in IRC, be prepared to use a so called nopaste service such as http://nopaste.info or http://pastebin.com because pasting large amounts of text in IRC sometimes leads to incomplete lines (servers have line length limitations) or flood kicks. + +== Debugging i3bar + +To debug i3bar problems, add +verbose yes+ to all +bar {}+ blocks in your i3 config +and then restart all i3bar instances like this: + +--------------------------------------------------------------------- +$ killall i3bar +$ for c in $(i3-msg -t get_bar_config | python -c \ + 'import json,sys;print("\n".join(json.load(sys.stdin)))'); do \ + (i3bar --bar_id=$c >i3bar.$c.log 2>&1) & \ + done; +--------------------------------------------------------------------- + +There will now be +i3bar.*.log+ files in your current directory that you can provide +in your bug report. diff --git a/docs/hacking-howto b/docs/hacking-howto index 12d6b14e..e6313f7d 100644 --- a/docs/hacking-howto +++ b/docs/hacking-howto @@ -404,10 +404,14 @@ can reconfigure themselves). == _NET_WM_STATE -Only the _NET_WM_STATE_FULLSCREEN atom is handled. It calls -``toggle_fullscreen()'' for the specific client which just configures the -client to use the whole screen on which it currently is. Also, it is set as -fullscreen_client for the i3Screen. +Only the _NET_WM_STATE_FULLSCREEN and _NET_WM_STATE_DEMANDS_ATTENTION atoms +are handled. + +The former calls ``toggle_fullscreen()'' for the specific client which just +configures the client to use the whole screen on which it currently is. +Also, it is set as fullscreen_client for the i3Screen. + +The latter is used to set, read and display urgency hints. == WM_NAME @@ -629,8 +633,8 @@ unmapped if it should not be visible anymore. +WM_STATE+ will be set to +x_draw_decoration+ draws window decorations. It is run for every leaf container (representing an actual X11 window) and for every non-leaf container which is in a stacked/tabbed container (because stacked/tabbed containers -display a window decoration for split containers, which at the moment just says -"another container"). +display a window decoration for split containers, which consists of a representation +of the child container's names. Then, parameters are collected to be able to determine whether this decoration drawing is actually necessary or was already done. This saves a substantial @@ -686,9 +690,9 @@ all commands. In earlier versions of i3, interpreting these commands was done using lex and yacc, but experience has shown that lex and yacc are not well suited for our command language. Therefore, starting from version 4.2, we use a custom parser -for user commands (not yet for the configuration file). +for user commands and the configuration file. The input specification for this parser can be found in the file -+parser-specs/commands.spec+. Should you happen to use Vim as an editor, use ++parser-specs/*.spec+. Should you happen to use Vim as an editor, use :source parser-specs/highlighting.vim to get syntax highlighting for this file (highlighting files for other editors are welcome). @@ -729,11 +733,14 @@ features. This is its definition: # workspace next|prev|next_on_output|prev_on_output # workspace back_and_forth # workspace +# workspace number state WORKSPACE: direction = 'next_on_output', 'prev_on_output', 'next', 'prev' -> call cmd_workspace($direction) 'back_and_forth' -> call cmd_workspace_back_and_forth() + 'number' + -> WORKSPACE_NUMBER workspace = string -> call cmd_workspace_name($workspace) ---------------------------------------------------------------- @@ -772,6 +779,10 @@ workspace :: single quotes), but just called string. Other possible tokens are word (the same as string, but stops matching at a whitespace) and end (matches the end of the input). +workspace number :: + The workspace command has to be followed by the keyword +number+. It + then transitions into the state +WORKSPACE_NUMBER+, where the actual + parameter will be read. === Introducing a new command @@ -952,18 +963,21 @@ http://web.archive.org/web/20121024222556/http://www.spheredev.org/wiki/Git_for_ or, for more documentation, see http://git-scm.com/documentation Please talk to us before working on new features to see whether they will be -accepted. There are a few things which we don’t want to see in i3, e.g. a -command which will focus windows in an alt+tab like way. +accepted. A good way for this is to open an issue and asking for opinions on it. +Even for accepted features, this can be a good way to refine an idea upfront. However, +we don't want to see certain features in i3, e.g., switching window focus in an +Alt+Tab like way. When working on bugfixes, please make sure you mention that you are working on -it in the corresponding bugreport at https://github.com/i3/i3/issues In case -there is no bugreport yet, please create one. +it in the corresponding bug report at https://github.com/i3/i3/issues. In case +there is no bug report yet, please create one. -After you are done, please submit your work for review at https://github.com/i3/i3 +After you are done, please submit your work for review as a pull request at +https://github.com/i3/i3. Do not send emails to the mailing list or any author directly, and don’t submit them in the bugtracker, since all reviews should be done in public at -http://cr.i3wm.org/. In order to make your review go as fast as possible, you +https://github.com/i3/i3. In order to make your review go as fast as possible, you could have a look at previous reviews and see what the common mistakes are. === Which branch to use? diff --git a/docs/ipc b/docs/ipc index ff7c8aae..4462e772 100644 --- a/docs/ipc +++ b/docs/ipc @@ -520,21 +520,23 @@ statusline:: Text color to be used for the statusline. separator:: Text color to be used for the separator. -focused_workspace_text/focused_workspace_bg:: - Text color/background color for a workspace button when the workspace +focused_workspace_text/focused_workspace_bg/focused_workspace_border:: + Text/background/border color for a workspace button when the workspace has focus. -active_workspace_text/active_workspace_bg:: - Text color/background color for a workspace button when the workspace +active_workspace_text/active_workspace_bg/active_workspace_border:: + Text/background/border color for a workspace button when the workspace is active (visible) on some output, but the focus is on another one. You can only tell this apart from the focused workspace when you are using multiple monitors. -inactive_workspace_text/inactive_workspace_bg:: - Text color/background color for a workspace button when the workspace +inactive_workspace_text/inactive_workspace_bg/inactive_workspace_border:: + Text/background/border color for a workspace button when the workspace does not have focus and is not active (visible) on any output. This will be the case for most workspaces. -urgent_workspace_text/urgent_workspace_bar:: - Text color/background color for workspaces which contain at least one +urgent_workspace_text/urgent_workspace_bg/urgent_workspace_border:: + Text/background/border color for workspaces which contain at least one window with the urgency hint set. +binding_mode_text/binding_mode_bg/binding_mode_border:: + Text/background/border color for the binding mode indicator. *Example of configured bars:* @@ -580,11 +582,14 @@ human_readable (string):: build date and branch name. When you need to display the i3 version to your users, use the human-readable version whenever possible (since this is what +i3 --version+ displays, too). +loaded_config_file_name (string):: + The current config path. *Example:* ------------------- { "human_readable" : "4.2-169-gf80b877 (2012-08-05, branch \"next\")", + "loaded_config_file_name" : "/home/hwangcc23/.i3/config", "minor" : 2, "patch" : 0, "major" : 4 @@ -822,4 +827,7 @@ Python:: * https://github.com/whitelynx/i3ipc (not maintained) * https://github.com/ziberna/i3-py (not maintained) Ruby:: - * http://github.com/badboy/i3-ipc + * https://github.com/veelenga/i3ipc-ruby + * https://github.com/badboy/i3-ipc (not maintained) +Rust:: + * https://github.com/tmerr/i3ipc-rs diff --git a/docs/stacklimit.png b/docs/stacklimit.png deleted file mode 100644 index ab5bed7a..00000000 Binary files a/docs/stacklimit.png and /dev/null differ diff --git a/docs/testsuite b/docs/testsuite index 29a35218..8fdb9635 100644 --- a/docs/testsuite +++ b/docs/testsuite @@ -160,6 +160,27 @@ $ ./complete-run.pl --parallel=1 --keep-xserver-output This will show the output of Xephyr, which is the X server implementation we use for testing. +==== Coverage testing + +Coverage testing is possible with +lcov+, the front-end for GCC's coverage +testing tool +gcov+. The testcases can generate a nice html report that tells +you which functions and lines were covered during a run of the tests. You can +use this tool to judge how effective your tests are. + +To use test coverage tools, first compile with coverage enabled. + +--------------------------------------------------- +COVERAGE=1 make +--------------------------------------------------- + +Then run the tests with the +--coverage-testing+ flag. + +--------------------------------------------------- +./complete-run.pl --coverage-testing +--------------------------------------------------- + +Then open +latest/i3-coverage/index.html+ in your web browser. + ==== IPC interface The testsuite makes extensive use of the IPC (Inter-Process Communication) diff --git a/docs/userguide b/docs/userguide index 820f5395..e2155381 100644 --- a/docs/userguide +++ b/docs/userguide @@ -256,8 +256,9 @@ workspace node’s orientation will be changed to +vertical+. The terminal windo you moved down is directly attached to the workspace and appears on the bottom of the screen. A new (horizontal) container was created to accommodate the other two terminal windows. You will notice this when switching to tabbed mode -(for example). You would end up having one tab called "another container" and -the other one being the terminal window you moved down. +(for example). You would end up having one tab with a representation of the split +container (e.g., "H[urxvt firefox]") and the other one being the terminal window +you moved down. [[configuring]] == Configuring i3 @@ -319,7 +320,7 @@ and fall back to a working font. *Syntax*: ------------------------------ font -font pango:[family list] [style options] [size] +font pango: [