Commit Graph

8 Commits

Author SHA1 Message Date
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
Elyes Haouas 1af25094b7 Fix some typos
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2023-02-25 09:55:04 +01:00
Aleksei Bavshin ea17a66dfc
fix: compilation errors with cpp_std=c++20
There were two main issues with fmtlib and C++20 mode:

 - `fmt::format` defaults to compile-time argument checking and requires
   using `fmt::runtime(format_string)` to bypass that.
 - `std::format` implementation introduces conflicting declarations and
   we have to specify the namespace for all `format`/`format_to` calls.
2023-01-20 22:50:02 -08:00
Erik Reider 1ceaff27c2 Fixed gamemode module segfaulting when disconnecting monitor 2022-10-20 12:38:52 +02:00
Erik Reider f4f2989e85 Added tooltip-format 2022-05-21 12:02:45 +02:00
Erik Reider 8d4c7176f8 Renamed not-running-bide to hide-not-running 2022-05-21 12:02:35 +02:00
Erik Reider 3411236697 Initial implementation 2022-05-13 21:30:45 +02:00