popup tooltip hint
This commit is contained in:
14
win.c
14
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]));
|
||||
|
||||
Reference in New Issue
Block a user