[gnome-terminal/gnome-3-40] app: Make owner-change check only on X11



commit 7b49a730b110f76273d3b14d08b4110c8f7665f9
Author: Christian Persch <chpe src gnome org>
Date:   Fri Jun 4 20:14:42 2021 +0200

    app: Make owner-change check only on X11

 src/terminal-app.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/src/terminal-app.c b/src/terminal-app.c
index ff91e156..5b294c19 100644
--- a/src/terminal-app.c
+++ b/src/terminal-app.c
@@ -54,6 +54,10 @@
 #include <stdlib.h>
 #include <time.h>
 
+#ifdef GDK_WINDOWING_X11
+#include <gdk/gdkx.h>
+#endif
+
 #define DESKTOP_INTERFACE_SETTINGS_SCHEMA       "org.gnome.desktop.interface"
 
 #define SYSTEM_PROXY_SETTINGS_SCHEMA            "org.gnome.system.proxy"
@@ -831,8 +835,11 @@ terminal_app_init (TerminalApp *app)
   g_signal_connect (app->clipboard, "owner-change",
                     G_CALLBACK (clipboard_owner_change_cb), app);
 
-  if (!gdk_display_supports_selection_notification (display))
+#ifdef GDK_WINDOWING_X11
+  if (GDK_IS_X11_DISPLAY(display) &&
+      !gdk_display_supports_selection_notification (display))
     g_printerr ("Display does not support owner-change; copy/paste will be broken!\n");
+#endif
 
   /* Get the profiles */
   app->profiles_list = terminal_profiles_list_new ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]