Commit Graph

22 Commits

Author SHA1 Message Date
Tamino Bauknecht
dd1de3efbf Revert "Revert "Fix potential memory leaks""
This reverts commit 2d33c20231 and
reapplies various patches for memory leaks.
The reason for the revert was a bug for a maximum duration interval
which caused sleep_for() to cause unpredictable behavior.
2023-10-24 17:51:38 +02:00
Alexis Rouillard
2d33c20231 Revert "Fix potential memory leaks" 2023-10-22 09:44:46 +02:00
Tamino Bauknecht
a0b63d6b1e modules: use scope_exit for deletion to make code more robust 2023-10-21 11:51:18 +02:00
Yifei Teng
cd49eef229 Partially revert 3af1853260 to fix use-after-free
After upgrading to the latest release of Waybar the bar will crash
whenever I close the laptop lid. After some debugging I believe it is
because the watching added by watch_name is not being correctly canceled
using unwatch_name. After the Tray object and Host object are destroyed,
additional callbacks will become use-after-free.

Looks like commit 3af1853260 removed the
unwatch_name. I'm not sure why it did that, but it seemed dangerous.

Additionally, bus_name_id_ is created by own_name. According to that
function's documentation, the correct inverse operation is unown_name.
2023-06-30 23:25:24 -07:00
Viktar Lukashonak
a9779c2aa2 Happy Linter
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-06-06 23:06:11 +03:00
Viktar Lukashonak
3af1853260 Tray module cause error g_bus_unwatch_name()
Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
2023-06-06 23:02:36 +03:00
Alex
f2fcadbf62 refactor: lint 2022-04-06 08:37:19 +02:00
Guillaume Maudoux
047c2929c1 Use the same StatusNotifierWatcher for all trays 2020-02-19 12:06:35 +01:00
Alex
67593b8c0f Merge pull request #332 from Organic-Code/enhancement/spdlog
Adding spdlog
2019-05-20 12:07:58 +02:00
Alex
cff39bc7cf fix: remove watcher_id fixme comment as fixed on master 2019-05-20 11:56:55 +02:00
Alex
f2edc8f965 feat(Watcher): define watcher_id 2019-05-20 11:47:52 +02:00
Lucas Lazare
51be97f9aa Adding spdlog 2019-05-18 19:44:45 -04:00
Alex
d8be72e4b6 refactor: unexport tray watcher 2019-05-17 13:51:55 +02:00
Alex
362c393b1d refactor: try/catch, sigc trackable 2019-05-13 15:15:50 +02:00
Alex
b54160e02f fix(Tray): add item if not exist 2019-05-13 14:27:01 +02:00
Alex
e4756cf24e refactor: don't print an error when a watcher is already present 2019-05-10 14:56:28 +02:00
Alex
311c34ecbc feat(Bar): handle widget size changes 2019-04-24 12:37:24 +02:00
Alex
8cf19826aa fix(Tray): Unexport on exit 2019-04-19 17:03:46 +02:00
Alex
6ed8f94dab refactor: format code 2019-04-18 17:52:00 +02:00
Alex
346ec68578 refactor: format tray && partial fix for #235 2019-04-17 14:19:04 +02:00
Alexis
36652158ad refactor(tray): more cpp binding 2018-11-23 10:46:58 +01:00
Alexis
ba79b4d397 refactor(tray): cleanup and fixes 2018-11-22 15:47:23 +01:00