socket2: move to the wayland event loop
This commit is contained in:
parent
1742605eb8
commit
f7a3453487
2 changed files with 67 additions and 50 deletions
|
|
@ -21,6 +21,11 @@ class CEventManager {
|
|||
|
||||
std::thread m_tThread;
|
||||
|
||||
int m_iSocketFD = -1;
|
||||
|
||||
int onSocket2Write(int fd, uint32_t mask);
|
||||
int onFDWrite(int fd, uint32_t mask);
|
||||
|
||||
private:
|
||||
void flushEvents();
|
||||
|
||||
|
|
@ -28,6 +33,8 @@ class CEventManager {
|
|||
std::deque<SHyprIPCEvent> m_dQueuedEvents;
|
||||
|
||||
std::deque<std::pair<int, wl_event_source*>> m_dAcceptedSocketFDs;
|
||||
|
||||
wl_event_source* m_pEventSource = nullptr;
|
||||
};
|
||||
|
||||
inline std::unique_ptr<CEventManager> g_pEventManager;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue