summaryrefslogtreecommitdiffstats
path: root/client/x11/event_sources_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'client/x11/event_sources_p.h')
-rw-r--r--client/x11/event_sources_p.h20
1 files changed, 6 insertions, 14 deletions
diff --git a/client/x11/event_sources_p.h b/client/x11/event_sources_p.h
index 09703c0e..959460c2 100644
--- a/client/x11/event_sources_p.h
+++ b/client/x11/event_sources_p.h
@@ -21,24 +21,18 @@
#include "common.h"
#include "threads.h"
-#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8)
-#define USING_EVENT_FD
-#endif
-
#define INFINITE -1
-class EventWrapper;
+class EventSource;
class EventSources_p {
-public:
- void remove_wrapper(EventWrapper*);
+protected:
+ void add_event(int fd, EventSource* source);
+ void remove_event(EventSource* source);
public:
- int _epoll;
- typedef std::list<EventWrapper*> Events;
- Events _events;
-
- friend class EventWrapper;
+ std::vector<EventSource*> _events;
+ std::vector<int> _fds;
};
class Trigger_p {
@@ -49,9 +43,7 @@ public:
public:
int _event_fd;
-#ifndef USING_EVENT_FD
int _event_write_fd;
-#endif
bool _pending_int;
Mutex _lock;
};