Only set FLOATING_AUTO_ON when floating_enable succeeds

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.
This commit is contained in:
Orestis Floros
2020-04-27 13:10:15 +02:00
parent 4d55bba7f8
commit 5e2f13a28c
5 changed files with 85 additions and 12 deletions

View File

@ -25,7 +25,7 @@ typedef enum { BORDER_LEFT = (1 << 0),
* floating_windows list of the workspace.
*
*/
void floating_enable(Con *con, bool automatic);
bool floating_enable(Con *con, bool automatic);
/**
* Disables floating mode for the given container by re-attaching the container