+
+ if (!client_is_floating(client))
+ return;
+
+ /* If the client is floating, we need to check if we moved it to a different workspace */
+ if (client->workspace->screen == (screen = get_screen_containing(client->rect.x, client->rect.y)))
+ return;
+
+ if (screen == NULL) {
+ LOG("Boundary checking disabled, no screen found for (%d, %d)\n", client->rect.x, client->rect.y);
+ return;
+ }
+
+ LOG("Client is on workspace %p with screen %p\n", client->workspace, client->workspace->screen);
+ LOG("but screen at %d, %d is %p\n", client->rect.x, client->rect.y, screen);
+ floating_assign_to_workspace(client, &workspaces[screen->current_workspace]);
+ LOG("fixed that\n");