diff options
author | Dave Davenport <qball@gmpclient.org> | 2016-01-20 19:11:00 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2016-01-20 19:11:00 +0100 |
commit | 874f587021a32696a9fa04fe6bf9004516928c27 (patch) | |
tree | 1a35ab12fb5776e828b5c0492a6be81e67ad67f9 /source | |
parent | 348989e52ca6bb52b046deb448da05c556e9564b (diff) | |
parent | 784244a35bd208e0ac5d95f11220e103ad738ec8 (diff) |
Merge remote-tracking branch 'origin/master' into glib-loop
Diffstat (limited to 'source')
-rw-r--r-- | source/rofi.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/source/rofi.c b/source/rofi.c index 237d6227..85d5f587 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -141,32 +141,6 @@ static int switcher_get ( const char *name ) } /** - * @param display Connection to the X server. - * @param x11_fd File descriptor from the X server to listen on. - * - * Function waits for a new XEvent with a timeout. - */ -static inline MainLoopEvent wait_for_xevent_or_timeout ( Display *display, int x11_fd ) -{ - // Check if events are pending. - if ( XPending ( display ) ) { - return ML_XEVENT; - } - // If not, wait for timeout. - struct timeval tv = { .tv_usec = 200000, .tv_sec = 0 }; - fd_set in_fds; - // Create a File Description Set containing x11_fd - FD_ZERO ( &in_fds ); - FD_SET ( x11_fd, &in_fds ); - - // Wait for X Event or a Timer - if ( select ( x11_fd + 1, &in_fds, 0, 0, &tv ) == 0 ) { - return ML_TIMEOUT; - } - return ML_XEVENT; -} - -/** * Levenshtein Sorting. */ |