[Xfce4-commits] [apps/xfce4-terminal] 01/01: Do not set DISPLAY variable in non-X11 environments (e.g. Wayland)

noreply at xfce.org noreply at xfce.org
Wed Sep 21 15:09:03 CEST 2016


This is an automated email from the git hooks/post-receive script.

f2404 pushed a commit to branch master
in repository apps/xfce4-terminal.

commit fdfec0f99efd3d4eb064e3a01dd57cb374544489
Author: Igor <f2404 at yandex.ru>
Date:   Wed Sep 21 16:08:15 2016 +0300

    Do not set DISPLAY variable in non-X11 environments (e.g. Wayland)
    
    Fixes https://bugzilla.xfce.org/show_bug.cgi?id=12867
---
 terminal/terminal-screen.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/terminal/terminal-screen.c b/terminal/terminal-screen.c
index 1c22b84..c49bf09 100644
--- a/terminal/terminal-screen.c
+++ b/terminal/terminal-screen.c
@@ -781,20 +781,19 @@ terminal_screen_get_child_environment (TerminalScreen *screen)
 
   result[n++] = g_strdup_printf ("COLORTERM=%s", PACKAGE_NAME);
 
+#ifdef GDK_WINDOWING_X11
   /* determine the toplevel widget */
   toplevel = gtk_widget_get_toplevel (GTK_WIDGET (screen));
-  if (toplevel != NULL && gtk_widget_get_realized (toplevel))
+  if (toplevel != NULL && gtk_widget_get_realized (toplevel) && GDK_IS_X11_WINDOW (gtk_widget_get_window (toplevel)))
     {
-#ifdef GDK_WINDOWING_X11
-      if (GDK_IS_X11_WINDOW (gtk_widget_get_window (toplevel)))
-        result[n++] = g_strdup_printf ("WINDOWID=%ld", (glong) gdk_x11_window_get_xid (gtk_widget_get_window (toplevel)));
-#endif
+      result[n++] = g_strdup_printf ("WINDOWID=%ld", (glong) gdk_x11_window_get_xid (gtk_widget_get_window (toplevel)));
 
       /* determine the DISPLAY value for the command */
       display_name = gdk_screen_make_display_name (gtk_widget_get_screen (toplevel));
       result[n++] = g_strdup_printf ("DISPLAY=%s", display_name);
       g_free (display_name);
     }
+#endif
 
   result[n] = NULL;
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list