]> git.sur5r.net Git - i3/i3/log
i3/i3
7 years agorelease i3 4.13 4.13
Michael Stapelberg [Tue, 8 Nov 2016 18:54:01 +0000 (19:54 +0100)]
release i3 4.13

7 years agodebian: prefix paths debian/tmp/ to avoid confusion
Michael Stapelberg [Tue, 8 Nov 2016 18:53:08 +0000 (19:53 +0100)]
debian: prefix paths debian/tmp/ to avoid confusion

Without the prefix, the etc/ directory will be copied from the source
directory, as opposed to the debian/tmp directory into which files were
installed.

7 years agodebian: update standards-version to 3.9.8 (no changes necessary)
Michael Stapelberg [Tue, 8 Nov 2016 18:25:24 +0000 (19:25 +0100)]
debian: update standards-version to 3.9.8 (no changes necessary)

7 years agodebian: remove now-unnecessary lintian overrides
Michael Stapelberg [Tue, 8 Nov 2016 18:23:33 +0000 (19:23 +0100)]
debian: remove now-unnecessary lintian overrides

7 years agodebian: install docs to usr/share/doc/i3-wm
Michael Stapelberg [Tue, 8 Nov 2016 18:21:53 +0000 (19:21 +0100)]
debian: install docs to usr/share/doc/i3-wm

