From 795353609bbc8d631d32120458c486577898680b Mon Sep 17 00:00:00 2001 From: Hojun-Cho Date: Thu, 28 May 2026 20:22:27 +0900 Subject: [PATCH] popup tooltip hint --- win.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/win.c b/win.c index 062ad6d..f535b39 100644 --- a/win.c +++ b/win.c @@ -31,6 +31,8 @@ wininit(void) { int n; u32int mask, vals[4]; + xcb_intern_atom_cookie_t c1, c2; + xcb_intern_atom_reply_t *r1, *r2; conn = xcb_connect(nil, &n); if(conn == nil || xcb_connection_has_error(conn)) @@ -49,6 +51,18 @@ wininit(void) xcb_create_window(conn, XCB_COPY_FROM_PARENT, win, scr->root, 0, 0, 1, 1, 0, XCB_WINDOW_CLASS_INPUT_OUTPUT, scr->root_visual, mask, vals); + c1 = xcb_intern_atom(conn, 0, + strlen("_NET_WM_WINDOW_TYPE"), "_NET_WM_WINDOW_TYPE"); + c2 = xcb_intern_atom(conn, 0, + strlen("_NET_WM_WINDOW_TYPE_TOOLTIP"), + "_NET_WM_WINDOW_TYPE_TOOLTIP"); + r1 = xcb_intern_atom_reply(conn, c1, nil); + r2 = xcb_intern_atom_reply(conn, c2, nil); + if(r1 != nil && r2 != nil) + xcb_change_property(conn, XCB_PROP_MODE_REPLACE, + win, r1->atom, XCB_ATOM_ATOM, 32, 1, &r2->atom); + free(r1); + free(r2); gc = xcb_generate_id(conn); xcb_create_gc(conn, gc, win, 0, nil); img = emalloc(Imgw * Imgh * sizeof(img[0]));