refactor(sway): use shared ScopedFd for IPC sockets
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "ipc.hpp"
|
||||
#include "util/SafeSignal.hpp"
|
||||
#include "util/sleeper_thread.hpp"
|
||||
#include "util/scoped_fd.hpp"
|
||||
|
||||
namespace waybar::modules::sway {
|
||||
|
||||
@@ -45,8 +46,8 @@ class Ipc {
|
||||
struct ipc_response send(int fd, uint32_t type, const std::string& payload = "");
|
||||
struct ipc_response recv(int fd);
|
||||
|
||||
int fd_;
|
||||
int fd_event_;
|
||||
util::ScopedFd fd_;
|
||||
util::ScopedFd fd_event_;
|
||||
std::mutex mutex_;
|
||||
util::SleeperThread thread_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user