mirror of
https://github.com/swaywm/sway.git
synced 2025-10-31 22:25:26 -04:00
swaybar: Fix 100% cpu usage if dbus dies.
Currently, swaybar does not gracefully die if it detects that the dbus connection was lost. Although it's not recommended to restart dbus without restarting the compositor, it can very easily happen. In the case it does, compositor's tray should not consume 100% cpu until it has to be force killed. apply suggestions just setting the bar to not running will call teardown and unref the dbus.
This commit is contained in:
parent
63345977e2
commit
00e9a94152
3 changed files with 12 additions and 5 deletions
|
|
@ -508,7 +508,7 @@ void bar_run(struct swaybar *bar) {
|
|||
}
|
||||
#if HAVE_TRAY
|
||||
if (bar->tray) {
|
||||
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);
|
||||
}
|
||||
#endif
|
||||
while (bar->running) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue