]> git.sur5r.net Git - i3/i3/log
i3/i3
7 years agoCreate a new split container when switching a workspace container to split layout
Dan Elkouby [Sun, 30 Jul 2017 15:49:42 +0000 (18:49 +0300)]
Create a new split container when switching a workspace container to split layout

The behavior before 52ce8c8 was to do it regardless of what layout we're
switching to.

Fixes #2846

7 years agotests: run under Xvfb by default (if available) (#2951)
Michael Stapelberg [Fri, 13 Oct 2017 07:18:49 +0000 (00:18 -0700)]
tests: run under Xvfb by default (if available) (#2951)

This shaves off two seconds of wall-clock time (10s → 8s).

7 years agoFix AnyEvent->timer call (#3008)
Michael Stapelberg [Thu, 5 Oct 2017 20:03:33 +0000 (13:03 -0700)]
Fix AnyEvent->timer call (#3008)

And make the remaining AnyEvent->condvar and AnyEvent->timer calls
consistent.

7 years agodump-asy.pl: use layout instead of orientation for names (#3004)
Orestis [Sat, 30 Sep 2017 17:17:20 +0000 (20:17 +0300)]
dump-asy.pl: use layout instead of orientation for names (#3004)

7 years agoMerge pull request #3005 from stapelberg/tick
Michael Stapelberg [Sat, 30 Sep 2017 17:16:43 +0000 (10:16 -0700)]
Merge pull request #3005 from stapelberg/tick

Implement the tick event

7 years agoFix compilation warnings on all Debian architectures. (#3007)
Michael Stapelberg [Sat, 30 Sep 2017 17:16:21 +0000 (10:16 -0700)]
Fix compilation warnings on all Debian architectures. (#3007)

stbuf.st_size is of type off_t, which the standard defines as “extended signed
integral type”¹, and for which there is no correct printf format string. Hence,
we need to cast it into a hopefully-large-enough type (ugh) and use the
corresponding format string. In our case, int64_t should do it, as config files
really shouldn’t be anywhere close to those numbers.

① http://pubs.opengroup.org/onlinepubs/007908799/xsh/systypes.h.html

7 years agoFix memory leak when config conversion fails (#3006)
Michael Stapelberg [Sat, 30 Sep 2017 17:15:58 +0000 (10:15 -0700)]
Fix memory leak when config conversion fails (#3006)

This happens on an empty config file, for example.

7 years agoSynchronize with i3bar+i3, not just i3. 3005/head
Michael Stapelberg [Sat, 30 Sep 2017 11:04:20 +0000 (13:04 +0200)]
Synchronize with i3bar+i3, not just i3.

7 years agoImplement the tick event
Michael Stapelberg [Sun, 24 Sep 2017 13:40:30 +0000 (15:40 +0200)]
Implement the tick event

This makes our tests less flaky, shorter, and more readable.

fixes #2988

7 years agotests: implement xtest_sync_with_i3
Michael Stapelberg [Sat, 30 Sep 2017 09:27:53 +0000 (11:27 +0200)]
tests: implement xtest_sync_with_i3

The regular sync_with_i3 is not sufficient because i3test::XTEST uses a separate
X11 connection.

7 years agodocs/ipc: include new Go package, reference example byteorder code (#3000)
Michael Stapelberg [Fri, 29 Sep 2017 21:02:18 +0000 (14:02 -0700)]
docs/ipc: include new Go package, reference example byteorder code (#3000)

7 years agoDeal with UTF8 in per-workspace-layout.pl. (#2997)
Ingo Bürk [Thu, 28 Sep 2017 20:12:51 +0000 (22:12 +0200)]
Deal with UTF8 in per-workspace-layout.pl. (#2997)

fixes #2996

7 years agoMerge pull request #2992 from orestisf1993/next
Ingo Bürk [Wed, 27 Sep 2017 19:47:52 +0000 (21:47 +0200)]
Merge pull request #2992 from orestisf1993/next

i3bar: fix segfault when no status_command is provided

7 years agoMerge pull request #2995 from orestisf1993/dump-asy-basename
Ingo Bürk [Wed, 27 Sep 2017 19:46:00 +0000 (21:46 +0200)]
Merge pull request #2995 from orestisf1993/dump-asy-basename

dump-asy.pl: use correct tmp dirname instead of hardcoded /tmp

7 years agoMerge pull request #2953 from CyberShadow/focus_wrapping
Michael Stapelberg [Wed, 27 Sep 2017 16:31:39 +0000 (09:31 -0700)]
Merge pull request #2953 from CyberShadow/focus_wrapping

Add "focus_wrapping" option

7 years agodump-asy.pl: use correct tmp dirname instead of hardcoded /tmp 2995/head
Orestis Floros [Wed, 27 Sep 2017 12:23:32 +0000 (15:23 +0300)]
dump-asy.pl: use correct tmp dirname instead of hardcoded /tmp

For example, on some systems, $rep might be saved in /tmp/$USER/ instead
of /tmp/.

7 years agoi3bar: fix segfault when no status_command is provided 2992/head
Orestis Floros [Mon, 25 Sep 2017 23:50:10 +0000 (02:50 +0300)]
i3bar: fix segfault when no status_command is provided

Fixes #2933.

7 years agoMerge "force_focus_wrapping" option into "focus_wrapping force" 2953/head
Vladimir Panteleev [Fri, 22 Sep 2017 23:41:38 +0000 (23:41 +0000)]
Merge "force_focus_wrapping" option into "focus_wrapping force"

Allow enabling forced focus wrapping by specifying "focus_wrapping
force" in i3's configuration. This syntax supersedes the previous
"force_focus_wrapping yes" one, which remains available for backwards
compatibility.

7 years agoWIFEXITED needs sys/wait.h (#2989)
Pietro Cerutti [Mon, 25 Sep 2017 16:11:15 +0000 (17:11 +0100)]
WIFEXITED needs sys/wait.h (#2989)

7 years agoMerge pull request #2985 from orestisf1993/next
Ingo Bürk [Mon, 25 Sep 2017 07:09:56 +0000 (09:09 +0200)]
Merge pull request #2985 from orestisf1993/next

Correct remaining string length for fill_rmlvo_from_root

7 years agoupdate debian/changelog and release.sh after release (#2987)
Michael Stapelberg [Mon, 25 Sep 2017 07:04:31 +0000 (09:04 +0200)]
update debian/changelog and release.sh after release (#2987)

7 years agoCorrect remaining string length for fill_rmlvo_from_root 2985/head
Orestis Floros [Mon, 25 Sep 2017 01:43:00 +0000 (04:43 +0300)]
Correct remaining string length for fill_rmlvo_from_root

Fixes #2538.

7 years agodocs/ipc: document the GET_CONFIG request (#2984)
Michael Stapelberg [Sun, 24 Sep 2017 15:25:41 +0000 (17:25 +0200)]
docs/ipc: document the GET_CONFIG request (#2984)

This was neglected in commit a6d8ed9b1ac6efa507d65b752758522bcfcc5213

related to #2856

7 years agoMerge pull request #2981 from stapelberg/https
Michael Stapelberg [Sun, 24 Sep 2017 11:11:01 +0000 (13:11 +0200)]
Merge pull request #2981 from stapelberg/https

Replace http:// with https:// where applicable

7 years agotests: replace http:// with https:// where appropriate 2981/head
Michael Stapelberg [Sun, 24 Sep 2017 08:19:50 +0000 (10:19 +0200)]
tests: replace http:// with https:// where appropriate

This was done automatically using:

% sed -i 's,http://build.i3wm.org,https://build.i3wm.org,g' testcases/t/*.t

7 years agoReplace http:// with https:// where applicable
Michael Stapelberg [Sun, 24 Sep 2017 08:19:07 +0000 (10:19 +0200)]
Replace http:// with https:// where applicable

The testcases will be updated automatically in a separate commit.

7 years agoMerge pull request #2977 from orestisf1993/issue-1627
Ingo Bürk [Sat, 23 Sep 2017 08:40:34 +0000 (10:40 +0200)]
Merge pull request #2977 from orestisf1993/issue-1627

Check container existance during drag events

7 years agoMerge pull request #2978 from orestisf1993/issue-2572
Ingo Bürk [Sat, 23 Sep 2017 08:21:16 +0000 (10:21 +0200)]
Merge pull request #2978 from orestisf1993/issue-2572

Issue 2572

7 years agoCheck container existance during drag events 2977/head
Orestis Floros [Fri, 22 Sep 2017 16:25:02 +0000 (19:25 +0300)]
Check container existance during drag events

This fixes a crash that occurs when disabling floating for a container
while it is being moved or resized.

@Deiz describes the problem:
> It occurs because the command that disables floating runs before the
event loop. So, the window is tiled, its floating parent is destroyed,
but then a key event is handled which causes the position/size of the
now-destroyed parent to be modified.

Fixes #1627

7 years agoAdd con_exists function
Orestis Floros [Fri, 22 Sep 2017 16:22:48 +0000 (19:22 +0300)]
Add con_exists function

Checks the all_cons queue and returns true if a given con is found.

7 years agoRaise floating window to top when it gets focus 2978/head
Orestis Floros [Fri, 22 Sep 2017 19:00:06 +0000 (22:00 +0300)]
Raise floating window to top when it gets focus

Applied for:
1. '[...] focus' for a floating container raises it to the top.
2. Focusing a window through a focus event raises it to the top.

Fixes #2572

7 years agoAdd "focus_wrapping" option
Vladimir Panteleev [Fri, 15 Sep 2017 02:57:55 +0000 (02:57 +0000)]
Add "focus_wrapping" option

Fixes #2352.

7 years agoDon't put new floating windows on top unless they're focused
Martin T. H. Sandsmark [Tue, 27 Dec 2016 18:00:09 +0000 (19:00 +0100)]
Don't put new floating windows on top unless they're focused

7 years agoMerge pull request #2959 from orestisf1993/issue-2764
Ingo Bürk [Fri, 22 Sep 2017 14:24:26 +0000 (16:24 +0200)]
Merge pull request #2959 from orestisf1993/issue-2764

Allow assign to output

7 years agodocs/userguide: Update description of focus wrapping
Vladimir Panteleev [Fri, 15 Sep 2017 01:59:50 +0000 (01:59 +0000)]
docs/userguide: Update description of focus wrapping

Focus wrapping applies to all kinds of containers, not just
tabbed/stacked ones.

7 years agoMerge pull request #2970 from CyberShadow/i3bar-primary-output
Michael Stapelberg [Tue, 19 Sep 2017 16:57:55 +0000 (18:57 +0200)]
Merge pull request #2970 from CyberShadow/i3bar-primary-output

Do not canonicalize special output names

7 years agoDo not canonicalize special output names 2970/head
Vladimir Panteleev [Tue, 19 Sep 2017 14:46:27 +0000 (14:46 +0000)]
Do not canonicalize special output names

canonicalize_output_name allowed the "primary" special output name to
be canonicalized, thus converting it to the name of whatever output
was the primary output at the time. This caused settings
(specifically, i3bar output and tray_output settings) to be stored as
specific output names, instead of the intended special names whose
referred output may change as the system's configuration (i.e. current
primary output) changes.

Add a check to canonicalize_output_name to return the name as-is if it
is the special name "primary".

7 years agofake_outputs: Allow designating a fake output as primary
Vladimir Panteleev [Tue, 19 Sep 2017 14:42:13 +0000 (14:42 +0000)]
fake_outputs: Allow designating a fake output as primary

Allow appending 'P' to the fake output specification to set the
created output's "primary" flag, to allow writing test cases that
depend on the presence of a primary output.

7 years agofake_outputs: Don't read past the end of string
Vladimir Panteleev [Tue, 19 Sep 2017 14:37:35 +0000 (14:37 +0000)]
fake_outputs: Don't read past the end of string

fake_outputs_init would unconditionally increase the string read
pointer variable (walk) by one character more than the number of
characters that have been read, to skip past the character delimiting
records (a comma). However, when the input string was not terminated
by a comma, it would cause the function to read past the null
terminator instead.

Avoid this by explicitly checking for the expected delimiter.

7 years agofake_outputs: Use %n format specifier instead of sprintf
Vladimir Panteleev [Tue, 19 Sep 2017 14:33:51 +0000 (14:33 +0000)]
fake_outputs: Use %n format specifier instead of sprintf

fake_outputs_init used a sprintf invocation with a throw-away buffer
to estimate how many characters the sscanf invocation consumed. This
was unnecessary, and also potentially incorrect, as differences
between the read and formatted strings (such as leading zeros) could
lead to fake_outputs_init to lose its track.

Instead, use the %n format specifier which allows saving the number of
characters consumed by sscanf so far. %n is part of C99.

7 years ago291-swap.t: make tests fail less (#2964)
Orestis [Mon, 18 Sep 2017 16:02:38 +0000 (19:02 +0300)]
291-swap.t: make tests fail less (#2964)

7 years agoipc: document how to detect i3’s byte order in memory-safe languages (#2961)
Michael Stapelberg [Mon, 18 Sep 2017 15:15:28 +0000 (17:15 +0200)]
ipc: document how to detect i3’s byte order in memory-safe languages (#2961)

related to issue #2958

7 years agoBugfix: avert crash by fixing focus when creating output containers (#2966)
Michael Stapelberg [Mon, 18 Sep 2017 14:37:34 +0000 (16:37 +0200)]
Bugfix: avert crash by fixing focus when creating output containers (#2966)

fixes #2854

7 years agoBugfix: don’t invalidate layout upon invalid 'layout toggle' params (#2965)
Michael Stapelberg [Mon, 18 Sep 2017 14:36:57 +0000 (16:36 +0200)]
Bugfix: don’t invalidate layout upon invalid 'layout toggle' params (#2965)

fixes #2903

7 years agodocs/ipc: "urgent": complete the list of container types (#2967)
Michael Stapelberg [Mon, 18 Sep 2017 14:36:34 +0000 (16:36 +0200)]
docs/ipc: "urgent": complete the list of container types (#2967)

Thanks chressie!

7 years agoMigrate tooling to ExtUtils::MakeMaker (#2963)
Kent Fredric [Mon, 18 Sep 2017 11:03:54 +0000 (23:03 +1200)]
Migrate tooling to ExtUtils::MakeMaker (#2963)

7 years agoipc: rename COMMAND to RUN_COMMAND for consistency (#2956)
Michael Stapelberg [Sun, 17 Sep 2017 13:25:00 +0000 (15:25 +0200)]
ipc: rename COMMAND to RUN_COMMAND for consistency (#2956)

All other message types are verbs, only our first-ever message COMMAND wasn’t.

While we’re here, also change the message type dictionary into a table with
clickable links to the corresponding reply type.

Authors of downstream IPC libraries are encouraged to keep the old name around
so as to not break existing code, but mark it as deprecated.

7 years agoAllow assign to output 2959/head
Orestis Floros [Sat, 16 Sep 2017 17:54:44 +0000 (20:54 +0300)]
Allow assign to output

Implements the "assign" part of issue #2764.

7 years agoFix userguide formatting error
Orestis Floros [Sun, 17 Sep 2017 12:20:47 +0000 (15:20 +0300)]
Fix userguide formatting error

7 years ago166-assign.t: improve open_special call
Orestis Floros [Sun, 17 Sep 2017 10:10:58 +0000 (13:10 +0300)]
166-assign.t: improve open_special call

7 years ago166-assign.t: fix typo
Orestis Floros [Sun, 17 Sep 2017 11:45:37 +0000 (14:45 +0300)]
166-assign.t: fix typo

7 years agoAdd con_move_to_output_name function
Orestis Floros [Sat, 16 Sep 2017 17:14:35 +0000 (20:14 +0300)]
Add con_move_to_output_name function

7 years agoMerge pull request #2960 from orestisf1993/next
Ingo Bürk [Sun, 17 Sep 2017 10:05:04 +0000 (12:05 +0200)]
Merge pull request #2960 from orestisf1993/next

Fix possible errors related to free()

7 years agoFix use of err after it is freed 2960/head
Orestis Floros [Sat, 16 Sep 2017 22:14:47 +0000 (01:14 +0300)]
Fix use of err after it is freed

7 years agoFix wrong call to free
Orestis Floros [Sat, 16 Sep 2017 21:24:15 +0000 (00:24 +0300)]
Fix wrong call to free

To confirm, assign n to a constant value and try to use the
append_layout command.

Without the change i3 crashes.

7 years agoPrevent freeing of uninitialized pointer
Orestis Floros [Sat, 16 Sep 2017 20:53:31 +0000 (23:53 +0300)]
Prevent freeing of uninitialized pointer

> variable 'buf' is used uninitialized whenever 'if' condition is true

Note: freeing a NULL pointer is fine.

7 years agoipc: tree reply: document focus, nodes and floating_nodes (#2955)
Michael Stapelberg [Sat, 16 Sep 2017 15:28:44 +0000 (17:28 +0200)]
ipc: tree reply: document focus, nodes and floating_nodes (#2955)

These haven’t ever changed, but were only included in the example, not in the
list, so people might not have realized that these are safe for use.

7 years agoMerge pull request #2902 from orestisf1993/swap-for-fullscreen
Ingo Bürk [Sat, 16 Sep 2017 11:07:21 +0000 (13:07 +0200)]
Merge pull request #2902 from orestisf1993/swap-for-fullscreen

Make swap work with fullscreen windows

7 years agoMake swap work with fullscreen windows 2902/head
Orestis Floros [Wed, 6 Sep 2017 01:10:22 +0000 (04:10 +0300)]
Make swap work with fullscreen windows

Swap works like normal with fullscreen windows but swaps the fullscreen
mode of the 2 containers after it's done.

Fixes #2811

7 years agoAdd SWAP util macro
Orestis Floros [Sat, 16 Sep 2017 10:43:28 +0000 (13:43 +0300)]
Add SWAP util macro

7 years agoMerge pull request #2887 from orestisf1993/next
Ingo Bürk [Fri, 15 Sep 2017 19:26:35 +0000 (21:26 +0200)]
Merge pull request #2887 from orestisf1993/next

Allow assign to workspace by number

7 years agoMerge pull request #2950 from CyberShadow/pull-20170914-153533
Michael Stapelberg [Fri, 15 Sep 2017 09:31:33 +0000 (11:31 +0200)]
Merge pull request #2950 from CyberShadow/pull-20170914-153533

Fix erratic behavior with single container child jumping outputs

7 years agoFix erratic behavior with single container child jumping outputs 2950/head
Vladimir Panteleev [Thu, 14 Sep 2017 15:41:48 +0000 (15:41 +0000)]
Fix erratic behavior with single container child jumping outputs

This fixes a regression introduced in commit
4e88c10564ca5366c2578908f62ec56625a26718: when attempting to move the
single child of a container in the direction of another output, i3
would move the window to the output, despite the window not being at
the edge of its output, instead of moving it to its parent container.

The bug occurred because the check for moving containers across
outputs with non-default workspace layouts (issue #1603) did not
actually verify that the moved window lies at the edge of the
workspace, despite what its comment said.

Fixes issue #2466.

7 years agoUse numeric comparison in sort for $displaynum (#2952)
Orestis [Fri, 15 Sep 2017 09:21:35 +0000 (12:21 +0300)]
Use numeric comparison in sort for $displaynum (#2952)

Eg in the case of sockets:
- X0
- X99
- X100

X99 would be picked instead of X100.

7 years agoAllow assign to workspace by number 2887/head
Orestis Floros [Mon, 28 Aug 2017 02:14:03 +0000 (05:14 +0300)]
Allow assign to workspace by number

Makes "assign [<criteria>] workspace number <number>" work in the same
manner as "move to workspace number <number>" instead of assigning the
window to a workspace named "number <number>".

config.spec is modified to expect a 'number' string and an extra
argument is used in cfg_assign.

For workspaces that don't exist yet, workspace_get is used as a
fallback. This also allows the user to assign to "<number> <workspace>"
eg "2: work" and the full name will be used if workspace number 2
doesn't exist yet.

Fixes #2590.

7 years agoFix typo in con_parent_with_orientation description
Vladimir Panteleev [Thu, 14 Sep 2017 15:51:49 +0000 (15:51 +0000)]
Fix typo in con_parent_with_orientation description

7 years agoAdd -name argument for Xephyr (#2937)
Orestis [Thu, 14 Sep 2017 20:10:16 +0000 (23:10 +0300)]
Add -name argument for Xephyr (#2937)

This way you can assign the test windows to an empty workspace to avoid
interacting with them (when xvfb-run is not an option):
assign [instance="i3test"] workspace testing

7 years agoMerge pull request #2945 from stapelberg/i3-config
Michael Stapelberg [Thu, 14 Sep 2017 20:08:36 +0000 (22:08 +0200)]
Merge pull request #2945 from stapelberg/i3-config

simplify tests which use launch_with_config precisely once

7 years agotests: unflake tests by not starting i3bar 2945/head
Michael Stapelberg [Thu, 14 Sep 2017 11:35:26 +0000 (13:35 +0200)]
tests: unflake tests by not starting i3bar

7 years agotests: remove the (broken) exit_gracefully check
Michael Stapelberg [Thu, 14 Sep 2017 09:30:58 +0000 (11:30 +0200)]
tests: remove the (broken) exit_gracefully check

I previously tried to fix the check, but could only come up with a fix which
required removing our module pre-loading, which makes the tests considerably
more expensive. Instead, let’s just remove the check.

7 years agotests: use i3_config arg instead of precisely one launch_with_config
Michael Stapelberg [Thu, 14 Sep 2017 10:30:42 +0000 (12:30 +0200)]
tests: use i3_config arg instead of precisely one launch_with_config

This way, tests are shorter, and i3test’s invocation of launch_with_config
parallelizes work better, using dont_block => 1.

7 years agoi3test::XTEST: don’t “use i3test” to avoid clobbering state
Michael Stapelberg [Thu, 14 Sep 2017 09:44:49 +0000 (11:44 +0200)]
i3test::XTEST: don’t “use i3test” to avoid clobbering state

Before this commit, the $i3_autostart variable was accidentally overridden.

7 years agoReorder tests to not use the same number (#2947)
Michael Stapelberg [Thu, 14 Sep 2017 15:49:02 +0000 (17:49 +0200)]
Reorder tests to not use the same number (#2947)

Distinct numbers make re-running individual tests easier by helping with
tab-completion.

Completeness verified using:
% for i in $(seq 0 600)
do
  files=$(ls testcases/t/$(printf "%03d" $i)-*.t 2>&- | wc -l)
  [ "$files" != "0" ] && [ "$files" != "1" ] && echo "clash: $i"
done

7 years agotests: unflake t/257-keypress-group1-fallback.t (#2946)
Michael Stapelberg [Thu, 14 Sep 2017 15:48:37 +0000 (17:48 +0200)]
tests: unflake t/257-keypress-group1-fallback.t (#2946)

fixes #2944

7 years agotravis: install xrandr in Docker container for t/533-randr15.t (#2949)
Michael Stapelberg [Thu, 14 Sep 2017 15:48:22 +0000 (17:48 +0200)]
travis: install xrandr in Docker container for t/533-randr15.t (#2949)

7 years agoMerge pull request #2942 from stapelberg/append
Michael Stapelberg [Wed, 13 Sep 2017 16:38:47 +0000 (18:38 +0200)]
Merge pull request #2942 from stapelberg/append

Improve append_layout’s invalid JSON handling

7 years agoAdd .editorconfig (see editorconfig.org) (#2943)
Michael Stapelberg [Wed, 13 Sep 2017 16:38:27 +0000 (18:38 +0200)]
Add .editorconfig (see editorconfig.org) (#2943)

This file uses the same settings which we currently have in our vim modeline,
but can be picked up by many different editors without having to add and
maintain editor-specific modelines in all of our source files.

7 years agovalidate JSON before loading 2942/head
Michael Stapelberg [Wed, 13 Sep 2017 15:14:51 +0000 (17:14 +0200)]
validate JSON before loading

This commit also introduces slurp() which reads a file in its entirety. Using
this function instead of doing IO in the functions in load_layout.c again and
again makes the code cleaner (fixing at least two memory leaks) and avoids
re-reading the same file 3 times.

related to #2755

7 years agoAnyEvent-I3: use Carp for easier debugging (includes stacktraces)
Michael Stapelberg [Wed, 13 Sep 2017 14:39:44 +0000 (16:39 +0200)]
AnyEvent-I3: use Carp for easier debugging (includes stacktraces)

7 years agoBugfix: free incomplete containers when JSON parsing fails
Michael Stapelberg [Wed, 13 Sep 2017 14:39:13 +0000 (16:39 +0200)]
Bugfix: free incomplete containers when JSON parsing fails

related to #2755

7 years agoMerge pull request #2935 from orestisf1993/issue-2934
Michael Stapelberg [Wed, 13 Sep 2017 13:07:21 +0000 (15:07 +0200)]
Merge pull request #2935 from orestisf1993/issue-2934

Make sure that parse_config input terminates with '\0'

7 years agoscalloc parse_config input to make sure it terminates with '\0' 2935/head
Orestis Floros [Tue, 12 Sep 2017 09:29:01 +0000 (12:29 +0300)]
scalloc parse_config input to make sure it terminates with '\0'

Otherwise strchr() can crash for files that don't end with '\n' because
it won't find a null char to terminate at.

Fixes #2934

7 years agoDon't insert newline at end of config with launch_with_config
Orestis Floros [Wed, 13 Sep 2017 10:32:12 +0000 (13:32 +0300)]
Don't insert newline at end of config with launch_with_config

7 years agoMerge pull request #2920 from CyberShadow/monitor-output-names
Michael Stapelberg [Wed, 13 Sep 2017 08:58:38 +0000 (10:58 +0200)]
Merge pull request #2920 from CyberShadow/monitor-output-names

Consider RandR 1.5's monitors' output names in addition to monitor names

7 years agodocs/userguide: Document that i3 can accept RandR output names 2920/head
Vladimir Panteleev [Tue, 12 Sep 2017 09:27:49 +0000 (09:27 +0000)]
docs/userguide: Document that i3 can accept RandR output names

7 years ago533-randr15.t: Add test for bar output name canonicalization
Vladimir Panteleev [Tue, 12 Sep 2017 09:18:40 +0000 (09:18 +0000)]
533-randr15.t: Add test for bar output name canonicalization

7 years ago533-randr15.t: Stop hard-coding the output name
Vladimir Panteleev [Tue, 12 Sep 2017 08:50:40 +0000 (08:50 +0000)]
533-randr15.t: Stop hard-coding the output name

Refactor away all mentions of DP3.

7 years ago533-randr15.t: Add a fake output connected to the fake monitor
Vladimir Panteleev [Tue, 12 Sep 2017 08:42:46 +0000 (08:42 +0000)]
533-randr15.t: Add a fake output connected to the fake monitor

Add an output ID to the simulated RRGetMonitors reply, then add a
simulated RRGetOutputInfo reply describing the added output.

7 years agotestcases/lib: Add inject_randr15_outputinfo argument
Vladimir Panteleev [Tue, 12 Sep 2017 08:41:00 +0000 (08:41 +0000)]
testcases/lib: Add inject_randr15_outputinfo argument

Allow tests to specify a file name for inject_randr15's
--getoutputinfo_reply command-line parameter.

7 years agoinject_randr1.5: Intercept X11 error responses in addition to replies
Vladimir Panteleev [Tue, 12 Sep 2017 08:39:15 +0000 (08:39 +0000)]
inject_randr1.5: Intercept X11 error responses in addition to replies

Allow clients to send garbage to the server, then intercept the
server's error response and substitute it with the supplied simulated
reply data.

7 years agoinject_randr1.5: Add RRGetOutputInfo reply injection
Vladimir Panteleev [Tue, 12 Sep 2017 07:03:20 +0000 (07:03 +0000)]
inject_randr1.5: Add RRGetOutputInfo reply injection

Add a --getoutputinfo_reply switch to indicate a filename containing
the RRGetOutputInfo reply data to inject.

7 years agoinject_randr1.5: Refactor reading and storing reply buffer to a struct
Vladimir Panteleev [Tue, 12 Sep 2017 06:58:29 +0000 (06:58 +0000)]
inject_randr1.5: Refactor reading and storing reply buffer to a struct

Allows easier introduction of additional reply buffers in upcoming
changes.

7 years agoipc: Canonicalize output names in bar configuration
Vladimir Panteleev [Mon, 11 Sep 2017 11:15:56 +0000 (11:15 +0000)]
ipc: Canonicalize output names in bar configuration

Convert the output names specified in the "output" and "tray_output"
fields in bar blocks in i3's configuration to the referred output's
primary name. This allows specifying names other than the primary
output's name in the given fields without changing the IPC protocol.

7 years agorandr: Look up alternative output names when searching outputs
Vladimir Panteleev [Sat, 9 Sep 2017 09:23:50 +0000 (09:23 +0000)]
randr: Look up alternative output names when searching outputs

Update get_output_by_name to look at all additional names added by the
change in the previous commit, not just the primary one.

7 years agorandr: Register monitors' output names as additional i3 output names
Vladimir Panteleev [Sat, 9 Sep 2017 09:00:22 +0000 (09:00 +0000)]
randr: Register monitors' output names as additional i3 output names

In addition to the name of the monitor itself (which is still used as
the i3 output's primary name), register RandR output names associated
with the RandR monitor as alternative i3 output names.

7 years agoStore output names as a linked list
Vladimir Panteleev [Sat, 9 Sep 2017 07:37:37 +0000 (07:37 +0000)]
Store output names as a linked list

Currently, only one name is ever added, and only the first name is
ever accessed; actually using the capability to store and access
multiple names comes in the following commits.

7 years agoIntroduce output_primary_name function
Vladimir Panteleev [Sat, 9 Sep 2017 07:18:29 +0000 (07:18 +0000)]
Introduce output_primary_name function

Currently simply returns output->name, but this will make it easier to
change how output names are stored in the following commits.

Also replace reading output->name with invocations of
output_primary_name. Code which writes output->name is unchanged. Done
using a mostly mechanical replacement of output->name to
output_primary_name(output).

7 years agotestsuite: install Module::Install so that AnyEvent-I3/Makefile.PL works (#2940)
Michael Stapelberg [Tue, 12 Sep 2017 20:16:36 +0000 (22:16 +0200)]
testsuite: install Module::Install so that AnyEvent-I3/Makefile.PL works (#2940)

As per https://perlmaven.com/cant-locate-inc-module-install-in-inc, the inc/
directory should not be under version control.

fixes #2914

7 years agoFix userguide bug (#2932)
Orestis [Mon, 11 Sep 2017 19:31:29 +0000 (22:31 +0300)]
Fix userguide bug (#2932)

Fixes #2931

7 years agoMerge pull request #2928 from CyberShadow/pull-20170911-130032
Ingo Bürk [Mon, 11 Sep 2017 18:49:47 +0000 (20:49 +0200)]
Merge pull request #2928 from CyberShadow/pull-20170911-130032

docs/hacking-howto: Promote "Using git / sending patches" section