summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2020-04-06 19:03:09 +0800
committerRobert Antoni Buj Gelonch <[email protected]>2020-06-20 15:00:59 +0200
commit3b960c5eaba05fa914488cbf5b3d8262cbed25c3 (patch)
treebd1cf77f1b47c23245e3b4b3d1049ca539bb3bf8 /src
parent9d391911ac9a7776b645c2cfad82cd77e903084d (diff)
downloadmate-terminal-3b960c5eaba05fa914488cbf5b3d8262cbed25c3.tar.bz2
mate-terminal-3b960c5eaba05fa914488cbf5b3d8262cbed25c3.tar.xz
Enable wayland support
Diffstat (limited to 'src')
-rw-r--r--src/terminal-screen.c4
-rw-r--r--src/terminal.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index 9ead8be..002585f 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -1445,7 +1445,9 @@ get_child_environment (TerminalScreen *screen,
g_hash_table_replace (env_table, g_strdup ("TERM"), g_strdup ("xterm-256color")); /* FIXME configurable later? */
/* FIXME: moving the tab between windows, or the window between displays will make the next two invalid... */
- g_hash_table_replace (env_table, g_strdup ("WINDOWID"), g_strdup_printf ("%ld", GDK_WINDOW_XID (gtk_widget_get_window (window))));
+ if (GDK_IS_X11_DISPLAY (display)) {
+ g_hash_table_replace (env_table, g_strdup ("WINDOWID"), g_strdup_printf ("%ld", GDK_WINDOW_XID (gtk_widget_get_window (window))));
+ }
g_hash_table_replace (env_table, g_strdup ("DISPLAY"), g_strdup (gdk_display_get_name (display)));
g_settings_schema_source_list_schemas (g_settings_schema_source_get_default (), TRUE, &list_schemas, NULL);
diff --git a/src/terminal.c b/src/terminal.c
index a5e07c7..2f65284 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -483,8 +483,6 @@ main (int argc, char **argv)
working_directory = g_get_current_dir ();
- gdk_set_allowed_backends ("x11");
-
/* Now change directory to $HOME so we don't prevent unmounting, e.g. if the
* factory is started by caja-open-terminal. See bug #565328.
* On failure back to /.
@@ -507,7 +505,6 @@ main (int argc, char **argv)
egg_sm_client_get_option_group (),
#endif /* HAVE_SMCLIENT */
NULL);
-
g_free (working_directory);
if (options == NULL)