Commit Graph

11 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 a73669be6a
modules/upower: use smart pointer to avoid memory leak 2023-10-21 11:50:28 +02:00
zjeffer 7ef80d563b Formatting fixes 2023-07-04 19:48:04 +02:00
André Aparício a1cd0acac5 Fix random segfault on GTK icon functions
The segfaults were happening on GTK icon theme functions, which are
called via the C++ interface functions such as Gtk::IconTheme::has_icon.

There are multiple modules and threads using this functions on the default
icon theme by calling Gtk::IconTheme::get_default(), which returns the same
object for all callers, and was causing concurrent access to the same internal
data structures on the GTK lib. Even a seemingly read-only function such as
has_icon can cause writes due to the internal icon cache being updated.

To avoid this issues, a program wide global mutex must be used to ensure
a single thread is accessing the default icon theme instance.

This commit implements wrappers for the existing IconTheme function calls,
ensuring the global lock is held while calling the underling GTK functions.
2023-07-03 22:32:24 +01:00
Bryan Waite 67ab269706
Fixing memory leak on update UPower tooltip 2023-02-08 17:19:51 +11:00
Alex f2fcadbf62 refactor: lint 2022-04-06 08:37:19 +02:00
Erik Reider 0140606226 Fixed segfault on upower service restart 2022-03-25 16:57:25 +01:00
Erik Reider 84dc82e1c1 Added tooltip-padding 2022-03-21 13:50:46 +01:00
Erik Reider c4282cfacc Made tooltip getDeviceIcon return const string 2022-03-19 19:22:21 +01:00
Erik Reider 7fac2afb85 Added custom tooltip with device icon, device name and battery status 2022-03-19 17:09:55 +01:00