]> git.sur5r.net Git - i3/i3/log
i3/i3
6 years agofloating_maybe_reassign_ws: show workspace before focusing
Orestis Floros [Sat, 9 Dec 2017 13:35:05 +0000 (15:35 +0200)]
floating_maybe_reassign_ws: show workspace before focusing

With this change i3 will correctly switch to the focused workspace.
This fixes bug with moving floating windows with 'move <direction>' or by dragging like _NET_CURRENT_DESKTOP not getting updated or 'workspace back_and_forth' not working.

Fixes #2921.

6 years agoMerge pull request #3073 from veselov/i3-3072
Ingo Bürk [Sat, 9 Dec 2017 14:34:13 +0000 (15:34 +0100)]
Merge pull request #3073 from veselov/i3-3072

Fixes #3072, Xft.dpi can be floating point

6 years agoFixes #3072, Xft.dpi can be floating point 3073/head
Pawel S. Veselov [Sat, 9 Dec 2017 14:12:25 +0000 (15:12 +0100)]
Fixes #3072, Xft.dpi can be floating point

6 years agoMerge pull request #3070 from orestisf1993/issue-3068
Ingo Bürk [Fri, 8 Dec 2017 13:29:17 +0000 (14:29 +0100)]
Merge pull request #3070 from orestisf1993/issue-3068

Add '--release' flag for bindsym in the bar block

6 years agoAdd '--release' flag for bindsym in the bar block 3070/head
Orestis Floros [Fri, 8 Dec 2017 00:23:15 +0000 (02:23 +0200)]
Add '--release' flag for bindsym in the bar block

i3bar's handle_button is modified to also handle XCB_BUTTON_RELEASE
events. During these button release events, only custom commands are
checked to avoid sending multiple workspace ipc messages.

The way this patch is implemented will allow to assign a custom command
for both the press and release of the same button:
bar {
  ...
  bindsym buttonX exec command1
  bindsym --release buttonX exec command2
}

Fixes #3068.

6 years agoMerge pull request #3066 from orestisf1993/xvfb-opt
Ingo Bürk [Tue, 5 Dec 2017 06:29:10 +0000 (07:29 +0100)]
Merge pull request #3066 from orestisf1993/xvfb-opt

complete-run.pl: accept the xvfb option from command line

6 years agocomplete-run.pl: accept the xvfb option from command line 3066/head
Orestis Floros [Mon, 4 Dec 2017 22:22:14 +0000 (00:22 +0200)]
complete-run.pl: accept the xvfb option from command line

6 years agoMerge pull request #3022 from orestisf1993/i3bar-leaks
Ingo Bürk [Sun, 3 Dec 2017 18:51:25 +0000 (19:51 +0100)]
Merge pull request #3022 from orestisf1993/i3bar-leaks

Fix i3bar leaks

6 years agoi3bar: free output data structures 3022/head
Orestis Floros [Tue, 26 Sep 2017 11:50:26 +0000 (14:50 +0300)]
i3bar: free output data structures

6 years agoMerge pull request #3065 from orestisf1993/issue-3064
Ingo Bürk [Sun, 3 Dec 2017 17:46:34 +0000 (18:46 +0100)]
Merge pull request #3065 from orestisf1993/issue-3064

Skip internal workspaces with 'move workspace to output'

6 years agoSkip internal workspaces with 'move workspace to output' 3065/head
Orestis Floros [Fri, 1 Dec 2017 14:12:43 +0000 (16:12 +0200)]
Skip internal workspaces with 'move workspace to output'

Fixes #3064.

6 years agoMerge pull request #3058 from d-e-s-o/fix-FREE
Ingo Bürk [Wed, 29 Nov 2017 07:33:27 +0000 (08:33 +0100)]
Merge pull request #3058 from d-e-s-o/fix-FREE

do not check for NULL in FREE macro

