[gnome-terminal] Fix the build with gtk3 master
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] Fix the build with gtk3 master
- Date: Thu, 2 Dec 2010 20:16:08 +0000 (UTC)
commit fc460c3dbf55491b8cecfc7c65bda6bba2f32dae
Author: Christian Persch <chpe gnome org>
Date: Thu Dec 2 21:15:54 2010 +0100
Fix the build with gtk3 master
configure.ac | 4 ++--
src/terminal-screen.c | 8 +++++++-
src/terminal-util.c | 24 ++++++++++++++++++++++++
3 files changed, 33 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index c487415..507be6a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,9 +60,9 @@ case "$with_gtk" in
VTE_REQUIRED=0.26.0
;;
3.0) GTK_API_VERSION=3.0
- GTK_REQUIRED=2.91.1
+ GTK_REQUIRED=2.91.6
VTE_PC_VERSION=-2.90
- VTE_REQUIRED=0.27.1
+ VTE_REQUIRED=0.27.3
;;
esac
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index e5fb0be..0a4dff9 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -1336,7 +1336,13 @@ 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 (gtk_widget_get_window (window))));
+ g_hash_table_replace (env_table, g_strdup ("WINDOWID"),
+ g_strdup_printf ("%ld",
+#if GTK_CHECK_VERSION (2, 91, 6)
+ GDK_WINDOW_XID (gtk_widget_get_window (window))));
+#else
+ GDK_WINDOW_XWINDOW (gtk_widget_get_window (window))));
+#endif
g_hash_table_replace (env_table, g_strdup ("DISPLAY"), g_strdup (gdk_display_get_name (gtk_widget_get_display (window))));
#endif
diff --git a/src/terminal-util.c b/src/terminal-util.c
index 4055537..78c869b 100644
--- a/src/terminal-util.c
+++ b/src/terminal-util.c
@@ -1036,7 +1036,11 @@ terminal_util_x11_get_net_wm_desktop (GdkWindow *window,
#endif
if (XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display),
+#if GTK_CHECK_VERSION (2, 91, 6)
+ GDK_WINDOW_XID (window),
+#else
GDK_DRAWABLE_XID (window),
+#endif
gdk_x11_get_xatom_by_name_for_display (display,
"_NET_WM_DESKTOP"),
0, G_MAXLONG, False, AnyPropertyType,
@@ -1104,7 +1108,11 @@ terminal_util_x11_set_net_wm_desktop (GdkWindow *window,
xclient.type = ClientMessage;
xclient.serial = 0;
xclient.send_event = True;
+#if GTK_CHECK_VERSION (2, 91, 6)
+ xclient.window = GDK_WINDOW_XID (window);
+#else
xclient.window = GDK_WINDOW_XWINDOW (window);
+#endif
xclient.message_type = gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_DESKTOP");
xclient.format = 32;
@@ -1115,7 +1123,11 @@ terminal_util_x11_set_net_wm_desktop (GdkWindow *window,
xclient.data.l[4] = 0;
XSendEvent (xdisplay,
+#if GTK_CHECK_VERSION (2, 91, 6)
+ GDK_WINDOW_XID (gdk_screen_get_root_window (screen)),
+#else
GDK_WINDOW_XWINDOW (gdk_screen_get_root_window (screen)),
+#endif
False,
SubstructureRedirectMask | SubstructureNotifyMask,
(XEvent *)&xclient);
@@ -1125,7 +1137,11 @@ terminal_util_x11_set_net_wm_desktop (GdkWindow *window,
gulong long_desktop = desktop;
XChangeProperty (xdisplay,
+#if GTK_CHECK_VERSION (2, 91, 6)
+ GDK_WINDOW_XID (window),
+#else
GDK_DRAWABLE_XID (window),
+#endif
gdk_x11_get_xatom_by_name_for_display (display,
"_NET_WM_DESKTOP"),
XA_CARDINAL, 32, PropModeReplace,
@@ -1160,7 +1176,11 @@ terminal_util_x11_clear_demands_attention (GdkWindow *window)
xclient.type = ClientMessage;
xclient.serial = 0;
xclient.send_event = True;
+#if GTK_CHECK_VERSION (2, 91, 6)
+ xclient.window = GDK_WINDOW_XID (window);
+#else
xclient.window = GDK_WINDOW_XWINDOW (window);
+#endif
xclient.message_type = gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_STATE");
xclient.format = 32;
@@ -1171,7 +1191,11 @@ terminal_util_x11_clear_demands_attention (GdkWindow *window)
xclient.data.l[4] = 0;
XSendEvent (GDK_DISPLAY_XDISPLAY (display),
+#if GTK_CHECK_VERSION (2, 91, 6)
+ GDK_WINDOW_XID (gdk_screen_get_root_window (screen)),
+#else
GDK_WINDOW_XWINDOW (gdk_screen_get_root_window (screen)),
+#endif
False,
SubstructureRedirectMask | SubstructureNotifyMask,
(XEvent *)&xclient);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]