Пример #1
0
static void
terminate_x_connection()
{
    int fd = XConnectionNumber(XimServer::gDpy);

    remove_current_fd_watch(fd);
}
Пример #2
0
void add_fd_watch(int fd, int mask, void (*fn)(int, int))
{
    remove_current_fd_watch(fd);

    fd_watch_struct s;
    s.mask = mask;
    s.fn = fn;
    std::pair<int, fd_watch_struct> p(fd, s);
    fd_watch_stat.insert(p);
}
Пример #3
0
void terminate_canddisp_connection()
{
    int fd_r, fd_w;

    if (candwin_r) {
	fd_r = fileno(candwin_r);
	close(fd_r);
	remove_current_fd_watch(fd_r);
    }
    if (candwin_w) {
	fd_w = fileno(candwin_w);
	close(fd_w);
    }

    candwin_w = candwin_r = NULL;
    candwin_initted = false;
    return;
}