Fixes#4039
Crash with docking clients where the floating field is set even though
floating_enable refuses to make them floating.
See issue for example with logs.
The default `tiling` and `floating` behavior is preserved and matches
both cases.
Adds a new handler to `remanage_window` on A_I3_FLOATING_WINDOW change.
Mainly in order to `run_assignments`, this makes `for_window [floating]`
directives to work for windows which where initially opened as tiling.
Now, when floating is enabled, `for_window` will trigger correctly. Same
applies to `for_window [tiling]`.
The obvious solution of `run_assignments` after
`floating_{enable,disable}` doesn't work because `run_assignments`
modifies the parser state in src/assignments.c:51.
Fixes#3588
Co-Authored-By: Michael Stapelberg <michael@stapelberg.de>
Before this commit, large workspace numbers treated oddly:
$ i3-msg 'rename workspace to 1234567890'
# displayed in i3bar as `0`
$ i3-msg 'rename workspace to 4294967200'
$ i3-msg -t get_workspaces | jq '.[]|select(.focused).num'
-96 # int32_t overflow
$ i3-msg 'rename workspace to 99999999999999999999'
$ i3-msg -t get_workspaces | jq '.[]|select(.focused).num'
-1 # treated as unnumbered
This commit puts a consistent limit on workspace numbers. Now
workspaces with numbers beyond INT32_MAX are treated as unnumbered.
I had a dilemma about the behaviour here:
1. Prohibit focus leaving the workspace in any case unless if
get_tree_next's initial argument is a workspace. This is what this
commit does (also i3-cycle).
2. Leave the workspace if no warp is possible (eg workspace with single
container or `focus right` with `V[a b c*]`).
Fixes#2180
- Makes `tree_next` not recursive.
- Adds `focus next|prev [sibling]` command. See (1.) and (2.) in
https://github.com/i3/i3/issues/2587#issuecomment-378505551 (Issue also
requests move command, not implemented here).
- Directional focus command now supports command criteria.
Wrapping is not implemented inside a floating container. This was also
true before the refactor so I am not changing it here.
This commit should fix "move con to parent" trick (see below) in the
case when con->parent->parent is a workspace.
The trick:
mark _a, focus parent, focus parent, mark _b,
[con_mark=_a] move window to mark _b, [con_mark=_a] focus
The trick got broken in commit 626af81232
in order to fix an i3 crash (#2003). Reverting said commit fixes the
trick. The crash is caused by the fact that empty workspace isn't
considered a split (checked in src/con.c:1324), so the moved window ends
up as a sibling of the target workspace, not as its child.
This fixes the case where moving a container to a scratchpad hidden
container via a mark would cause the container to be tiling on the
__i3_scratch workspace. This still moves the container to the
__i3_scratch workspace, but properly adds it to the scratchpad so that
it becomes usable instead of requiring criteria to regain access to.
The testcase is changed because it was actually incorrect. Easy to
verify because:
> _NET_CURRENT_DESKTOP
> …
> The index of the current desktop. This is always an integer between 0
> and _NET_NUMBER_OF_DESKTOPS - 1.
Fixes#3696.
Also updates the viewports.
Finally, fixes an issue with _NET_CURRENT_DESKTOP not being updated
after a workspace rename. Example:
- workspaces 1, 2, 3
- rename workspace 1 to 5
- All workspaces changed their index but _NET_CURRENT_DESKTOP was not
updated
- Having both parse_configuration and parse_file is excessive now
- We detect if we are parsing only by checking if conn is NULL, not with
use_nagbar
- font.pattern needs to be set to NULL because it is freed in
free_font()
Fixes#3660
This is a regression from bce088679.
An other way to fix this would be to concatenate strings inside the
strtok loop when an output starts with a double quote but I'd rather
let the parser do the word splitting.
Fixes#3646
Fixes#3595
Like the issue mentions:
> instead of the newly created workspace (not referenced by variable
> here) the `"init"` event is fired with the current workspace (`ws`).
Plus, there was another issue where duplicate workspace init events
where being sent because of workspace_get().
304-ipc-workspace-init.t: Subtest "move workspace to output" fails with
current next.
Fixes#3631
No event was being sent here:
2d6e09a66a/src/randr.c (L487)
533-randr15.t: I confirmed that SKIP still works if the xrandr command
fails.
Added test fails with current next.
errx() already appends \n internally. "\n" in the error message will
result in a blank line after the message. die() is just a wrapper around
errx() so it receives the same treatment.
on_remove_child calls tree_close_internal which calls tree_render and
the tree is in an invalid state if con->parent still points to the old
parent.
Fixes#3556