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:
@ -841,12 +841,13 @@ static void handle_client_message(xcb_client_message_event_t *event) {
|
||||
* let's float it and make it sticky. */
|
||||
DLOG("The window was requested to be visible on all workspaces, making it sticky and floating.\n");
|
||||
|
||||
floating_enable(con, false);
|
||||
con->floating = FLOATING_AUTO_ON;
|
||||
if (floating_enable(con, false)) {
|
||||
con->floating = FLOATING_AUTO_ON;
|
||||
|
||||
con->sticky = true;
|
||||
ewmh_update_sticky(con->window->id, true);
|
||||
output_push_sticky_windows(focused);
|
||||
con->sticky = true;
|
||||
ewmh_update_sticky(con->window->id, true);
|
||||
output_push_sticky_windows(focused);
|
||||
}
|
||||
} else {
|
||||
Con *ws = ewmh_get_workspace_by_index(index);
|
||||
if (ws == NULL) {
|
||||
|
Reference in New Issue
Block a user