From 9397e9e5721e7b4cd71d624ac97f1addcda43b27 Mon Sep 17 00:00:00 2001 From: Zedhugh Chen Date: Mon, 25 Aug 2025 16:43:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=20log=20=E4=BF=A1=E6=81=AF=E4=B8=AD?= =?UTF-8?q?=20window=20=E7=BB=9F=E4=B8=80=E6=98=BE=E7=A4=BA=E4=B8=BA=2016?= =?UTF-8?q?=20=E8=BF=9B=E5=88=B6=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 8c45c37..e8c02f8 100644 --- a/src/main.c +++ b/src/main.c @@ -550,7 +550,10 @@ void map_request(map_request_event_t *event) { void unmap_notify(unmap_notify_event_t *event) { client_t *c = get_client_of_window(event->window); + logger("unmap window: 0x%x, send event: %s\n", event->window, + event->send_event ? "true" : "false"); if (c) { + print_client(c); if (event->send_event) { set_window_state(event->window, wm_state_withdrawn); } else { @@ -610,10 +613,14 @@ void focus_in(focus_in_event_t *event) { } void property_notify(property_notify_event_t *event) { + logger("window: 0x%x state: %u, atom: %u\n", event->window, event->state, + event->xcb_atom); if (event->state == property_delete) return; client_t *c = get_client_of_window(event->window); if (!c) return; + print_client(c); + switch (event->xcb_atom) { case XCB_ATOM_WM_TRANSIENT_FOR: { xcb_window_t transient_for; @@ -647,7 +654,7 @@ void manage_window(xcb_window_t window) { c->border_width = border_px; update_client_name(c); - logger("== manage window: %u\n", window); + logger("== manage window: 0x%x\n", window); logger("== x: %d, y: %d, w: %u, h: %u, bw: %u\n", c->x, c->y, c->width, c->height, c->border_width);