From 35f6353b89726878fa99de2588fb6be5aef8686c Mon Sep 17 00:00:00 2001 From: fujiwarat Date: Mon, 5 Mar 2012 11:16:23 +0900 Subject: [PATCH] Fix python library to load libibus.so.Y --- ibus/_config.py.in | 2 ++ ibus/common.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/ibus/_config.py.in b/ibus/_config.py.in index 098d805..c9d11bb 100644 --- a/ibus/_config.py.in +++ b/ibus/_config.py.in @@ -25,6 +25,7 @@ __all__ = ( "get_copyright", "get_license", "get_ICON_KEYBOARD", + "LIBIBUS_SONAME", "ISOCODES_PREFIX", "_" ) @@ -55,4 +56,5 @@ def get_ICON_KEYBOARD(): return fallback_icon return icon +LIBIBUS_SONAME='libibus-@IBUS_API_VERSION@.so.@LT_CURRENT_MINUS_AGE@' ISOCODES_PREFIX='@ISOCODES_PREFIX@' diff --git a/ibus/common.py b/ibus/common.py index 6483aae..fb39d56 100644 --- a/ibus/common.py +++ b/ibus/common.py @@ -59,6 +59,7 @@ import os import sys from xdg import BaseDirectory import ctypes +import _config # __display = os.environ["DISPLAY"] # __hostname, __display_screen = __display.split(":", 1) @@ -104,7 +105,7 @@ import ctypes # return None # return address -libibus = ctypes.CDLL("libibus-1.0.so.0") +libibus = ctypes.CDLL(_config.LIBIBUS_SONAME) get_address = libibus.ibus_get_address get_address.restype=ctypes.c_char_p -- 1.7.9.1 From 401f881314abce57a0979aa4ef08fc5462dfe3ca Mon Sep 17 00:00:00 2001 From: fujiwarat Date: Sat, 10 Mar 2012 09:45:07 +0900 Subject: [PATCH] Fix to ungrab ui/gtk3/switcher for GTK 3.3.18 and GLib 2.31.20 --- ui/gtk3/switcher.vala | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/ui/gtk3/switcher.vala b/ui/gtk3/switcher.vala index 76c67ec..131cad5 100644 --- a/ui/gtk3/switcher.vala +++ b/ui/gtk3/switcher.vala @@ -127,6 +127,9 @@ class Switcher : Gtk.Window { m_loop.run(); m_loop = null; + keyboard.ungrab(Gdk.CURRENT_TIME); + pointer.ungrab(Gdk.CURRENT_TIME); + hide(); // Make sure the switcher is hidden before returning from this function. while (Gtk.events_pending()) @@ -239,6 +242,11 @@ class Switcher : Gtk.Window { return true; } + // if e.type == Gdk.EventType.KEY_RELEASE, m_loop is already null. + if (m_loop == null) { + return false; + } + m_loop.quit(); m_result = (int)m_selected_engine; return true; -- 1.7.9.1