Merge pull request #4041 from orestisfl/floating_enable-bool

Only set FLOATING_AUTO_ON when floating_enable succeeds
This commit is contained in:
Ingo Bürk
2020-04-30 09:04:22 +02:00
committed by GitHub
5 changed files with 85 additions and 12 deletions

View File

@ -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) {