Commit Graph

6157 Commits (eca8fae2de2a2f7d6a8953d5ce6e0a76c6dc1264)

Author SHA1 Message Date
hwangcc23 a34a0048a1 Add regression tests for #2846
1). Add one regression test in 167-workspace_layout.t:
    - Get a fresh workspace
    - Set the layout to something
    - Create windows
    - Try to switch to another layout
    - Check if successful
    - Repeat for all 12 possible transitions
2). Add another regression test in 167-workspace_layout.t:
    - Check that the command 'layout toggle split' works regardless of
      what layout we're using
2017-10-14 12:27:32 +03:00
Dan Elkouby c028f0cb17 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
2017-10-14 12:26:47 +03:00
Michael Stapelberg 44a6efb5b0 tests: run under Xvfb by default (if available) (#2951)
This shaves off two seconds of wall-clock time (10s → 8s).
2017-10-13 00:18:49 -07:00
Michael Stapelberg 28ca1e8529 Fix AnyEvent->timer call (#3008)
And make the remaining AnyEvent->condvar and AnyEvent->timer calls
consistent.
2017-10-05 13:03:33 -07:00
Orestis 464c158d9a dump-asy.pl: use layout instead of orientation for names (#3004) 2017-09-30 10:17:20 -07:00
Michael Stapelberg ffa228e653 Merge pull request #3005 from stapelberg/tick
Implement the tick event
2017-09-30 10:16:43 -07:00
Michael Stapelberg 21cdcdb07c 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
2017-09-30 10:16:21 -07:00
Michael Stapelberg 962750eb64 Fix memory leak when config conversion fails (#3006)
This happens on an empty config file, for example.
2017-09-30 10:15:58 -07:00
Michael Stapelberg 2bff4f1dba Synchronize with i3bar+i3, not just i3. 2017-09-30 13:04:20 +02:00
Michael Stapelberg ce21de8dde Implement the tick event
This makes our tests less flaky, shorter, and more readable.

fixes #2988
2017-09-30 11:41:57 +02:00
Michael Stapelberg 14c8cf8622 tests: implement xtest_sync_with_i3
The regular sync_with_i3 is not sufficient because i3test::XTEST uses a separate
X11 connection.
2017-09-30 11:28:20 +02:00
Michael Stapelberg c08ef36199 docs/ipc: include new Go package, reference example byteorder code (#3000) 2017-09-29 14:02:18 -07:00
Ingo Bürk 7a7481e578 Deal with UTF8 in per-workspace-layout.pl. (#2997)
fixes #2996
2017-09-28 13:12:51 -07:00
Orestis Floros af78331ee7 Use con_descend_focused for workspaces in _tree_next
This way, when changing focus between outputs, the directional focus
command will focus the focused window within the parent container that
is next in the given direction.

Previously, the next window of the given direction was focused which is
Inconsistent with changing focus inside the same output.

Fixes #1160.
2017-09-28 16:48:50 +03:00
Ingo Bürk a05773e18b Merge pull request #2992 from orestisf1993/next
i3bar: fix segfault when no status_command is provided
2017-09-27 21:47:52 +02:00
Ingo Bürk 9aa016cffd Merge pull request #2995 from orestisf1993/dump-asy-basename
dump-asy.pl: use correct tmp dirname instead of hardcoded /tmp
2017-09-27 21:46:00 +02:00
Michael Stapelberg 54d61b510d Merge pull request #2953 from CyberShadow/focus_wrapping
Add "focus_wrapping" option
2017-09-27 09:31:39 -07:00
Orestis Floros 828ce9c640 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/.
2017-09-27 15:26:33 +03:00
Orestis Floros 4257107509 i3bar: fix segfault when no status_command is provided
Fixes #2933.
2017-09-26 02:50:10 +03:00
Vladimir Panteleev 50edf495aa
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.
2017-09-25 18:58:12 +00:00
Pietro Cerutti 999bebc692 WIFEXITED needs sys/wait.h (#2989) 2017-09-25 09:11:15 -07:00
Ingo Bürk f4f3d649e2 Merge pull request #2985 from orestisf1993/next
Correct remaining string length for fill_rmlvo_from_root
2017-09-25 09:09:56 +02:00
Michael Stapelberg 89d6287110 update debian/changelog and release.sh after release (#2987) 2017-09-25 09:04:31 +02:00
Orestis Floros 65d00e0305 Correct remaining string length for fill_rmlvo_from_root
Fixes #2538.
2017-09-25 04:43:00 +03:00
Michael Stapelberg 362cbe6c5f docs/ipc: document the GET_CONFIG request (#2984)
This was neglected in commit a6d8ed9b1a

related to #2856
2017-09-24 17:25:41 +02:00
Michael Stapelberg 55bc674179 Merge pull request #2981 from stapelberg/https
Replace http:// with https:// where applicable
2017-09-24 13:11:01 +02:00
Michael Stapelberg 7ad32fd2d1 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
2017-09-24 10:19:50 +02:00
Michael Stapelberg d968d39b27 Replace http:// with https:// where applicable
The testcases will be updated automatically in a separate commit.
2017-09-24 10:19:07 +02:00
Ingo Bürk 9fe508b791 Merge pull request #2977 from orestisf1993/issue-1627
Check container existance during drag events
2017-09-23 10:40:34 +02:00
Ingo Bürk 4ad9199a5c Merge pull request #2978 from orestisf1993/issue-2572
Issue 2572
2017-09-23 10:21:16 +02:00
Orestis Floros 414d23fb7a 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
2017-09-23 11:19:56 +03:00
Orestis Floros be9a2bb7f8 Add con_exists function
Checks the all_cons queue and returns true if a given con is found.
2017-09-23 03:22:20 +03:00
Orestis Floros 76214b04e8 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
2017-09-23 02:41:58 +03:00
Vladimir Panteleev 28f7e14650
Add "focus_wrapping" option
Fixes #2352.
2017-09-22 23:40:41 +00:00
Martin T. H. Sandsmark bf7aeced30 Don't put new floating windows on top unless they're focused 2017-09-22 21:45:28 +03:00
Ingo Bürk dd13cae5c0 Merge pull request #2959 from orestisf1993/issue-2764
Allow assign to output
2017-09-22 16:24:26 +02:00
Vladimir Panteleev 536f60e230
docs/userguide: Update description of focus wrapping
Focus wrapping applies to all kinds of containers, not just
tabbed/stacked ones.
2017-09-21 15:32:44 +00:00
Michael Stapelberg 919e66399b Merge pull request #2970 from CyberShadow/i3bar-primary-output
Do not canonicalize special output names
2017-09-19 18:57:55 +02:00
Vladimir Panteleev 760b2e1b4a
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".
2017-09-19 14:57:08 +00:00
Vladimir Panteleev caae4db0bc
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.
2017-09-19 14:57:08 +00:00
Vladimir Panteleev 19b00346e5
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.
2017-09-19 14:57:08 +00:00
Vladimir Panteleev 755b223278
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.
2017-09-19 14:57:03 +00:00
Orestis a3a7d04a43 291-swap.t: make tests fail less (#2964) 2017-09-18 18:02:38 +02:00
Michael Stapelberg 8e5731bde8 ipc: document how to detect i3’s byte order in memory-safe languages (#2961)
related to issue #2958
2017-09-18 17:15:28 +02:00
Michael Stapelberg e48441ecbd Bugfix: avert crash by fixing focus when creating output containers (#2966)
fixes #2854
2017-09-18 16:37:34 +02:00
Michael Stapelberg d1296cd1cf Bugfix: don’t invalidate layout upon invalid 'layout toggle' params (#2965)
fixes #2903
2017-09-18 16:36:57 +02:00
Michael Stapelberg 39415fe16d docs/ipc: "urgent": complete the list of container types (#2967)
Thanks chressie!
2017-09-18 16:36:34 +02:00
Kent Fredric 54a7e559ed Migrate tooling to ExtUtils::MakeMaker (#2963) 2017-09-18 13:03:54 +02:00
Michael Stapelberg 607e97e651 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.
2017-09-17 15:25:00 +02:00
Orestis Floros a35854ddf4 Allow assign to output
Implements the "assign" part of issue #2764.
2017-09-17 15:37:17 +03:00