- client->fullscreen = true;
- workspace->fullscreen_client = client;
- LOG("Entering fullscreen mode...\n");
- /* We just entered fullscreen mode, let’s configure the window */
- uint32_t mask = XCB_CONFIG_WINDOW_X |
- XCB_CONFIG_WINDOW_Y |
- XCB_CONFIG_WINDOW_WIDTH |
- XCB_CONFIG_WINDOW_HEIGHT;
- uint32_t values[4] = {workspace->rect.x,
- workspace->rect.y,
- workspace->rect.width,
- workspace->rect.height};
-
- LOG("child itself will be at %dx%d with size %dx%d\n",
- values[0], values[1], values[2], values[3]);
-
- xcb_configure_window(conn, client->frame, mask, values);
-
- /* Child’s coordinates are relative to the parent (=frame) */
- values[0] = 0;
- values[1] = 0;
- xcb_configure_window(conn, client->child, mask, values);
-
- /* Raise the window */
- values[0] = XCB_STACK_MODE_ABOVE;
- xcb_configure_window(conn, client->frame, XCB_CONFIG_WINDOW_STACK_MODE, values);
-
- Rect child_rect = workspace->rect;
- child_rect.x = child_rect.y = 0;
- fake_configure_notify(conn, child_rect, client->child);
- } else {
- LOG("leaving fullscreen mode\n");
- client->fullscreen = false;
- workspace->fullscreen_client = NULL;
- /* Because the coordinates of the window haven’t changed, it would not be
- re-configured if we don’t set the following flag */
- client->force_reconfigure = true;
- /* We left fullscreen mode, redraw the whole layout to ensure enternotify events are disabled */
- render_layout(conn);