From 80e2bf708d997fac81b787047769fa7cadd4bc74 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 14 Mar 2009 17:37:11 +0100 Subject: [PATCH] Send configure notify after putting a client into fullscreen mode, log at a central place --- src/handlers.c | 3 --- src/util.c | 3 +++ src/xcb.c | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/handlers.c b/src/handlers.c index a15d726e..32c4f0ba 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -455,9 +455,6 @@ int handle_configure_request(void *prophs, xcb_connection_t *conn, xcb_configure fake_configure_notify(conn, client->child_rect, client->child); - LOG("Told the client to stay at %dx%d with size %dx%d\n", - client->child_rect.x, client->child_rect.y, client->child_rect.width, client->child_rect.height); - return 1; } diff --git a/src/util.c b/src/util.c index 0a3cd060..1a2cc8c5 100644 --- a/src/util.c +++ b/src/util.c @@ -377,6 +377,9 @@ void toggle_fullscreen(xcb_connection_t *conn, Client *client) { 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"); /* Because the coordinates of the window haven’t changed, it would not be diff --git a/src/xcb.c b/src/xcb.c index 802acc81..f7f5c5f1 100644 --- a/src/xcb.c +++ b/src/xcb.c @@ -206,4 +206,6 @@ void fake_configure_notify(xcb_connection_t *conn, Rect r, xcb_window_t window) xcb_send_event(conn, false, window, XCB_EVENT_MASK_STRUCTURE_NOTIFY, (char*)&generated_event); xcb_flush(conn); + + LOG("Told the client it is at %dx%d with %dx%d\n", r.x, r.y, r.width, r.height); } -- 2.39.5