]> git.sur5r.net Git - i3/i3/log
i3/i3
7 years agoMerge pull request #2649 from s3rb31/next
Ingo Bürk [Thu, 23 Feb 2017 23:58:19 +0000 (00:58 +0100)]
Merge pull request #2649 from s3rb31/next

layout toggle: take any combination of layouts as arguments (continuation of #2476)

7 years agolayout toggle: take any combination of layouts as arguments (#2649) 2649/head
s3rb31 [Thu, 19 Jan 2017 19:49:56 +0000 (20:49 +0100)]
layout toggle: take any combination of layouts as arguments (#2649)

With this PR the 'layout toggle' command can be passed any
combination of valid layout keywords as arguments. They will
be activated one after another each time you issue the command,
advancing from left to right always selecting the layout after
the currently active layout or the leftmost layout if the active
layout is not in the argument list.

This PR also incorporates the feature request from #2476.

7 years agoImplement mapping from string to layout as extra function
s3rb31 [Tue, 21 Feb 2017 01:12:39 +0000 (02:12 +0100)]
Implement mapping from string to layout as extra function

7 years agoMerge pull request #2680 from Airblader/feature-2677
Michael Stapelberg [Mon, 20 Feb 2017 17:06:57 +0000 (09:06 -0800)]
Merge pull request #2680 from Airblader/feature-2677

[#2677] Allow using left/right scrolling like up/down scrolling.

7 years agoCopy the entire window content on Expose events. (#2685)
Ingo Bürk [Fri, 17 Feb 2017 08:06:40 +0000 (09:06 +0100)]
Copy the entire window content on Expose events. (#2685)

With commit d58dbc3 we started ignoring Expose events in a sequence
except for the last one. Since we only copied the affected part of
the window in the Expose event handler, this caused incorrectly
rendered window decorations.

Instead of reverting to the old behavior, we now copy the entire window
content on this single, last event with the following rationale:
- It's cheaper to copy a larger chunk once than multiple smaller
  chunks doing one server roundtrip each.
- That's how we do it when rendering out decoration on decoration
  changes as well.

fixes #2683

7 years agoAllow using left/right scrolling like up/down scrolling. 2680/head
Ingo Bürk [Sun, 12 Feb 2017 19:48:44 +0000 (20:48 +0100)]
Allow using left/right scrolling like up/down scrolling.

This commit makes left/right scrolling synonyms for up/down scrolling for
* scrolling on window decoration
* scrolling on i3bar workspaces

fixes #2677

7 years agoIntroduce named aliases for mouse buttons.
Ingo BÃ\83¼rk [Sun, 12 Feb 2017 19:36:42 +0000 (20:36 +0100)]
Introduce named aliases for mouse buttons.

This increases readability and allows us to cover up the fact that
XCB doesn't define constants for left/right scrolling.

7 years agoAdd troubleshooting for title attributes during layout restoring. (#2679)
Ingo Bürk [Sun, 12 Feb 2017 19:24:35 +0000 (20:24 +0100)]
Add troubleshooting for title attributes during layout restoring. (#2679)

7 years agodocument our project governance model (#2675)
Michael Stapelberg [Mon, 6 Feb 2017 18:10:41 +0000 (10:10 -0800)]
document our project governance model (#2675)

7 years agoExplaing the workspace number "1: www" behavior (#2674)
Stefan Hagen [Sun, 5 Feb 2017 17:57:44 +0000 (18:57 +0100)]
Explaing the workspace number "1: www" behavior (#2674)

The documentation did not explain how workspace number `"1: www"` is working.
Related to #2663

Rephrase to cover the creation case

7 years agodocs: focus_follow_mouse only happens at window border crossings (#2669)
Manuel Mendez [Sun, 5 Feb 2017 09:07:21 +0000 (04:07 -0500)]
docs: focus_follow_mouse only happens at window border crossings (#2669)

see #2666

7 years agorestart bar status command on config reload (#2668)
Johannes Lange [Sun, 5 Feb 2017 09:04:35 +0000 (10:04 +0100)]
restart bar status command on config reload (#2668)

Closes #2651

7 years agomigrate i3-config-wizard to draw_util (#2654)
mihaicmn [Wed, 25 Jan 2017 07:18:13 +0000 (09:18 +0200)]
migrate i3-config-wizard to draw_util (#2654)

7 years agoAdded missing cases for workspace event (#2656)
Tobias Hänel [Tue, 24 Jan 2017 16:40:32 +0000 (17:40 +0100)]
Added missing cases for workspace event (#2656)

The possible values "rename", "reload" and "restored" of the property
'change' from the workspace event were missing. Because no events of
those types contain an old workspace, this was trivial.

7 years agoTestcases: Check for required binaries (#2655)
Tony Crisci [Mon, 23 Jan 2017 07:40:08 +0000 (02:40 -0500)]
Testcases: Check for required binaries (#2655)

Fail fast in case test binaries are not built and provide instructions
on how to build them.

7 years agoAdd the ipc shutdown event (#2652)
Tony Crisci [Sun, 22 Jan 2017 22:08:32 +0000 (17:08 -0500)]
Add the ipc shutdown event (#2652)

This event is triggered when the connection to the ipc is about to
shutdown because of a user action such as with a `restart` or `exit`
command. The `change` field indicates why the ipc is shutting down. It
can be either "restart" or "exit".

fixes #2318

7 years agomigrate placeholder windows to draw_util (#2646)
mihaicmn [Sat, 21 Jan 2017 15:53:09 +0000 (17:53 +0200)]
migrate placeholder windows to draw_util (#2646)

7 years agomigrate i3-input to draw_util (#2645)
mihaicmn [Sat, 21 Jan 2017 15:30:31 +0000 (17:30 +0200)]
migrate i3-input to draw_util (#2645)

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