From 08fa56a0f476eb688f8beed411871425d9e0ca2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Mon, 21 Jun 2021 18:16:22 +0200 Subject: [PATCH] =?UTF-8?q?bar:=20set=20thread=20name=20of=20the=20bar?= =?UTF-8?q?=E2=80=99s=20own=20thread?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bar/wayland.c | 3 +++ bar/xcb.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/bar/wayland.c b/bar/wayland.c index 2b218d7..1a72577 100644 --- a/bar/wayland.c +++ b/bar/wayland.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include @@ -1015,6 +1016,8 @@ loop(struct bar *_bar, struct private *bar = _bar->private; struct wayland_backend *backend = bar->backend.data; + pthread_setname_np(pthread_self(), "bar(wayland)"); + backend->bar_expose = expose; backend->bar_on_mouse = on_mouse; diff --git a/bar/xcb.c b/bar/xcb.c index f7a3ee1..99b787d 100644 --- a/bar/xcb.c +++ b/bar/xcb.c @@ -5,6 +5,7 @@ #include #include +#include #include #include @@ -316,6 +317,8 @@ loop(struct bar *_bar, struct private *bar = _bar->private; struct xcb_backend *backend = bar->backend.data; + pthread_setname_np(pthread_self(), "bar(xcb)"); + const int fd = xcb_get_file_descriptor(backend->conn); while (true) {