X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=spectrwm.c;h=1f88aa2c091f473c83811d9b5bba9c1cab9f1faf;hb=619a0bfe958d5016364cb4bb89b0c130eb57991b;hp=d63e6e8accdd43e107241600dd4c1d12ff1eb80c;hpb=b3f747ce9668befedc5399fb8f4623e66d6163e2;p=spectrwm.git diff --git a/spectrwm.c b/spectrwm.c index d63e6e8..1f88aa2 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -1502,10 +1502,11 @@ int urgent[SWM_WS_MAX]; void bar_urgent(char *s, size_t sz) { - XWMHints *wmh = NULL; struct ws_win *win; int i, j, num_screens; char b[8]; + xcb_get_property_cookie_t c; + xcb_wm_hints_t hints; for (i = 0; i < workspace_limit; i++) urgent[i] = 0; @@ -1514,13 +1515,12 @@ bar_urgent(char *s, size_t sz) for (i = 0; i < num_screens; i++) for (j = 0; j < workspace_limit; j++) TAILQ_FOREACH(win, &screens[i].ws[j].winlist, entry) { - wmh = XGetWMHints(display, win->id); - if (wmh == NULL) + c = xcb_get_wm_hints(conn, win->id); + if (xcb_get_wm_hints_reply(conn, c, + &hints, NULL) == 0) continue; - - if (wmh->flags & XUrgencyHint) + if (hints.flags & XCB_WM_HINT_X_URGENCY) urgent[j] = 1; - XFree(wmh); } for (i = 0; i < workspace_limit; i++) {