forked from external/yambar
bar: set thread name of the bar’s own thread
This commit is contained in:
parent
371bfb4065
commit
08fa56a0f4
2 changed files with 6 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
|||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
#include <poll.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include <sys/mman.h>
|
||||
#include <linux/memfd.h>
|
||||
|
@ -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;
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include <unistd.h>
|
||||
#include <poll.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include <pixman.h>
|
||||
#include <xcb/xcb.h>
|
||||
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue