[gnome-terminal] Use the XID of the TerminalWindow for WINDOWID
- From: Christian Persch <chpe src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-terminal] Use the XID of the TerminalWindow for WINDOWID
- Date: Thu, 20 Aug 2009 14:00:49 +0000 (UTC)
commit 37e4dccc22a4678d86f46149e2ecad1d24e3d78d
Author: Christian Persch <chpe gnome org>
Date: Thu Aug 20 14:59:18 2009 +0200
Use the XID of the TerminalWindow for WINDOWID
Instead of the XID of the TerminalScreen's GdkWindow, which forces it to
be native.
src/terminal-screen.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index 0ea8575..7896dc1 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -1358,6 +1358,7 @@ get_child_environment (TerminalScreen *screen,
{
TerminalScreenPrivate *priv = screen->priv;
GtkWidget *term = GTK_WIDGET (screen);
+ GtkWidget *window;
char **env;
char *e, *v;
char *proxymode, *proxyhost;
@@ -1368,6 +1369,9 @@ get_child_environment (TerminalScreen *screen,
GPtrArray *retval;
guint i;
+ window = gtk_widget_get_toplevel (term);
+ g_assert (window != NULL && GTK_WIDGET_TOPLEVEL (window));
+
env_table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
/* First take the factory's environment */
@@ -1399,8 +1403,8 @@ get_child_environment (TerminalScreen *screen,
#ifdef GDK_WINDOWING_X11
/* 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_XWINDOW (term->window)));
- g_hash_table_replace (env_table, g_strdup ("DISPLAY"), g_strdup (gdk_display_get_name (gtk_widget_get_display (term))));
+ g_hash_table_replace (env_table, g_strdup ("WINDOWID"), g_strdup_printf ("%ld", GDK_WINDOW_XWINDOW (window->window)));
+ g_hash_table_replace (env_table, g_strdup ("DISPLAY"), g_strdup (gdk_display_get_name (gtk_widget_get_display (window))));
#endif
conf = gconf_client_get_default ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]