remove useless poll from vinci-xcb
This commit is contained in:
parent
bcc8997eff
commit
a7ba7bfa7e
16
vinci-xcb.c
16
vinci-xcb.c
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Vinci
|
||||
*
|
||||
* Copyright (C) 2025 Orastron Srl unipersonale
|
||||
* Copyright (C) 2021-2025 Orastron Srl unipersonale
|
||||
*
|
||||
* Vinci is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -22,8 +22,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <xcb/xcb.h>
|
||||
#include <poll.h>
|
||||
#include <stdio.h>
|
||||
//#include <stdio.h>
|
||||
|
||||
struct window {
|
||||
vinci *g;
|
||||
@ -140,16 +139,6 @@ static uint32_t get_mouse_state(uint16_t state, xcb_button_t last) {
|
||||
|
||||
void vinci_idle(vinci *g) {
|
||||
xcb_generic_event_t *ev;
|
||||
struct pollfd pfd;
|
||||
pfd.fd = xcb_get_file_descriptor(g->connection);
|
||||
pfd.events = POLLIN;
|
||||
while (1) {
|
||||
int err = poll(&pfd, 1, 0);
|
||||
if (err == -1)
|
||||
break;
|
||||
else if (err == 0)
|
||||
break;
|
||||
|
||||
while ((ev = xcb_poll_for_event(g->connection))) {
|
||||
switch (ev->response_type & ~0x80) {
|
||||
case XCB_EXPOSE:
|
||||
@ -291,7 +280,6 @@ void vinci_idle(vinci *g) {
|
||||
free(ev);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#define XEMBED_MAPPED (1 << 0)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user