From 129d96928a644005b51ed2661566712c7f02ed87 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Wed, 4 Jan 2017 10:37:05 +0100 Subject: [PATCH] Quick when failed to grab keyboard. #524 --- source/rofi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/rofi.c b/source/rofi.c index 5c11acec..bad4cacc 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -598,7 +598,8 @@ static gboolean startup ( G_GNUC_UNUSED gpointer data ) int has_keyboard = take_keyboard ( xcb_stuff_get_root_window ( xcb ) ); if ( !has_keyboard ) { fprintf ( stderr, "Failed to grab keyboard, even after %d uS.", 500 * 1000 ); - return FALSE; + g_main_loop_quit ( main_loop ); + return G_SOURCE_REMOVE; } take_pointer ( xcb_stuff_get_root_window ( xcb ) ); }