From: fujiwarat Date: Mon, 12 Mar 2012 01:29:23 +0000 (+0900) Subject: Fix to ungrab ui/gtk3/switcher for GTK 3.3.18 and GLib 2.31.20 X-Git-Tag: 1.4.99.20121006~64 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3179c4fa298a89d2902842ccd30f475e012157b3;p=platform%2Fupstream%2Fibus.git Fix to ungrab ui/gtk3/switcher for GTK 3.3.18 and GLib 2.31.20 BUG=RH#800897 TEST=Linux desktop Review URL: https://codereview.appspot.com/5795048 --- 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;