mirror of https://github.com/davatorium/rofi.git
Handle null X events without error
This commit is contained in:
parent
d6af6d29fc
commit
1bfbc327c2
|
@ -662,9 +662,14 @@ static gboolean main_loop_x11_event_handler ( xcb_generic_event_t *ev, G_GNUC_UN
|
||||||
{
|
{
|
||||||
if ( ev == NULL ) {
|
if ( ev == NULL ) {
|
||||||
int status = xcb_connection_has_error ( xcb->connection );
|
int status = xcb_connection_has_error ( xcb->connection );
|
||||||
fprintf ( stderr, "The XCB connection to X server had a fatal error: %d\n", status );
|
if(status > 0) {
|
||||||
g_main_loop_quit ( main_loop );
|
fprintf ( stderr, "The XCB connection to X server had a fatal error: %d\n", status );
|
||||||
return G_SOURCE_REMOVE;
|
g_main_loop_quit ( main_loop );
|
||||||
|
return G_SOURCE_REMOVE;
|
||||||
|
} else {
|
||||||
|
fprintf ( stderr, "Warning: main_loop_x11_event_handler: ev == NULL, status == %d\n", status );
|
||||||
|
return G_SOURCE_CONTINUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
uint8_t type = ev->response_type & ~0x80;
|
uint8_t type = ev->response_type & ~0x80;
|
||||||
if ( type == xkb.first_event ) {
|
if ( type == xkb.first_event ) {
|
||||||
|
|
Loading…
Reference in New Issue