commit 17eb16ae5e5e7d512f28cc064b9dc3edc7fbc6d1
parent b3a976cb8b16b2b40d49b11e703e83ae9d9f5279
Author: Kebigon <git@kebigon.xyz>
Date: Sun, 16 Aug 2020 15:39:16 +0900
Focus on the client once the window is mapped, solve input focus issue for new client
Diffstat:
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/kbgwm.c b/kbgwm.c
@@ -357,10 +357,6 @@ void client_create(xcb_window_t id)
client_sanitize_dimensions(new_client);
- focus_unfocus();
- client_add(new_client);
- focus_apply();
-
printf("new window: id=%d x=%d y=%d width=%d height=%d min_width=%d min_height=%d max_width=%d max_height=%d\n", id,
new_client->x, new_client->y, new_client->width, new_client->height, new_client->min_width, new_client->min_height,
new_client->max_width, new_client->max_height);
@@ -373,6 +369,11 @@ void client_create(xcb_window_t id)
xcb_flush(c);
free(geometry);
+
+ focus_unfocus();
+ client_add(new_client);
+ focus_apply();
+
printf("client_create: done\n");
}