LOG("Re-inserted the client into the matrix.\n");
con->currently_focused = client;
+ /* Ensure that it is below all floating clients */
+ Client *first_floating = TAILQ_FIRST(&(client->workspace->floating_clients));
+ if (first_floating != TAILQ_END(&(client->workspace->floating_clients))) {
+ LOG("Setting below floating\n");
+ uint32_t values[] = { first_floating->frame, XCB_STACK_MODE_BELOW };
+ xcb_configure_window(conn, client->frame, XCB_CONFIG_WINDOW_SIBLING | XCB_CONFIG_WINDOW_STACK_MODE, values);
+ }
+
render_container(conn, con);
xcb_flush(conn);
SLIST_INSERT_HEAD(&(new->container->workspace->focus_stack), new, focus_clients);
/* Ensure that it is below all floating clients */
- Client *first_floating;
- SLIST_FOREACH(first_floating, &(new->container->workspace->focus_stack), focus_clients)
- if (first_floating->floating >= FLOATING_AUTO_ON)
- break;
-
- if (first_floating != SLIST_END(&(new->container->workspace->focus_stack))) {
+ Client *first_floating = TAILQ_FIRST(&(new->workspace->floating_clients));
+ if (first_floating != TAILQ_END(&(new->workspace->floating_clients))) {
LOG("Setting below floating\n");
uint32_t values[] = { first_floating->frame, XCB_STACK_MODE_BELOW };
xcb_configure_window(conn, new->frame, XCB_CONFIG_WINDOW_SIBLING | XCB_CONFIG_WINDOW_STACK_MODE, values);