summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfujiwarat <takao.fujiwara1@gmail.com>2015-05-21 11:06:02 +0900
committerfujiwarat <takao.fujiwara1@gmail.com>2015-05-21 11:06:02 +0900
commit0f9ea3d82a95f557acbe0e538a12dfd2f4ecd9c1 (patch)
tree807abec1a7ffa3704ee5374226d61364c5882660
parent85f5433c223118fa8f7e4f4bceafa372d8f1e880 (diff)
downloadibus-0f9ea3d82a95f557acbe0e538a12dfd2f4ecd9c1.tar.gz
Fix SEGV of ibus-x11 on wayland
In case that ibus-x11 is built with gtk3, GdkDisplay can be GdkWaylandDisplay but not GdkX11Display so GDK_DISPLAY_XDISPLAY() and GDK_WINDOW_XID() does not work in wayland. TEST=client/x11/ibus-x11 Review URL: https://codereview.appspot.com/234590043
-rw-r--r--client/x11/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/client/x11/main.c b/client/x11/main.c
index 33e68d3f..4fde122e 100644
--- a/client/x11/main.c
+++ b/client/x11/main.c
@@ -1137,6 +1137,13 @@ main (int argc, char **argv)
gint option_index = 0;
gint c;
+ /* GDK_DISPLAY_XDISPLAY() and GDK_WINDOW_XID() does not work
+ * with GdkWaylandDisplay.
+ */
+#if GTK_CHECK_VERSION (3, 10, 0)
+ gdk_set_allowed_backends ("x11");
+#endif
+
gtk_init (&argc, &argv);
XSetErrorHandler (_xerror_handler);