diff options
author | fujiwarat <takao.fujiwara1@gmail.com> | 2016-06-03 11:52:29 +0900 |
---|---|---|
committer | fujiwarat <takao.fujiwara1@gmail.com> | 2016-06-03 11:52:29 +0900 |
commit | 3ef21fef0135f7b4fe9611d201f15611734f6c51 (patch) | |
tree | fc75755ecb8ddb0dd508d72649ec16f61dd0dcfc | |
parent | a186059edc48b22e4adfc1878bb5fd0ee60d4fe0 (diff) | |
download | ibus-3ef21fef0135f7b4fe9611d201f15611734f6c51.tar.gz |
client/gtk2: Fix SEGV with Wayland display
Delete gdk_display_get_name() in GTK clients because ibus-daemon
does not use gdk_display_get_name().
GdkX11Dislay and GdkX11Window does not work with Wayland.
BUG=https://github.com/ibus/ibus/issues/1859
R=Shawn.P.Huang@gmail.com
Review URL: https://codereview.appspot.com/301760043
-rw-r--r-- | client/gtk2/ibusimcontext.c | 5 | ||||
-rw-r--r-- | setup/main.py | 7 |
2 files changed, 5 insertions, 7 deletions
diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c index 9d927e63..0df00620 100644 --- a/client/gtk2/ibusimcontext.c +++ b/client/gtk2/ibusimcontext.c @@ -583,11 +583,6 @@ ibus_im_context_class_init (IBusIMContextClass *class) /* init bus object */ if (_bus == NULL) { - const gchar *dname = gdk_display_get_name (gdk_display_get_default ()); - /* ibus-daemon uses DISPLAY variable. */ - if (g_strcmp0 (dname, "Wayland") == 0) - dname = g_getenv ("DISPLAY"); - ibus_set_display (dname); _bus = ibus_bus_new_async (); /* init the global fake context */ diff --git a/setup/main.py b/setup/main.py index 26c2b0f3..e1f7a9d6 100644 --- a/setup/main.py +++ b/setup/main.py @@ -275,8 +275,11 @@ class Setup(object): self.__init_general() def __gdk_window_set_cb(self, object, pspec): - str = '%u' % GdkX11.X11Window.get_xid(object.get_window()) - GLib.setenv('IBUS_SETUP_XID', str, True) + window = object.get_window() + if type(window) != GdkX11.X11Window: + return + s = '%u' % GdkX11.X11Window.get_xid(window) + GLib.setenv('IBUS_SETUP_XID', s, True) def __combobox_notify_active_engine_cb(self, combobox, property): engine = self.__combobox.get_active_engine() |