Asynchrous sane window events

This commit is contained in:
Kevin Lange 2013-04-10 00:10:00 -07:00
parent 4fa39ba510
commit 89fed507b3
2 changed files with 11 additions and 0 deletions

View File

@ -507,6 +507,16 @@ wins_packet_t * get_window_events() {
return out;
}
wins_packet_t * get_window_events_async() {
struct stat _stat;
fstat(process_windows->event_pipe, &_stat);
if (_stat.st_size >= sizeof(wins_packet_t)) {
return get_window_events();
} else {
return NULL;
}
}
/* Initial Connection */

View File

@ -188,6 +188,7 @@ void (*focus_changed_callback)(window_t *);
window_t * wins_get_window (wid_t wid);
void win_sane_events();
wins_packet_t * get_window_events();
wins_packet_t * get_window_events_async();
void resize_window_buffer_client (window_t * window, int16_t left, int16_t top, uint16_t width, uint16_t height);