aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/swaybar/bar.h3
-rw-r--r--swaybar/bar.c5
-rw-r--r--swaybar/tray/tray.c16
3 files changed, 0 insertions, 24 deletions
diff --git a/include/swaybar/bar.h b/include/swaybar/bar.h
index 9f5bf400..010e1f84 100644
--- a/include/swaybar/bar.h
+++ b/include/swaybar/bar.h
@@ -15,9 +15,6 @@ struct bar {
15 int ipc_socketfd; 15 int ipc_socketfd;
16 int status_read_fd; 16 int status_read_fd;
17 pid_t status_command_pid; 17 pid_t status_command_pid;
18#ifdef ENABLE_TRAY
19 pid_t xembed_pid;
20#endif
21}; 18};
22 19
23struct output { 20struct output {
diff --git a/swaybar/bar.c b/swaybar/bar.c
index 5d480b63..5e87eac9 100644
--- a/swaybar/bar.c
+++ b/swaybar/bar.c
@@ -27,9 +27,6 @@ static void bar_init(struct bar *bar) {
27 bar->config = init_config(); 27 bar->config = init_config();
28 bar->status = init_status_line(); 28 bar->status = init_status_line();
29 bar->outputs = create_list(); 29 bar->outputs = create_list();
30#ifdef ENABLE_TRAY
31 bar->xembed_pid = 0;
32#endif
33} 30}
34 31
35static void spawn_status_cmd_proc(struct bar *bar) { 32static void spawn_status_cmd_proc(struct bar *bar) {
@@ -252,8 +249,6 @@ void bar_run(struct bar *bar) {
252 249
253 event_loop_poll(); 250 event_loop_poll();
254#ifdef ENABLE_TRAY 251#ifdef ENABLE_TRAY
255 tray_upkeep(bar);
256
257 dispatch_dbus(); 252 dispatch_dbus();
258#endif 253#endif
259 } 254 }
diff --git a/swaybar/tray/tray.c b/swaybar/tray/tray.c
index b2fa647e..00f1a44f 100644
--- a/swaybar/tray/tray.c
+++ b/swaybar/tray/tray.c
@@ -379,19 +379,6 @@ uint32_t tray_render(struct output *output, struct config *config) {
379 return tray_width; 379 return tray_width;
380} 380}
381 381
382void tray_upkeep(struct bar *bar) {
383 if (!bar->xembed_pid ||
384 (bar->xembed_pid == waitpid(bar->xembed_pid, NULL, WNOHANG))) {
385 pid_t pid = fork();
386 if (pid == 0) {
387 execlp("xembedsniproxy", "xembedsniproxy", NULL);
388 _exit(EXIT_FAILURE);
389 } else {
390 bar->xembed_pid = pid;
391 }
392 }
393}
394
395void init_tray(struct bar *bar) { 382void init_tray(struct bar *bar) {
396 if (!bar->config->tray_output || strcmp(bar->config->tray_output, "none") != 0) { 383 if (!bar->config->tray_output || strcmp(bar->config->tray_output, "none") != 0) {
397 /* Connect to the D-Bus */ 384 /* Connect to the D-Bus */
@@ -402,8 +389,5 @@ void init_tray(struct bar *bar) {
402 389
403 /* Start the SNI host */ 390 /* Start the SNI host */
404 init_host(); 391 init_host();
405
406 /* Start xembedsniproxy */
407 tray_upkeep(bar);
408 } 392 }
409} 393}