6 years agoPerform proper cleanup for signals with 'Term' action (#3057)
Daniel Mueller [Wed, 29 Nov 2017 07:29:47 +0000 (23:29 -0800)]
Perform proper cleanup for signals with 'Term' action (#3057)

Issue #3049 describes a case where terminating i3 by means of SIGTERM
causes it to leak the runtime directory and all its contents. There are
multiple issues at play: first, any cleanup handlers registered via
atexit are never invoked when a signal terminates the program (see
atexit(3)). Hence, the log SHM log cleanup performed in i3_exit is not
invoked in that case. Second, compared to the shutdown path for the
'exit' command, we do not unlink the UNIX domain socket we create,
causing it to be leaked as well. Third, a handler for SIGTERM is not
registered at all despite handle_signal claiming to be the handler for
all 'Term' signals.
This change addresses all three problems and results in a graceful exit
including cleanup to happen when we receive a signal with the default
action 'Term'. It addresses issue #3049.

6 years agoMerge pull request #3052 from d-e-s-o/remove-magic-numbers
Ingo Bürk [Wed, 29 Nov 2017 07:22:51 +0000 (08:22 +0100)]
Merge pull request #3052 from d-e-s-o/remove-magic-numbers

i3bar: replace magic numbers with more meaningful constructs

6 years agoMerge pull request #3059 from stapelberg/debuglog
Michael Stapelberg [Mon, 27 Nov 2017 07:34:10 +0000 (23:34 -0800)]
Merge pull request #3059 from stapelberg/debuglog

i3-dump-log: enable shmlog on demand

6 years agoshmlog: remote atom when disabled 3059/head
Michael Stapelberg [Sun, 26 Nov 2017 17:07:13 +0000 (18:07 +0100)]
shmlog: remote atom when disabled

6 years agoi3-dump-log: enable shmlog on demand
Michael Stapelberg [Sun, 26 Nov 2017 16:26:40 +0000 (17:26 +0100)]
i3-dump-log: enable shmlog on demand

fixes #3055

6 years agono-op refactoring: make ipc_connect find socket path
Michael Stapelberg [Sun, 26 Nov 2017 15:41:59 +0000 (16:41 +0100)]
no-op refactoring: make ipc_connect find socket path

7 years agodo not check for NULL in FREE macro 3058/head
Daniel Mueller [Thu, 23 Nov 2017 23:41:33 +0000 (15:41 -0800)]
do not check for NULL in FREE macro

free(3) is safe to invoke on a NULL pointer, in which case no action is
taken. This change adjusts the FREE macros to omit this unnecessary
check.

7 years agoMerge pull request #3050 from d-e-s-o/fix-typo
Ingo Bürk [Sat, 18 Nov 2017 18:19:25 +0000 (19:19 +0100)]
Merge pull request #3050 from d-e-s-o/fix-typo

fix typo in src/main.c

7 years agofix typo in src/main.c 3050/head
Daniel Mueller [Sat, 18 Nov 2017 17:48:38 +0000 (09:48 -0800)]
fix typo in src/main.c

7 years agoi3bar: replace magic numbers with more meaningful constructs 3052/head
Daniel Mueller [Fri, 17 Nov 2017 14:58:12 +0000 (06:58 -0800)]
i3bar: replace magic numbers with more meaningful constructs

In i3bar/src/config.c we compare string lengths agains magic numbers.
This change replaces those numbers with the lengths of the strings they
represent.

7 years agoMerge pull request #3041 from d-e-s-o/update-userguide
Ingo Bürk [Fri, 17 Nov 2017 14:09:50 +0000 (15:09 +0100)]
Merge pull request #3041 from d-e-s-o/update-userguide

docs/userguide: Correct mark/goto i3-input commands

7 years agoMerge pull request #3040 from jchook/next
Ingo Bürk [Mon, 13 Nov 2017 21:01:06 +0000 (22:01 +0100)]
Merge pull request #3040 from jchook/next

$mod+r toggles resize mode

7 years agoMerge pull request #3042 from Mayeu/kitty-terminal
Ingo Bürk [Sun, 12 Nov 2017 12:38:52 +0000 (13:38 +0100)]
Merge pull request #3042 from Mayeu/kitty-terminal

add the kitty terminal in i3-sensible-terminal

7 years agoadd the kitty terminal in i3-sensible-terminal 3042/head
Cast [Sun, 12 Nov 2017 08:48:21 +0000 (16:48 +0800)]
add the kitty terminal in i3-sensible-terminal

7 years agodocs/userguide: Correct mark/goto i3-input commands 3041/head
Daniel Mueller [Sun, 12 Nov 2017 01:06:43 +0000 (17:06 -0800)]
docs/userguide: Correct mark/goto i3-input commands

The userguide still mentions an old 'goto' command which no longer
exists and will be ignored silently (when used in the i3 config) or
causes an error to be reported (when invoked from the command line).
This change updates the userguide to correct this problem. In addition
to that it also updates the i3-input command shown to no longer use the
deprecated -p flag but -F instead.

7 years agoBugfix: avert endless loop on unexpected EOF at ipc messages (#3021)
xzfc [Thu, 9 Nov 2017 19:18:23 +0000 (02:18 +0700)]
Bugfix: avert endless loop on unexpected EOF at ipc messages (#3021)

Fix freeze on invalid ipc commands like

    echo -n $'i3-ipc\0\0\0\xa\0\0\0\0focus left' | socat - `i3 --get-socketpath`

Also, treat incomplete headers as IPC violation. Example of incomplete header:

    echo -n i3-ip | socat - `i3 --get-socketpath`

7 years agoMerge pull request #2980 from orestisf1993/issue-1160-pr
Ingo Bürk [Sun, 5 Nov 2017 16:42:31 +0000 (17:42 +0100)]
Merge pull request #2980 from orestisf1993/issue-1160-pr

Use con_descend_focused for workspaces in _tree_next

7 years agoMerge pull request #3030 from tylerbrazier/next
Ingo Bürk [Sun, 5 Nov 2017 16:37:53 +0000 (17:37 +0100)]
Merge pull request #3030 from tylerbrazier/next

config: use ascii single quote

7 years agoMerge pull request #3023 from orestisf1993/issue-2816
Ingo Bürk [Sun, 5 Nov 2017 16:27:48 +0000 (17:27 +0100)]
Merge pull request #3023 from orestisf1993/issue-2816

Add support to resize floating container in percentage

7 years ago$mod+r toggles resize mode 3040/head
Wes Roberts [Tue, 31 Oct 2017 01:19:12 +0000 (21:19 -0400)]
$mod+r toggles resize mode

7 years agoconfig: use ascii single quote 3030/head
Tyler Brazier [Wed, 25 Oct 2017 20:26:44 +0000 (15:26 -0500)]
config: use ascii single quote

The unicode quote doesn’t render very well in terminals that don't
support unicode

7 years agoMerge pull request #3028 from stapelberg/flakes2
Michael Stapelberg [Wed, 25 Oct 2017 06:56:02 +0000 (08:56 +0200)]
Merge pull request #3028 from stapelberg/flakes2

Eliminate causes of flakyness

7 years agoMove XCB event handling into xcb_prepare_cb. 3028/head
Michael Stapelberg [Tue, 3 Oct 2017 08:03:29 +0000 (10:03 +0200)]
Move XCB event handling into xcb_prepare_cb.

Previously, we used ev_check watchers, which are executed at the beginning of an
event loop iteration.

This was problematic if one of the handlers happened to fill the XCB event
queue, e.g. by reading a reply from X11 and an event happened in the meantime.

In that situation, we would hand control to the event loop, entirely ignoring
the pending event. This would manifest itself as a 1-minute hang,
reproducible (sometimes) in the i3 testsuite.

issue #2790 describes an instance of this issue in i3bar, and we fixed that by
changing the watcher priority to run last. Handling events in xcb_prepare_cb has
the same effect, as ev_prepare watchers are run just before the event loop goes
to sleep.

7 years agot/525: remove flaky focus check
Michael Stapelberg [Tue, 3 Oct 2017 15:16:34 +0000 (17:16 +0200)]
t/525: remove flaky focus check

7 years agoi3test: blockingly wait for events
Michael Stapelberg [Tue, 3 Oct 2017 08:02:41 +0000 (10:02 +0200)]
i3test: blockingly wait for events

…as polling the xcb file descriptor directly is not reliable.

7 years agoskip ConfigureNotify events with --force_xinerama
Michael Stapelberg [Tue, 3 Oct 2017 08:00:55 +0000 (10:00 +0200)]
skip ConfigureNotify events with --force_xinerama

This prevents an i3 crash under certain conditions when running the tests.

7 years agoi3test: reliably warp the pointer to (0, 0) before tests start
Michael Stapelberg [Tue, 3 Oct 2017 08:00:05 +0000 (10:00 +0200)]
i3test: reliably warp the pointer to (0, 0) before tests start

7 years agotests: add sync_with_i3 after open_window
Michael Stapelberg [Tue, 3 Oct 2017 07:58:10 +0000 (09:58 +0200)]
tests: add sync_with_i3 after open_window

We need to set dont_map => 1 on the sync window to prevent an endless loop.

Further, t/219-ipc-window-focus.t made assumptions about windows being named
incrementally, and that assumption is broken by the sync window opened by the
first sync_with_i3 call from open_window, so use the more reliable ->name.

7 years ago_NET_ACTIVE_WINDOW: invalidate focus to force SetInputFocus call (#3027)
Michael Stapelberg [Sun, 22 Oct 2017 20:16:15 +0000 (22:16 +0200)]
_NET_ACTIVE_WINDOW: invalidate focus to force SetInputFocus call (#3027)

The sender of the _NET_ACTIVE_WINDOW client message might know better when to
set focus than i3, as i3 does not know about unmanaged (override_redirect=1)
windows.

related to https://github.com/i3/i3lock/issues/35

7 years agoAdd support to resize floating container in percentage 3023/head
Orestis Floros [Tue, 17 Oct 2017 23:04:42 +0000 (02:04 +0300)]
Add support to resize floating container in percentage

resize set is modified to accept both 'px' and 'ppt' height and width.

Fixes #2816.

7 years agoi3bar: avoid possible va_args leak
Orestis Floros [Tue, 26 Sep 2017 09:29:40 +0000 (12:29 +0300)]
i3bar: avoid possible va_args leak

7 years agoi3bar: free fontname
Orestis Floros [Tue, 26 Sep 2017 09:30:03 +0000 (12:30 +0300)]
i3bar: free fontname

7 years agoMerge pull request #2849 from Streetwalrus/next
Ingo Bürk [Sun, 15 Oct 2017 20:23:40 +0000 (22:23 +0200)]
Merge pull request #2849 from Streetwalrus/next

Create a new split container when switching a workspace container to split layout

7 years agodocs: full-size, so-called (#3019)
Michael Stapelberg [Sun, 15 Oct 2017 12:22:41 +0000 (14:22 +0200)]
docs: full-size, so-called (#3019)

As per Michael Siegel, who studied the English language :).

7 years agouserguide: explain why Mod4 is usually preferred (#3018)
Michael Stapelberg [Sun, 15 Oct 2017 10:17:22 +0000 (12:17 +0200)]
userguide: explain why Mod4 is usually preferred (#3018)

7 years agoDefault to L_SPLITH with toggle split when last_split_layout hasn't been initialized 2849/head
Dan Elkouby [Thu, 12 Oct 2017 20:44:25 +0000 (23:44 +0300)]
Default to L_SPLITH with toggle split when last_split_layout hasn't been initialized

7 years agoAdd regression tests for #2846
hwangcc23 [Sun, 6 Aug 2017 15:08:05 +0000 (23:08 +0800)]
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

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 agoUse con_descend_focused for workspaces in _tree_next 2980/head
Orestis Floros [Sun, 24 Sep 2017 07:05:04 +0000 (10:05 +0300)]
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.

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