Extend tiling/floating criteria with optional auto/user values (#4006)

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>
This commit is contained in:
Orestis Floros
2020-04-12 13:49:08 +02:00
committed by GitHub
parent e7191af8b3
commit ae757c6848
9 changed files with 216 additions and 26 deletions

View File

@ -530,7 +530,11 @@ struct Match {
} dock;
xcb_window_t id;
enum { WM_ANY = 0,
WM_TILING_AUTO,
WM_TILING_USER,
WM_TILING,
WM_FLOATING_AUTO,
WM_FLOATING_USER,
WM_FLOATING } window_mode;
Con *con_id;