|
|
@ -4,6 +4,7 @@
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <poll.h>
|
|
|
|
#include <poll.h>
|
|
|
|
#include <signal.h>
|
|
|
|
#include <signal.h>
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <sys/wait.h>
|
|
|
|
#include <sys/wait.h>
|
|
|
@ -403,8 +404,7 @@ bool bar_setup(struct swaybar *bar, const char *socket_path) {
|
|
|
|
static void display_in(int fd, short mask, void *data) {
|
|
|
|
static void display_in(int fd, short mask, void *data) {
|
|
|
|
struct swaybar *bar = data;
|
|
|
|
struct swaybar *bar = data;
|
|
|
|
if (wl_display_dispatch(bar->display) == -1) {
|
|
|
|
if (wl_display_dispatch(bar->display) == -1) {
|
|
|
|
bar_teardown(bar);
|
|
|
|
bar->running = false;
|
|
|
|
exit(0);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -439,7 +439,7 @@ void bar_run(struct swaybar *bar) {
|
|
|
|
loop_add_fd(bar->eventloop, bar->tray->fd, POLLIN, tray_in, bar->tray->bus);
|
|
|
|
loop_add_fd(bar->eventloop, bar->tray->fd, POLLIN, tray_in, bar->tray->bus);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
while (1) {
|
|
|
|
while (bar->running) {
|
|
|
|
errno = 0;
|
|
|
|
errno = 0;
|
|
|
|
if (wl_display_flush(bar->display) == -1 && errno != EAGAIN) {
|
|
|
|
if (wl_display_flush(bar->display) == -1 && errno != EAGAIN) {
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|