[vino] Return error if X11 is not detected
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vino] Return error if X11 is not detected
- Date: Fri, 18 May 2018 12:09:30 +0000 (UTC)
commit d5b743b11a6f102353af719fa34abd5e6c679e77
Author: Ondrej Holy <oholy redhat com>
Date: Tue Feb 20 12:26:18 2018 +0100
Return error if X11 is not detected
Vino-server crashes on Wayland in XQueryExtension. Since vino-server is
not expected to work on displays other than X11, let's exit immediately
if GDK_IS_X11_DISPLAY fail.
https://bugzilla.gnome.org/show_bug.cgi?id=761120
server/vino-main.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/server/vino-main.c b/server/vino-main.c
index dd95de7..7be3fff 100644
--- a/server/vino-main.c
+++ b/server/vino-main.c
@@ -28,6 +28,7 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include <locale.h>
+#include <gdk/gdkx.h>
#include "vino-input.h"
#include "vino-mdns.h"
@@ -273,6 +274,12 @@ main (int argc, char **argv)
g_option_context_free (context);
}
+ if (!GDK_IS_X11_DISPLAY (gdk_display_get_default ()))
+ {
+ g_printerr ("X11 is not detected\n");
+ return 1;
+ }
+
/* GSettings */
vino.settings = g_settings_new ("org.gnome.Vino");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]