7 years agoFix an use-after-free bug (#2522)
Chih-Chyuan Hwang [Tue, 8 Nov 2016 08:56:46 +0000 (16:56 +0800)]
Fix an use-after-free bug (#2522)

Fix the issue #2421 (https://github.com/i3/i3/issues/2421).

floating_enable() invokes tree_close_internal() to free con->parent.
After con->parent is freed in tree_close_internal() but before con->parent is reassigned by the caller, con->parent may be dereferenced and causes i3 crash.

The backtrace below is an example.
The already-freed pointer is dereferenced again through the pointer "focused" in x_push_changes().

Reassign con->parent before calling tree_close_internal() to fix this use-after-free bug.

0x0000000000416372 in con_get_workspace (con=0x7ab9c0) at ../i3/src/con.c:375
0x0000000000416103 in con_has_managed_window (con=0x7ab9c0) at ../i3/src/con.c:266
0x000000000042b413 in x_push_changes (con=0x78d190) at ../i3/src/x.c:1132
0x0000000l0004533e8 in tree_render () at ../i3/src/tree.c:504
0x0000000000452b4f in tree_close_internal (con=0x7b67c0, kill_window=DONT_KILL_WINDOW, dont_kill_parent=false, force_set_focus=false)
../i3/src/tree.c:314
0x00000000004196f0 in con_on_remove_child (con=0x7b67c0) at ../i3/src/con.c:1801
0x0000000000452eb7 in tree_close_internal (con=0x783840, kill_window=DONT_KILL_WINDOW, dont_kill_parent=false, force_set_focus=false)
../i3/src/tree.c:364
0x0000000000431516 in floating_enable (con=0x7ab9c0, automatic=false) at ../i3/src/floating.c:183
0x0000000000431eed in toggle_floating_mode (con=0x7ab9c0, automatic=false) at ../i3/src/floating.c:379
0x0000000000420d92 in cmd_floating (current_match=0x679a20 , cmd_output=0x679aa0 , floating_mode=0x7ab8c0 "toggle")
../i3/src/commands.c:1088
0x000000000043e5ae in GENERATED_call (call_identifier=60, result=0x679aa0 ) at include/GENERATED_command_call.h:486
0x000000000043ee19 in next_state (token=0x675d70 ) at ../i3/src/commands_parser.c:187
0x000000000043f2fb in parse_command (input=0x7b4fe0 "floating toggle", gen=0x0) at ../i3/src/commands_parser.c:308
0x00000000004125f8 in run_binding (bind=0x784260, con=0x0) at ../i3/src/bindings.c:792
0x000000000042bace in handle_key_press (event=0x7a01a0) at ../i3/src/key_press.c:33
0x000000000044e6aa in handle_event (type=2, event=0x7a01a0) at ../i3/src/handlers.c:1420
0x0000000000439533 in xcb_check_cb (loop=0x7ffff532f8e0, w=0x68c140, revents=32768) at ../i3/src/main.c:133
0x00007ffff5125d73 in ev_invoke_pending () from /usr/lib/x86_64-linux-gnu/libev.so.4
0x00007ffff51293de in ev_run () from /usr/lib/x86_64-linux-gnu/libev.so.4
0x0000000000439418 in ev_loop (loop=0x7ffff532f8e0, flags=0) at /usr/include/ev.h:835
0x000000000043d51d in main (argc=3, argv=0x7fffffffe0a8) at ../i3/src/main.c:913

7 years agoconfigure: add build directory to gitignore (#2543)
Michael Stapelberg [Mon, 7 Nov 2016 19:49:26 +0000 (11:49 -0800)]
configure: add build directory to gitignore (#2543)

7 years agoFix memory leak in i3-msg. (#2542)
Ingo Bürk [Sun, 6 Nov 2016 16:14:37 +0000 (17:14 +0100)]
Fix memory leak in i3-msg. (#2542)

relates to #2541

7 years agoFix typo (#2536)
Jakub Wilk [Sat, 5 Nov 2016 10:32:40 +0000 (11:32 +0100)]
Fix typo (#2536)

7 years agoUpdate config.keycodes link to proper location in user guide (#2537)
Josh Rosso [Sat, 5 Nov 2016 10:32:16 +0000 (03:32 -0700)]
Update config.keycodes link to proper location in user guide (#2537)

Links to i3's config.keycodes in the User's guide navigates to a 404.
This commit updates the reference to the `/etc/config.keycodes`
file in GitHub.

7 years agoFix memory leaks. (#2530)
Ingo Bürk [Thu, 3 Nov 2016 07:18:18 +0000 (08:18 +0100)]
Fix memory leaks. (#2530)

fixes #2529

7 years agotravis: use correct path to debian packages (#2521)
Michael Stapelberg [Fri, 28 Oct 2016 21:41:13 +0000 (23:41 +0200)]
travis: use correct path to debian packages (#2521)

7 years agoMerge pull request #2518 from stapelberg/travis
Michael Stapelberg [Wed, 26 Oct 2016 17:48:56 +0000 (19:48 +0200)]
Merge pull request #2518 from stapelberg/travis

More travis fixes

7 years agotravis/docs.sh: call asciidoc directly 2518/head
Michael Stapelberg [Wed, 26 Oct 2016 06:46:39 +0000 (08:46 +0200)]
travis/docs.sh: call asciidoc directly

…instead of the no longer existing docs-clean and docs targets.

7 years agotravis/clang-analyze: look for dist tarball in build/
Michael Stapelberg [Wed, 26 Oct 2016 06:46:26 +0000 (08:46 +0200)]
travis/clang-analyze: look for dist tarball in build/

7 years agoBugfix: escape I3_VERSION when read from file (#2517)
Michael Stapelberg [Tue, 25 Oct 2016 20:35:30 +0000 (22:35 +0200)]
Bugfix: escape I3_VERSION when read from file (#2517)

I3_VERSION is used as string literal in config.h, i.e.:

    #define I3_VERSION …

Where “…” is replaced with the contents of I3_VERSION.

For our travis builds, we persist the version number to I3_VERSION,
i.e.:

    $ cat I3_VERSION
    4.12-150-g8ddc187 (2016-10-25, branch "next")

Previously, config.h would end up with:

    #define I3_VERSION "4.12-150-g8ddc187 (2016-10-25, branch "next")"

Note the unquoted double quotes around “next”, which are invalid in
C string literals.

Hence, this commit uses sed to escape double quotes, question marks and
backslashes (see also http://stackoverflow.com/a/12208808/712014).

The @<:@ and @:>@ quadrigraphs that m4 expands to [ and ], respectively,
see also http://stackoverflow.com/a/2309394/712014

7 years agodebian: add missing dh-autoreconf to Build-Depends (#2516)
Michael Stapelberg [Tue, 25 Oct 2016 18:54:41 +0000 (20:54 +0200)]
debian: add missing dh-autoreconf to Build-Depends (#2516)

7 years agoMerge pull request #2507 from stapelberg/autotools
Michael Stapelberg [Tue, 25 Oct 2016 06:56:12 +0000 (08:56 +0200)]
Merge pull request #2507 from stapelberg/autotools

Switch to autotools (GNU build system)

7 years agoUpdate travis for autotools 2507/head
Michael Stapelberg [Sun, 16 Oct 2016 16:03:09 +0000 (18:03 +0200)]
Update travis for autotools

7 years agogenerate asciidoc.conf via autoconf
Michael Stapelberg [Sun, 16 Oct 2016 15:23:51 +0000 (17:23 +0200)]
generate asciidoc.conf via autoconf

…instead of updating it in release.sh.

7 years agoUpdate PACKAGE-MAINTAINER’s compilation instructions
Michael Stapelberg [Sat, 15 Oct 2016 15:39:14 +0000 (17:39 +0200)]
Update PACKAGE-MAINTAINER’s compilation instructions

7 years agoUpdate release.sh for autotools
Michael Stapelberg [Fri, 14 Oct 2016 07:51:07 +0000 (09:51 +0200)]
Update release.sh for autotools

7 years agoUpdate debian/ for autotools
Michael Stapelberg [Fri, 14 Oct 2016 07:16:08 +0000 (09:16 +0200)]
Update debian/ for autotools

7 years agopull autotools.gitignore into .gitignore
Michael Stapelberg [Tue, 11 Oct 2016 07:40:06 +0000 (09:40 +0200)]
pull autotools.gitignore into .gitignore

7 years agoEnsure all *.[ch] files include config.h
Michael Stapelberg [Tue, 11 Oct 2016 07:13:35 +0000 (09:13 +0200)]
Ensure all *.[ch] files include config.h

Including config.h is necessary to get e.g. the _GNU_SOURCE define and
any other definitions that autoconf declares. Hence, config.h needs to
be included as the first header in each file.

This is done either via:
1. Including "common.h" (i3bar)
2. Including "libi3.h"
3. Including "all.h" (i3)
4. Including <config.h> directly

Also remove now-unused I3__FILE__, add copyright/license statement
where missing and switch include/all.h to #pragma once.

7 years agoMove/rename config files/.desktop files into subdirs
Michael Stapelberg [Tue, 11 Oct 2016 06:53:58 +0000 (08:53 +0200)]
Move/rename config files/.desktop files into subdirs

This makes it easier to install them with the correct name when using
autotools.

7 years agoSwitch from I3__FILE__ to STRIPPED__FILE__
Michael Stapelberg [Mon, 10 Oct 2016 19:16:09 +0000 (21:16 +0200)]
Switch from I3__FILE__ to STRIPPED__FILE__

…as we now use the m4/ax_extend_srcdir.m4 macro, which defines
STRIPPED__FILE__ (the macro is not i3-specific).

7 years agotestsuite: use relative paths, set PATH to absolute path
Michael Stapelberg [Mon, 10 Oct 2016 19:14:59 +0000 (21:14 +0200)]
testsuite: use relative paths, set PATH to absolute path

This approach works better with autotools, which supports the build
directory being complete outside the source tree.

7 years agoSwitch to autotools (GNU build system)
Michael Stapelberg [Fri, 7 Oct 2016 11:48:26 +0000 (13:48 +0200)]
Switch to autotools (GNU build system)

This commit probably comes as a surprise to some, given that one of i3’s
explicitly stated goals used to be “Do not use programs such as
autoconf/automake for configuration and creating unreadable/broken makefiles”.

I phrased this goal over 7 years ago, based largely on a grudge that I
inherited, which — as I’ve realized in the meantime — was largely held against
FOSS in general, and not actually nuanced criticism of autotools.

In the meantime, I have come to realize that the knee-jerk reaction of “I could
do this better!” (i.e. writing our own build system in this particular case) is
usually misguided, and nowadays I strongly suggest trying hard to fix the
existing system for the benefit of all existing and future users.

Further, I recently got to experience the other side of the coin, as I packaged
a new version of FreeRADIUS for Debian, which at the time of writing used
autoconf in combination with boilermake, a custom make-based build system that
only FreeRADIUS uses. Understanding the build system enough to fix issues and
enable parallel compilation took me an entire day. That time is time which
potentially every downstream maintainer needs to invest, and the resulting
knowledge cannot be applied to any other project.

Hence, I believe it’s a good idea switch i3 to autotools. Yes, it might be that
particular features were easier to implement/understand in our custom
Makefiles, and there might be individuals who have an easier time reading
through our custom Makefiles than learning autotools. All of these
considerations are outweighed by the benefits we get from using the same build
system as literally thousands of other FOSS software packages.

Aside from these somewhat philosophical considerations, there’s also practical
improvements which this change brings us. See the “changes” section below.

┌──────────────────────────────────────────────────────────────────────────────┐
│ new workflow                                                                 │
└──────────────────────────────────────────────────────────────────────────────┘

You can now build i3 like you build any other software package which uses
autotools. Here’s a memory refresher:

    autoreconf -fi
    mkdir -p build && cd build
    ../configure
    make -j8

(The autoreconf -fi step is unnecessary if you are building from a release
 tarball, but shouldn’t hurt either.)

┌──────────────────────────────────────────────────────────────────────────────┐
│ recommended reading                                                          │
└──────────────────────────────────────────────────────────────────────────────┘

I very much recommend reading “A Practitioner's Guide to GNU Autoconf,
Automake, and Libtool” by John Calcote (https://www.nostarch.com/autotools.htm).
That book is from 2010 and, AFAICT, is the most up to date comprehensive
description of autotools. Do not read older documentation. In particular, if a
document you’re reading mentions configure.in (deprecated filename) or
recursive make (now considered harmful), it’s likely outdated.

┌──────────────────────────────────────────────────────────────────────────────┐
│ changes                                                                      │
└──────────────────────────────────────────────────────────────────────────────┘

This commit implements the following new functionality/changes in behavior:

• We use the AX_ENABLE_BUILDDIR macro to enforce builds happening in a separate
  directory. This is a prerequisite for the AX_EXTEND_SRCDIR macro and building
  in a separate directory is common practice anyway. In case this causes any
  trouble when packaging i3 for your distribution, please let me know.

• “make check” runs the i3 testsuite.
  You can still use ./testcases/complete-run.pl to get the interactive progress
  output.

• “make distcheck” (runs testsuite on “make dist” result, tiny bit quicker
  feedback cycle than waiting for the travis build to catch the issue).

• “make uninstall” (occasionally requested by users who compile from source)

• “make” will build manpages/docs by default if the tools are installed.
  Conversely, manpages/docs are not tried to be built for users who don’t want
  to install all these dependencies to get started hacking on i3.

• non-release builds will enable address sanitizer by default. Use the
  --disable-sanitizers configure option to turn off all sanitizers, and see
  --help for available sanitizers.

• Support for pre-compiled headers (PCH) has been dropped for now in the
  interest of simplicitly. Maybe we can re-add it later.

• coverage reports are now generated using “make check-code-coverage”, which
  requires specifying --enable-code-coverage when calling configure.

┌──────────────────────────────────────────────────────────────────────────────┐
│ build system feature parity/testing                                          │
└──────────────────────────────────────────────────────────────────────────────┘

In addition to what’s described above, I tested the following features:

• “make install” installs the same files (plus documentation and manpages)
  cd i3-old && make install PREFIX=/tmp/inst/old
  cd i3-new && ./configure --prefix=/tmp/inst/new
  cd /tmp/inst
  (cd old && for f in $(find); do [ -e "../new/$f" ] || echo "$f missing"; done)

• make dist generates a tarball which includes the same files
  cd i3-old && make dist
  cd i3-new/x86_64-pc-linux-gnu && make dist
  colordiff -u <(tar tf i3-old/i3-4.12.tar.bz2 | sort) \
               <(tar tf i3-new/x86_64-pc-linux-gnu/i3-4.12.tar.gz | sort)
  There are some expected differences:
  • Some files have been renamed (e.g. the new etc/ and share/ subdirectories)
  • Some files will now be generated at build-time, so only their corresponding
    .in file is shipped (e.g. testcases/complete-run.pl)
  • The generated parser files are shipped in the dist tarball (they only
    depend on the parser-specs/* files, not on the target system)
  • autotools infrastructure is shipped (e.g. “configure”, “missing”, etc.)

• DLOG and ELOG statements still produce the same file name in logfiles

• Listing source code in gdb still works.

• gdb backtraces contain the i3-<version> path component

• release.sh still works

• version embedding
  1. git checkout shows “4.12-136-gf720023 (2016-10-10, branch "autotools")”
  2. tarball of a git version shows “4.12-non-git”
  3. release tarball shows 4.13

• debug mode is enabled by default for non-release builds

• enabling verbose builds via V=1

┌──────────────────────────────────────────────────────────────────────────────┐
│ speed                                                                        │
└──────────────────────────────────────────────────────────────────────────────┘

There is no noticeable difference in compilation speed itself (of binaries,
documentation and manpages):

i3-old $ time make all docs mans -j8
make all docs mans -j8  28.92s user 2.15s system 640% cpu 4.852 total

i3-new $ time make -j8
make -j8  27.08s user 1.92s system 620% cpu 4.669 total

In terms of one-time costs:
configuring the build system (../configure) takes about 2.7s on my machine,
generating the build system (autoreconf -fi) takes about 3.1s on my machine.

┌──────────────────────────────────────────────────────────────────────────────┐
│ m4 macros                                                                    │
└──────────────────────────────────────────────────────────────────────────────┘

All files in m4/ have been copied from the autoconf-archive package in version
b6aeb1988f4b6c78bf39d97b6c4f6e1d594d59b9 and should be updated whenever they
change.

This commit has been tested with autoconf 2.69 and automake 1.15.

7 years agorename config.h to configuration.h
Michael Stapelberg [Fri, 7 Oct 2016 11:33:58 +0000 (13:33 +0200)]
rename config.h to configuration.h

This is a preparation step for the next commit.

7 years agoEnsure error message is included when bailing out
Michael Stapelberg [Fri, 7 Oct 2016 11:36:45 +0000 (13:36 +0200)]
Ensure error message is included when bailing out

7 years agocheck vasprintf return code
Michael Stapelberg [Fri, 7 Oct 2016 11:35:06 +0000 (13:35 +0200)]
check vasprintf return code

7 years agoAdd "output" to IPC events referencing a container (#2489)
Peder Stray [Wed, 19 Oct 2016 06:41:10 +0000 (08:41 +0200)]
Add "output" to IPC events referencing a container (#2489)

Add the property "output" to all IPC events that has an output container
as a parent, making it easier to keep track of such things.

fixes #2478

7 years agoImplement new window::mark IPC event. (#2503)
Ingo Bürk [Tue, 18 Oct 2016 06:32:41 +0000 (08:32 +0200)]
Implement new window::mark IPC event. (#2503)

This introduces a new type of 'window' event sent wit change:mark whenever
a mark on a window changes.

fixes #2501

7 years agoDisable pango markup for plain-text input in i3bar. (#2505)
Ingo Bürk [Tue, 18 Oct 2016 06:29:31 +0000 (08:29 +0200)]
Disable pango markup for plain-text input in i3bar. (#2505)

fixes #2498

7 years agoHandle ResizeRequests for tray clients. (#2495)
Ingo Bürk [Tue, 11 Oct 2016 18:46:25 +0000 (20:46 +0200)]
Handle ResizeRequests for tray clients. (#2495)

Some tray clients such as VLC use override_redirect on their tray window. As per
specification this means i3bar won't receive a ConfigureRequest, but instead a
ResizeRequest will be triggered. If not selected, the X server will simply confirm
the request which leads to a broken tray window size.

This commit selects and handles the event just like a configure request is handled.

fixes #2494

7 years agoFix _i3_version debugging symbol (#2492)
Michael Stapelberg [Wed, 5 Oct 2016 16:46:33 +0000 (09:46 -0700)]
Fix _i3_version debugging symbol (#2492)

The idea was to ensure the symbol would always be present. For that, we need
__attribute__((used)), not __attribute__((unused)). Further, ensure the
variable has static storage, as the used attribute only applies to variables
with static storage. See also http://stackoverflow.com/a/29545417/712014

7 years agoRemove extraneous newline when printing core_pattern (#2490)
Michael Stapelberg [Tue, 4 Oct 2016 06:53:49 +0000 (23:53 -0700)]
Remove extraneous newline when printing core_pattern (#2490)

This was accidentally changed in commit 94a09b3cac98a3bc1ed580fce16aa9869f83bbaa

7 years agoBugfix: NULL dereference when stickying _NET_WM_DESKTOP_ALL windows (#2488)
Ferdinand Bachmann [Mon, 3 Oct 2016 12:53:56 +0000 (14:53 +0200)]
Bugfix: NULL dereference when stickying _NET_WM_DESKTOP_ALL windows (#2488)

In some cases, ws will be NULL here.

Originally tested with "lemonbar"

7 years agoImplement special value 'current' for output. (#2483)
Ingo Bürk [Fri, 30 Sep 2016 15:28:02 +0000 (17:28 +0200)]
Implement special value 'current' for output. (#2483)

This commit introduces the special 'current' value for outputs in both of

* move con to output current
* move workspace to output current

fixes #2357

7 years agoAdded new criteria 'tiling' / 'floating'. (#2481)
Ingo Bürk [Wed, 28 Sep 2016 02:04:00 +0000 (04:04 +0200)]
Added new criteria 'tiling' / 'floating'. (#2481)

These criteria allow selecting only windows in a specific mode, i.e.,
tiling and floating, respectively.

fixes #2406

7 years agoRemove conditional compilation for cairo/pangocairo (#2480)
Michael Stapelberg [Tue, 27 Sep 2016 19:57:00 +0000 (12:57 -0700)]
Remove conditional compilation for cairo/pangocairo (#2480)

We strive to avoid conditional compilation in i3 as much as possible.
cairo and pangocairo have been around long enough in the versions that
we need that it’s time to unconditionally depend on them.

Also update DEPENDS with the last-known-good-versions while at it.

7 years agoAssign the sticky value for _NET_WM_DESKTOP on scratchpad windows. (#2457)
Ingo Bürk [Tue, 27 Sep 2016 05:39:17 +0000 (07:39 +0200)]
Assign the sticky value for _NET_WM_DESKTOP on scratchpad windows. (#2457)

fixes #2456

7 years agoUnconditionally depend on libpcre >= 8.10 (#2472)
Michael Stapelberg [Tue, 27 Sep 2016 02:04:13 +0000 (19:04 -0700)]
Unconditionally depend on libpcre >= 8.10 (#2472)

Even Debian oldstable has 8.30, so let’s get rid of conditional
compilation where we don’t actually need it.

7 years agoHandle _NET_ACTIVE_WINDOW for scratchpad windows. (#2458)
Ingo Bürk [Tue, 27 Sep 2016 01:32:05 +0000 (03:32 +0200)]
Handle _NET_ACTIVE_WINDOW for scratchpad windows. (#2458)

We call scratchpad_show() on _NET_ACTIVE_WINDOW requests if the request
came from a pager. This is consistent with the i3 »focus« command because
we assume the user requested to see the window, so we do the only
sensible thing.

fixes #2455

7 years agoCheck output crossing on ENTER_NOTIFY to dockarea. (#2477)
Ingo Bürk [Tue, 27 Sep 2016 01:31:16 +0000 (03:31 +0200)]
Check output crossing on ENTER_NOTIFY to dockarea. (#2477)

When receiving an ENTER_NOTIFY event on a dock client we returned as to not
focus the dock client (cf. #321 and #323). However, we still need to check
for crossing output boundaries and if that happened focus the new output.

Otherwise it can happen that the cursor is on a different output than the
focused output. When opening a window, this would open it on the old output
and then warp the mouse there. This effect will be even worse if the window
is immediately moved with 'move position mouse' as the window will end up
in its correct position on the new output and the cursor warped to the old
output.

relates to #2081

7 years agoMerge pull request #2469 from Airblader/feature-2465
Michael Stapelberg [Tue, 27 Sep 2016 01:30:18 +0000 (18:30 -0700)]
Merge pull request #2469 from Airblader/feature-2465

Use Xft.dpi for DPI if available.

7 years agoMerge pull request #2479 from stapelberg/fix-perl
Michael Stapelberg [Mon, 26 Sep 2016 23:12:13 +0000 (16:12 -0700)]
Merge pull request #2479 from stapelberg/fix-perl

Make tests work with Perl ≥ 5.24 (now in Debian sid)

7 years agot/158-wm_take_focus.t: avoid shift on scalars 2479/head
Michael Stapelberg [Mon, 26 Sep 2016 15:29:27 +0000 (17:29 +0200)]
t/158-wm_take_focus.t: avoid shift on scalars

This feature is forbidden in Perl ≥ 5.24:

  Experimental shift on scalar is now forbidden at
  ./t/158-wm_take_focus.t line 94, near ");"

7 years agotravis-base.Dockerfile: depend on perl, not perl-modules
Michael Stapelberg [Mon, 26 Sep 2016 15:26:37 +0000 (17:26 +0200)]
travis-base.Dockerfile: depend on perl, not perl-modules

As per the package description, perl-modules is an implementation detail
and packages should depend on perl instead.

7 years agoSet $HOME for tests. 2469/head
Ingo Bürk [Sat, 24 Sep 2016 21:48:33 +0000 (23:48 +0200)]
Set $HOME for tests.

We add $HOME to the environment variables we define for a test case
in order to redirect it from the user's actual home directory. This
is necessary because xcb-util-xrm will fall back to $HOME/.Xresources
when determining the DPI. If a user has this set to, e.g., 192 on their
machine, this would break tests.

Since tests shouldn't rely on the system they run in, we redirect the
home directory altogether to simulate a clean slate.

relates to #2465

7 years agoUse Xft.dpi for DPI if available.
Ingo Bürk [Fri, 23 Sep 2016 13:09:49 +0000 (15:09 +0200)]
Use Xft.dpi for DPI if available.

fixes #2465

7 years agodo not match docks in config and command criteria (#2340)
johannes karoff [Mon, 26 Sep 2016 16:45:58 +0000 (18:45 +0200)]
do not match docks in config and command criteria (#2340)

7 years agofix i3bar crashing when I3SOCK present (#2471)
koebi [Mon, 26 Sep 2016 15:01:30 +0000 (17:01 +0200)]
fix i3bar crashing when I3SOCK present (#2471)

When I3SOCK is present, socket_path might be a pointer to an
environment variable, which cannot be free'd in line 157. This
commit duplicates the string if I3SOCK is present, thus making
socket_path a free-able pointer again.

7 years agotravis: build ubuntu packages for xenial, not wily (#2474)
Michael Stapelberg [Sat, 24 Sep 2016 19:24:47 +0000 (12:24 -0700)]
travis: build ubuntu packages for xenial, not wily (#2474)

The extra rm command when configuring the repository is necessary
because of https://bugs.debian.org/838779.

7 years agoFix link in the documentation. (#2462)
Ingo Bürk [Sat, 24 Sep 2016 17:53:02 +0000 (19:53 +0200)]
Fix link in the documentation. (#2462)

This replaces the dead pull request #2242. Thanks to @pniederlag for noticing the
issue and providing the original PR.

7 years agoRemove compatibility definitions for xcb-util < 0.3.8 (#2473)
Michael Stapelberg [Sat, 24 Sep 2016 16:48:32 +0000 (09:48 -0700)]
Remove compatibility definitions for xcb-util < 0.3.8 (#2473)

Even Debian oldstable has xcb-util 0.3.8.

7 years agotravis/cleanup-bintray: use dpkg --compare-versions (#2453)
Michael Stapelberg [Sat, 24 Sep 2016 15:16:02 +0000 (08:16 -0700)]
travis/cleanup-bintray: use dpkg --compare-versions (#2453)

…instead of lexicographically sorting strings, which fails for the
following situation:

    4.12-96-g086276b
    4.12-97-g59c070b
    4.12-108-gb850cfb

This bug resulted in new packages being built and uploaded, then
immediately deleted.

Thanks to eeemsi for reporting the issue.

7 years agoFix memleaks by avoiding _checked variants when discarding the result
Michael Stapelberg [Wed, 14 Sep 2016 07:22:06 +0000 (09:22 +0200)]
Fix memleaks by avoiding _checked variants when discarding the result

Thanks psychon for pointing this out in
https://github.com/i3/i3/pull/2450#discussion_r78560433!

7 years agoEliminate once-used check_error utility function
Michael Stapelberg [Wed, 14 Sep 2016 07:19:25 +0000 (09:19 +0200)]
Eliminate once-used check_error utility function

7 years agoFix colormap handling for containers. (#2450)
Ingo Bürk [Wed, 14 Sep 2016 07:13:17 +0000 (09:13 +0200)]
Fix colormap handling for containers. (#2450)

This commit correctly handles colormaps by

* Using the static default colormap we determine on startup if the
  con has the corresponding depth. This avoids creating pointless
  colormaps.
* Not freeing the default colormap to not have stray colormaps on
  containers. This fixes an issue with certain programs such as xwd.
* Creating a custom colormap when necessary and freeing it when the
  container is killed.

fixes #2435

7 years agoBugfix: don’t apply shift+numlock fallback for keypad keys
Michael Stapelberg [Mon, 12 Sep 2016 20:24:23 +0000 (22:24 +0200)]
Bugfix: don’t apply shift+numlock fallback for keypad keys

fixes #2418

7 years agoMerge branch 'nmschulte-fix_numlock_shift' into next
Michael Stapelberg [Mon, 12 Sep 2016 20:23:10 +0000 (22:23 +0200)]
Merge branch 'nmschulte-fix_numlock_shift' into next

7 years agofix bindsyms with Shift, given NumLock tweaks
Nathan Schulte [Fri, 9 Sep 2016 21:57:04 +0000 (16:57 -0500)]
fix bindsyms with Shift, given NumLock tweaks

7 years agofix typo in logging message
Nathan Schulte [Fri, 9 Sep 2016 21:57:28 +0000 (16:57 -0500)]
fix typo in logging message

7 years agoBugfix: don’t trigger unrelated key bindings for --release bindings
Michael Stapelberg [Mon, 12 Sep 2016 10:57:13 +0000 (12:57 +0200)]
Bugfix: don’t trigger unrelated key bindings for --release bindings

fixes #2442

7 years agot/264-keypress-numlock: add a test covering shift
Michael Stapelberg [Mon, 12 Sep 2016 10:10:59 +0000 (12:10 +0200)]
t/264-keypress-numlock: add a test covering shift

related to #2418

7 years agoBugfix: compare all resolved modifier masks
Michael Stapelberg [Mon, 12 Sep 2016 10:05:38 +0000 (12:05 +0200)]
Bugfix: compare all resolved modifier masks

Before this commit, i3 only compared the user-specified modifiers and
incorrectly ignored the resolved modifiers (such as the numlock
fallback).

While at it, also fix the testcase which treated numlock as a momentary
modifier, whereas it really is a latched modifier.

fixes #2418

7 years agoexpose binding pointer in debug messages
Michael Stapelberg [Mon, 12 Sep 2016 10:01:12 +0000 (12:01 +0200)]
expose binding pointer in debug messages

This makes it a bit easier to match up the different messages to the
configured binding.

7 years agotravis: pass through CC to run-tests
Michael Stapelberg [Mon, 5 Sep 2016 07:01:41 +0000 (09:01 +0200)]
travis: pass through CC to run-tests

fixes #2437

7 years agotravis: only enable asan workaround for clang (breaks gcc)
Michael Stapelberg [Mon, 5 Sep 2016 06:55:26 +0000 (08:55 +0200)]
travis: only enable asan workaround for clang (breaks gcc)

fixes #2437

7 years agotravis: work around asan broken-ness with libc ≥ 2.24
Michael Stapelberg [Mon, 5 Sep 2016 06:42:34 +0000 (08:42 +0200)]
travis: work around asan broken-ness with libc ≥ 2.24

fixes #2437

7 years agoBugfix: re-add single quotes around I3_VERSION
Michael Stapelberg [Mon, 5 Sep 2016 06:19:02 +0000 (08:19 +0200)]
Bugfix: re-add single quotes around I3_VERSION

Without single quotes, the version is not passed correctly to the
compiler, and building Debian packages fails.

related to #2437

7 years agoBugfix: avoid setting urgency hint on content container and above
Michael Stapelberg [Sun, 4 Sep 2016 19:08:21 +0000 (21:08 +0200)]
Bugfix: avoid setting urgency hint on content container and above

fixes #2098 (I _think_)

7 years agoMerge pull request #2393 from bebehei/fix-workspace-next_prev
Michael Stapelberg [Sun, 28 Aug 2016 16:28:25 +0000 (18:28 +0200)]
Merge pull request #2393 from bebehei/fix-workspace-next_prev

fix #2383 for numbered workspaces

7 years agoadd additional reversed testcase 2393/head
Benedikt Heine [Thu, 4 Aug 2016 14:18:02 +0000 (16:18 +0200)]
add additional reversed testcase

7 years agofix transition from named to numbered workspace
Benedikt Heine [Sun, 31 Jul 2016 17:50:01 +0000 (19:50 +0200)]
fix transition from named to numbered workspace

7 years agoenhance test 528
Benedikt Heine [Sun, 31 Jul 2016 17:28:04 +0000 (19:28 +0200)]
enhance test 528

Enhancing test 528 to test workspace_next and workspace_prev
- Adding tests for worksace_prev
- Mixing workspace distribution over outputs

7 years agoremove goto statement
Benedikt Heine [Sun, 31 Jul 2016 17:27:02 +0000 (19:27 +0200)]
remove goto statement

remove goto statement to similarize workspace_next and workspace_prev

7 years agotraverse numbered workspaces in correct order
Benedikt Heine [Sat, 9 Jul 2016 10:56:06 +0000 (12:56 +0200)]
traverse numbered workspaces in correct order

7 years agoDeleting VERSION and extracting it from I3_VERSION instead (#2419)
eplanet [Sat, 13 Aug 2016 20:46:27 +0000 (22:46 +0200)]
Deleting VERSION and extracting it from I3_VERSION instead (#2419)

7 years agoMerge pull request #2301 from EvilPudding/next
Michael Stapelberg [Wed, 3 Aug 2016 16:43:35 +0000 (18:43 +0200)]
Merge pull request #2301 from EvilPudding/next

Minor optimization

7 years agoLeaving the last byte in Colorpixel.hex NULL 2301/head
EvilPudding [Fri, 15 Apr 2016 13:24:03 +0000 (13:24 +0000)]
Leaving the last byte in Colorpixel.hex NULL

Added explicit assignment of last byte to the null character, for
appearence's sake.

7 years agoHex in struct Colorpixel.hex to contiguous memory
EvilPudding [Wed, 13 Apr 2016 15:53:15 +0000 (15:53 +0000)]
Hex in struct Colorpixel.hex to contiguous memory

No reason for hex not to be of a constant size, and
no reason to introduce a cache miss by allocating it
separated from the rest of the structure.

7 years agoOnly add NumLock fallback where necessary.
Michael Stapelberg [Tue, 2 Aug 2016 18:23:53 +0000 (20:23 +0200)]
Only add NumLock fallback where necessary.

Previously, we always discarded the NumLock bit when looking up key
bindings for key press events, and we always grabbed every keycode with
and without the NumLock modifier.

With this commit, the NumLock bit is no longer discarded: since the
previous commit 3bd5e6e5c81b448f9f0ac84454671a871fbfea66 we can
correctly look up key bindings with/without the NumLock bit, as both
variants are stored in |keycodes_head|.

Further, before adding the NumLock fallback (resulting in grabbing the
keycode with the NumLock modifier), we now check whether the key has the
same meaning when NumLock is enabled. This correctly distinguishes the
KP_End vs. KP_1 case, i.e. one can now use the following key bindings:

    # No longer accidentally triggered when pressing KP_1.
    bindsym KP_End nop KP_End

    # Properly distinguished now:
    bindsym KP_End nop KP_End
    bindsym Mod2+KP_1 nop KP_1

fixes #2346

7 years agorefactoring: store modifiers alongside translated keycodes
Michael Stapelberg [Tue, 2 Aug 2016 18:10:26 +0000 (20:10 +0200)]
refactoring: store modifiers alongside translated keycodes

This is a no-op refactoring in terms of functionality.

related to #2346

7 years agomove xkb_current_group check into own function
Michael Stapelberg [Tue, 2 Aug 2016 17:33:26 +0000 (19:33 +0200)]
move xkb_current_group check into own function

This is a no-op refactoring.

7 years agoremove superfluous check for input_type
Michael Stapelberg [Tue, 2 Aug 2016 17:31:23 +0000 (19:31 +0200)]
remove superfluous check for input_type

This condition is already enforced in grab_all_keys().

7 years agoUpdate manpages (#2404)
Denton Liu [Sat, 30 Jul 2016 17:30:25 +0000 (13:30 -0400)]
Update manpages (#2404)

7 years agoAdd uxterm to terminal list (#2397)
Denton Liu [Tue, 19 Jul 2016 18:28:42 +0000 (14:28 -0400)]
Add uxterm to terminal list (#2397)

7 years agoDon't change border style if BS_NORMAL is requested in motif hints (#2386)
yshui [Sat, 25 Jun 2016 19:35:36 +0000 (15:35 -0400)]
Don't change border style if BS_NORMAL is requested in motif hints (#2386)

Fixes #2385

7 years agoHandle _MOTIF_WM_HINTS changes (#2384)
yshui [Wed, 22 Jun 2016 06:39:25 +0000 (02:39 -0400)]
Handle _MOTIF_WM_HINTS changes (#2384)

7 years agoIntroduced a new GET_BINDING_MODES message type and reply. (#2376)
Ingo Bürk [Wed, 15 Jun 2016 20:25:22 +0000 (22:25 +0200)]
Introduced a new GET_BINDING_MODES message type and reply. (#2376)

This type dumps all currently configured binding modes.

fixes #2375

7 years agoMerge pull request #2350 from madroach/OpenBSD
Michael Stapelberg [Wed, 15 Jun 2016 18:19:16 +0000 (20:19 +0200)]
Merge pull request #2350 from madroach/OpenBSD

Fix building and testing on OpenBSD

7 years agoDon't use pthread on OpenBSD 2350/head
Christopher Zimmermann [Sat, 11 Jun 2016 11:05:29 +0000 (13:05 +0200)]
Don't use pthread on OpenBSD

since OpenBSD pthread does not support pthread_condattr_setpshared().
This patch could also stay in the OpenBSD ports tree or depend on a
configure test macro rather than defined __OpenBSD__.

7 years agoAlways use socket activation
Christopher Zimmermann [Sat, 11 Jun 2016 12:40:40 +0000 (14:40 +0200)]
Always use socket activation

it neither depends on systemd nor on any linuxism.

7 years agoFix testsuite on OpenBSD
Christopher Zimmermann [Sat, 11 Jun 2016 12:47:17 +0000 (14:47 +0200)]
Fix testsuite on OpenBSD

OpenBSD perl forks for glob().
Therefore attach SIGCHLD handler as late as possible.

7 years agoUse 64 bit time_t
Christopher Zimmermann [Sat, 11 Jun 2016 10:58:16 +0000 (12:58 +0200)]
Use 64 bit time_t

7 years agoExplicitly terminate fallback in set_from_resource. (#2366)
Ingo Bürk [Tue, 31 May 2016 20:58:23 +0000 (22:58 +0200)]
Explicitly terminate fallback in set_from_resource. (#2366)

7 years agoAdded qterminal to i3-sensible-terminal (#2367)
Zamarin Arthur [Tue, 31 May 2016 20:57:58 +0000 (23:57 +0300)]
Added qterminal to i3-sensible-terminal (#2367)