]> git.sur5r.net Git - i3/i3/log
i3/i3
7 years agomigrate i3-nagbar to draw_util (#2644)
mihaicmn [Sat, 21 Jan 2017 15:25:21 +0000 (17:25 +0200)]
migrate i3-nagbar to draw_util (#2644)

7 years agoUpdate userguide (#2647)
fred777 [Sat, 21 Jan 2017 12:21:32 +0000 (13:21 +0100)]
Update userguide (#2647)

key identifier Esc is invalid, use Escape instead

7 years agoEnsure that marks and the title are displayed even if the window title is empty....
Ingo Bürk [Mon, 16 Jan 2017 22:00:01 +0000 (23:00 +0100)]
Ensure that marks and the title are displayed even if the window title is empty. (#2639)

Previously rendering marks and the title were skipped if the title is empty. With marks
this is obviously wrong, with the title it is also wrong because title_format might be
set.

7 years agoDon't exit() on redefined binding mode. (#2638)
Ingo Bürk [Fri, 13 Jan 2017 18:01:36 +0000 (19:01 +0100)]
Don't exit() on redefined binding mode. (#2638)

Doing a hard exit() is a rather harsh action for something i3 can handle
perfectly fine and is only meant to be a check to make debugging easier
for users in certain situations.

7 years agoOnly react on the last Expose event in a series of events. (#2636)
Ingo Bürk [Fri, 13 Jan 2017 17:34:58 +0000 (18:34 +0100)]
Only react on the last Expose event in a series of events. (#2636)

Thanks to @psychon for pointing this out during the review of PR #2624.
This commit extends this change to all other occurences of Expose events
within i3.

7 years agoFix blinking test. (#2637)
Ingo Bürk [Fri, 13 Jan 2017 17:34:28 +0000 (18:34 +0100)]
Fix blinking test. (#2637)

Thanks to @sandsmark for figuring this out.

7 years agoRemove unused function arguments. (#2635)
Ingo Bürk [Fri, 13 Jan 2017 17:34:09 +0000 (18:34 +0100)]
Remove unused function arguments. (#2635)

The connection is no longer necessary since the non-cairo paths have
been removed.

7 years agoValidate that a binding mode is not defined more than once. (#2633)
Ingo Bürk [Fri, 13 Jan 2017 17:33:29 +0000 (18:33 +0100)]
Validate that a binding mode is not defined more than once. (#2633)

While defining the same mode usually wouldn't hurt and, in fact, the old behavior
allows to split the definition of a binding mode into several blocks, this
can lead to user errors where they accidentally define a mode twice and don't understand
why the mode behaves a certain way (this has been observed in real life :-)).

There's no good usecase for splitting a single binding mode into multiple blocks, thus
the new behavior is better.

fixes #2615

7 years agoAdded support for _NET_MOVERESIZE_WINDOW. (#2634)
Ingo Bürk [Fri, 13 Jan 2017 17:30:50 +0000 (18:30 +0100)]
Added support for _NET_MOVERESIZE_WINDOW. (#2634)

fixes #2603

7 years agoFree trayclient when removing it. (#2632)
Ingo Bürk [Fri, 13 Jan 2017 17:28:29 +0000 (18:28 +0100)]
Free trayclient when removing it. (#2632)

fixes #2619

7 years agoMerge pull request #2624 from Airblader/bug-2422
Michael Stapelberg [Wed, 11 Jan 2017 19:47:18 +0000 (11:47 -0800)]
Merge pull request #2624 from Airblader/bug-2422

Rewrite the signal handler dialogs.

7 years agoMerge pull request #2629 from nmschulte/next
Michael Stapelberg [Wed, 11 Jan 2017 19:47:08 +0000 (11:47 -0800)]
Merge pull request #2629 from nmschulte/next

fix conditional in configure script

7 years agofix conditional in configure script 2629/head
Nathan Schulte [Wed, 11 Jan 2017 02:48:59 +0000 (20:48 -0600)]
fix conditional in configure script

7 years agoRewrite the signal handler dialogs. 2624/head
Ingo Bürk [Wed, 4 Jan 2017 09:41:47 +0000 (10:41 +0100)]
Rewrite the signal handler dialogs.

This commit is a rewrite of the popup dialogs used when i3 crashes. We now
use our draw_util suite and both properly react to EXPOSE events and clean
up the windows when the handler exits.

As a side-effect, this fixes #2422

7 years agoMerge pull request #2628 from nmschulte/fix_build_outside_repo
Michael Stapelberg [Tue, 10 Jan 2017 08:34:19 +0000 (09:34 +0100)]
Merge pull request #2628 from nmschulte/fix_build_outside_repo

Fix build outside repo

7 years agoReport error during error log creation (#2625)
Jens-Wolfhard Schicke-Uffmann [Tue, 10 Jan 2017 08:29:06 +0000 (09:29 +0100)]
Report error during error log creation (#2625)

7 years agolinking vim_like_marks from show_marks documentation (first occurrence (#2626)
Johannes Lange [Tue, 10 Jan 2017 08:22:22 +0000 (09:22 +0100)]
linking vim_like_marks from show_marks documentation (first occurrence (#2626)

of marks in userguide)

7 years agofix auto exclude in-work-tree build dirs 2628/head
Nathan Schulte [Tue, 10 Jan 2017 00:43:38 +0000 (18:43 -0600)]
fix auto exclude in-work-tree build dirs

updates: -- configure: add build directory to gitignore #2543 -- https://github.com/i3/i3/pull/2543

7 years agoproperly detect version when building out of tree
Nathan Schulte [Tue, 10 Jan 2017 00:47:16 +0000 (18:47 -0600)]
properly detect version when building out of tree

7 years ago.github/CONTRIBUTING.md: explain that compositors are unsupported (#2621)
Michael Stapelberg [Tue, 3 Jan 2017 08:38:45 +0000 (09:38 +0100)]
.github/CONTRIBUTING.md: explain that compositors are unsupported (#2621)

7 years agoFree allocated X resource value. (#2620)
Ingo Bürk [Mon, 2 Jan 2017 14:56:28 +0000 (15:56 +0100)]
Free allocated X resource value. (#2620)

This fixes a little memory leak.

7 years agoFix name of mcedit (#2524)
Jakub Wilk [Fri, 9 Dec 2016 07:37:49 +0000 (08:37 +0100)]
Fix name of mcedit (#2524)

It's "mcedit", not "mc-edit".

7 years agoSome systems need to link to libiconv explicitly, thus add a check for it. (#2586)
cresh [Fri, 2 Dec 2016 18:06:39 +0000 (19:06 +0100)]
Some systems need to link to libiconv explicitly, thus add a check for it. (#2586)

7 years agoDo not set input focus in i3-input. (#2598)
Ingo Bürk [Fri, 2 Dec 2016 18:05:43 +0000 (19:05 +0100)]
Do not set input focus in i3-input. (#2598)

This commit removes all traces of setting and reverting the input focus
in i3-input. We don't need to do this because grabbing the keyboard is
sufficient to have the attention we need.

Changing the input focus and reverting it can cause situations where i3
executes the IPC command before processing the FocusIn events. This leads
to i3's input focus change to be rejected due to the timing, leading to
an inconsistent focus state.

fixes #2597

7 years agoFix read of uninitialized memory (#2596)
Zbyněk Moravec [Fri, 2 Dec 2016 17:53:59 +0000 (18:53 +0100)]
Fix read of uninitialized memory (#2596)

Previous code was reading whole array, it was slower and it
read uninitialized memory

7 years ago`move` syntax clarification: (#2591)
Johannes Lange [Wed, 30 Nov 2016 07:19:36 +0000 (08:19 +0100)]
`move` syntax clarification: (#2591)

both x and y position need to be specified

7 years agoRespect minimum size hints for floating windows. (#2508)
Ingo Bürk [Mon, 28 Nov 2016 21:09:39 +0000 (22:09 +0100)]
Respect minimum size hints for floating windows. (#2508)

This commit introduces proper support for the minimum size on floating
windows by ensuring that it is respected during mapping, later changes as
well as resizes.

Furthermore, this commit fixes minor issues with how the hints are handled
during calculations.

fixes #2436

7 years agoUse the DPI setting within the i3-config-wizard and i3-nagbar (#2585)
mihaicmn [Mon, 28 Nov 2016 21:07:45 +0000 (23:07 +0200)]
Use the DPI setting within the i3-config-wizard and i3-nagbar (#2585)

7 years agoImplement RandR 1.5 support (#2580)
Michael Stapelberg [Mon, 28 Nov 2016 17:20:46 +0000 (18:20 +0100)]
Implement RandR 1.5 support (#2580)

This comes with the intentionally undocumented --disable-randr15 command
line flag and disable-randr15 configuration directive. We will add
documentation before the release if and only if it turns out that users
actually need to use this flag in their setups. Ideally, nobody would
need to use the flag and everything would just keep working, but it’s
better to be safe than sorry.

fixes #1799

7 years agoAdded instructions to update Github milestones after release. (#2561)
Ingo Bürk [Mon, 21 Nov 2016 20:41:43 +0000 (21:41 +0100)]
Added instructions to update Github milestones after release. (#2561)

7 years agorelease.sh: update for v4.13 release (#2582)
Michael Stapelberg [Mon, 21 Nov 2016 11:16:06 +0000 (03:16 -0800)]
release.sh: update for v4.13 release (#2582)

7 years agoremove debug.h from Makefile.am (#2581)
Michael Stapelberg [Mon, 21 Nov 2016 11:02:43 +0000 (03:02 -0800)]
remove debug.h from Makefile.am (#2581)

7 years agoFix memory leak: free marks when destroying containers (#2578)
Michael Stapelberg [Mon, 21 Nov 2016 10:41:15 +0000 (02:41 -0800)]
Fix memory leak: free marks when destroying containers (#2578)

7 years agoRemove some now-unused functions from xcb.[ch] (#2574)
Michael Stapelberg [Mon, 21 Nov 2016 08:37:17 +0000 (00:37 -0800)]
Remove some now-unused functions from xcb.[ch] (#2574)

xcb_draw_line is unused since commit
d7f9700ba41db61788a7b0f22350cdd9d008a907

xcb_draw_rect is unused since commit
a79d33fc7fd41ab6e9b853f5356eeec64aa66ef5

xcb_raise_window is unused since commit
7208d010489ba9ebd79b20aa830ae7fb176f05dc

xcb_warp_pointer is unused since commit
755c618cd41815c72d30fd0d3c4770557e952df2

7 years agoRemove unused src/debug.c (#2575)
Michael Stapelberg [Mon, 21 Nov 2016 08:37:10 +0000 (00:37 -0800)]
Remove unused src/debug.c (#2575)

7 years agotests: add inject_randr15 (#2573)
Michael Stapelberg [Mon, 21 Nov 2016 07:20:14 +0000 (23:20 -0800)]
tests: add inject_randr15 (#2573)

This tool is similar to xtrace in usage in that it intercepts traffic to
the X server. The motivating feature for writing the tool is its ability
to inject prepared reply messages instead of the server’s reply. In
this particular case, we’ll inject a RRGetMonitors reply to test i3’s
RandR 1.5 code paths.

The added testcase is a noop for now, but with the code that’s lingering
in the randr15 branch, i3 does actually detect monitors as per the
injected reply:

    2016-11-20 21:10:05 - randr.c:__randr_query_outputs:618 -
      RandR 1.5 available, querying monitors
    2016-11-20 21:10:05 - randr.c:__randr_query_outputs:628 -
      1 RandR monitors found (timestamp 0)
    2016-11-20 21:10:05 - randr.c:__randr_query_outputs:646 -
      name DP3, x 0, y 0, width 3840 px, height 2160 px, width 520 mm,
      height 290 mm, primary 1, automatic 1

This is preparation work for issue #1799

7 years agoconfigure.ac: verify macros in m4/ are being replaced (Thanks sur5r) (#2571)
Michael Stapelberg [Sat, 19 Nov 2016 22:45:22 +0000 (14:45 -0800)]
configure.ac: verify macros in m4/ are being replaced (Thanks sur5r) (#2571)

See the comment for more details, and see the motivating blog post:
https://blogs.noname-ev.de/sur5r/index.php?/archives/7-Another-instance-of-AC_DEFINE-being-undefined.html

7 years agoMerge pull request #2551 from bapt/freebsd_fixes
Michael Stapelberg [Wed, 16 Nov 2016 21:48:05 +0000 (13:48 -0800)]
Merge pull request #2551 from bapt/freebsd_fixes

Freebsd fixes

7 years agofix incorrect reply to ipc command (#2567)
mihaicmn [Tue, 15 Nov 2016 17:26:53 +0000 (19:26 +0200)]
fix incorrect reply to ipc command (#2567)

7 years agoFix memory leaks (#2560)
Chih-Chyuan Hwang [Sun, 13 Nov 2016 18:45:39 +0000 (02:45 +0800)]
Fix memory leaks (#2560)

Fix memory leaks when executing 'i3 --moreversion'.

=================================================================
==14852==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 159 byte(s) in 1 object(s) allocated from:
    #0 0x7fea40855602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
    #1 0x4c4c4a in smalloc ../../i3/libi3/safewrappers.c:24
    #2 0x4c3aee in ipc_recv_message ../../i3/libi3/ipc_recv_message.c:61
    #3 0x44dc2e in display_running_version ../../i3/src/display_version.c:94
    #4 0x472947 in main ../../i3/src/main.c:269
    #5 0x7fea3d0c982f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 39 byte(s) in 2 object(s) allocated from:
    #0 0x7fea40855602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
    #1 0x7fea3d11f7d7 in vasprintf (/lib/x86_64-linux-gnu/libc.so.6+0x767d7)

SUMMARY: AddressSanitizer: 198 byte(s) leaked in 3 allocation(s).

7 years agoUse the DPI setting within the i3bar (#2556)
mihaicmn [Sat, 12 Nov 2016 14:34:54 +0000 (16:34 +0200)]
Use the DPI setting within the i3bar (#2556)

7 years agorelease.sh: add reminder to announce on reddit (#2553)
Michael Stapelberg [Thu, 10 Nov 2016 08:25:30 +0000 (00:25 -0800)]
release.sh: add reminder to announce on reddit (#2553)

7 years agoAccept calling absolute path when building outsource 2551/head
Baptiste Daroussin [Wed, 9 Nov 2016 21:37:21 +0000 (22:37 +0100)]
Accept calling absolute path when building outsource

7 years agoRespect SYSCONFDIR when looking for defaut 'xdg' directory
Baptiste Daroussin [Wed, 9 Nov 2016 21:34:39 +0000 (22:34 +0100)]
Respect SYSCONFDIR when looking for defaut 'xdg' directory

7 years agotravis: switch to container-based trusty (#2550)
Michael Stapelberg [Tue, 8 Nov 2016 22:04:46 +0000 (14:04 -0800)]
travis: switch to container-based trusty (#2550)

fixes #2546

7 years agoswitch to clang-format-3.8 (#2547)
Michael Stapelberg [Tue, 8 Nov 2016 21:46:43 +0000 (13:46 -0800)]
switch to clang-format-3.8 (#2547)

https://llvm.org/bugs/show_bug.cgi?id=30353 was filed for the unintended
line break between in e.g. “TAILQ_ENTRY(foo)\nbar;”.

Until that’s fixed or a workaround is known, we’ll live with line
breaks. To make it a bit easier for readers to see what’s going on, I
added extra line breaks around each such struct member/variable
definition, so that they at least visually are a single unit.

fixes #2174

7 years agodebian: update changelog
Michael Stapelberg [Tue, 8 Nov 2016 20:31:34 +0000 (21:31 +0100)]
debian: update changelog

7 years agoMerge branch 'release-4.13'
Michael Stapelberg [Tue, 8 Nov 2016 18:54:14 +0000 (19:54 +0100)]
Merge branch 'release-4.13'

7 years agoSet non-git version to 4.13-non-git.
Michael Stapelberg [Tue, 8 Nov 2016 18:54:14 +0000 (19:54 +0100)]
Set non-git version to 4.13-non-git.

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