[gtk] Exit cleanly if no display is found
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] Exit cleanly if no display is found
- Date: Sun, 11 Mar 2018 12:15:40 +0000 (UTC)
commit da8e83f9cb268173aa006f5c631f5c2b56f4858f
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Mar 11 08:14:14 2018 -0400
Exit cleanly if no display is found
We should not try to create an inspector window and generate
tons of ugly warnings in this case.
gtk/gtkmain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 395a470c57..336c9363ae 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -777,7 +777,7 @@ gtk_init_check (void)
ret = gdk_display_open_default () != NULL;
- if (gtk_get_debug_flags () & GTK_DEBUG_INTERACTIVE)
+ if (ret && (gtk_get_debug_flags () & GTK_DEBUG_INTERACTIVE))
gtk_window_set_interactive_debugging (TRUE);
return ret;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]