Fixed Bug 731610 Keep IM state when text input focus changes
This commit is contained in:
parent
9c45bb70e0
commit
ed173d8bb1
@ -1335,3 +1335,46 @@ index b6b2441..853465c 100644
|
|||||||
--
|
--
|
||||||
1.7.5.4
|
1.7.5.4
|
||||||
|
|
||||||
|
From 52804b99ba639e17a8a2563f3e2c6e76b79fcdef Mon Sep 17 00:00:00 2001
|
||||||
|
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||||
|
Date: Fri, 19 Aug 2011 12:02:51 +0900
|
||||||
|
Subject: [PATCH] Check if BusInputContext has an enabled engine in global
|
||||||
|
input method.
|
||||||
|
|
||||||
|
---
|
||||||
|
bus/ibusimpl.c | 6 +++++-
|
||||||
|
1 files changed, 5 insertions(+), 1 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/bus/ibusimpl.c b/bus/ibusimpl.c
|
||||||
|
index 853465c..1942504 100644
|
||||||
|
--- a/bus/ibusimpl.c
|
||||||
|
+++ b/bus/ibusimpl.c
|
||||||
|
@@ -1176,12 +1176,14 @@ bus_ibus_impl_set_focused_context (BusIBusImpl *ibus,
|
||||||
|
}
|
||||||
|
|
||||||
|
BusEngineProxy *engine = NULL;
|
||||||
|
+ gboolean is_enabled = FALSE;
|
||||||
|
|
||||||
|
if (ibus->focused_context) {
|
||||||
|
if (ibus->use_global_engine) {
|
||||||
|
/* dettach engine from the focused context */
|
||||||
|
engine = bus_input_context_get_engine (ibus->focused_context);
|
||||||
|
if (engine) {
|
||||||
|
+ is_enabled = bus_input_context_is_enabled (ibus->focused_context);
|
||||||
|
g_object_ref (engine);
|
||||||
|
bus_input_context_set_engine (ibus->focused_context, NULL);
|
||||||
|
}
|
||||||
|
@@ -1203,7 +1205,9 @@ bus_ibus_impl_set_focused_context (BusIBusImpl *ibus,
|
||||||
|
/* attach engine to the focused context */
|
||||||
|
if (engine != NULL) {
|
||||||
|
bus_input_context_set_engine (context, engine);
|
||||||
|
- bus_input_context_enable (context);
|
||||||
|
+ if (is_enabled) {
|
||||||
|
+ bus_input_context_enable (context);
|
||||||
|
+ }
|
||||||
|
g_object_unref (engine);
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
1.7.5.4
|
||||||
|
|
||||||
|
@ -477,6 +477,36 @@ index 853465c..00864ac 100644
|
|||||||
desc = (IBusEngineDesc *) ibus->engine_list->data;
|
desc = (IBusEngineDesc *) ibus->engine_list->data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1407,6 +1731,9 @@ bus_ibus_impl_set_focused_context (BusIBusImpl *ibus,
|
||||||
|
|
||||||
|
BusEngineProxy *engine = NULL;
|
||||||
|
gboolean is_enabled = FALSE;
|
||||||
|
+#if USE_BRIDGE_HOTKEY
|
||||||
|
+ IBusEngineDesc *desc = NULL;
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
if (ibus->focused_context) {
|
||||||
|
if (ibus->use_global_engine) {
|
||||||
|
@@ -1336,6 +1741,9 @@ bus_ibus_impl_set_focused_context (BusIBusImpl *ibus,
|
||||||
|
engine = bus_input_context_get_engine (ibus->focused_context);
|
||||||
|
if (engine) {
|
||||||
|
is_enabled = bus_input_context_is_enabled (ibus->focused_context);
|
||||||
|
+#if USE_BRIDGE_HOTKEY
|
||||||
|
+ desc = bus_input_context_get_prev_hotkey_engine (ibus->focused_context);
|
||||||
|
+#endif
|
||||||
|
g_object_ref (engine);
|
||||||
|
bus_input_context_set_engine (ibus->focused_context, NULL);
|
||||||
|
}
|
||||||
|
@@ -1360,6 +1768,9 @@ bus_ibus_impl_set_focused_context (BusIBusImpl *ibus,
|
||||||
|
if (is_enabled) {
|
||||||
|
bus_input_context_enable (context);
|
||||||
|
}
|
||||||
|
+#if USE_BRIDGE_HOTKEY
|
||||||
|
+ bus_input_context_set_prev_hotkey_engine (ibus->focused_context, desc);
|
||||||
|
+#endif
|
||||||
|
g_object_unref (engine);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -2267,6 +2591,9 @@ bus_ibus_impl_filter_keyboard_shortcuts
|
@@ -2267,6 +2591,9 @@ bus_ibus_impl_filter_keyboard_shortcuts
|
||||||
|
|
||||||
GQuark event;
|
GQuark event;
|
||||||
@ -1483,16 +1513,7 @@ index 8804634..f7b3e50 100644
|
|||||||
else:
|
else:
|
||||||
self.__set_im_icon(ICON_KEYBOARD)
|
self.__set_im_icon(ICON_KEYBOARD)
|
||||||
self.__set_im_name(None)
|
self.__set_im_name(None)
|
||||||
@@ -260,6 +355,8 @@ class Panel(ibus.PanelBase):
|
@@ -273,7 +368,21 @@ class Panel(ibus.PanelBase):
|
||||||
|
|
||||||
def focus_out(self, ic):
|
|
||||||
self.reset()
|
|
||||||
+ if self.__focus_ic and self.__focus_ic.is_enabled():
|
|
||||||
+ self.__focus_ic.disable()
|
|
||||||
self.__focus_ic = None
|
|
||||||
self.__language_bar.set_enabled(False)
|
|
||||||
self.__language_bar.focus_out()
|
|
||||||
@@ -273,7 +370,21 @@ class Panel(ibus.PanelBase):
|
|
||||||
return
|
return
|
||||||
|
|
||||||
enabled = self.__focus_ic.is_enabled()
|
enabled = self.__focus_ic.is_enabled()
|
||||||
@ -1515,7 +1536,7 @@ index 8804634..f7b3e50 100644
|
|||||||
|
|
||||||
if enabled == False:
|
if enabled == False:
|
||||||
self.reset()
|
self.reset()
|
||||||
@@ -287,7 +398,7 @@ class Panel(ibus.PanelBase):
|
@@ -287,7 +396,7 @@ class Panel(ibus.PanelBase):
|
||||||
self.__set_im_icon(engine.icon)
|
self.__set_im_icon(engine.icon)
|
||||||
self.__set_im_name(engine.longname)
|
self.__set_im_name(engine.longname)
|
||||||
if self.__bus.get_use_sys_layout():
|
if self.__bus.get_use_sys_layout():
|
||||||
@ -1524,7 +1545,7 @@ index 8804634..f7b3e50 100644
|
|||||||
else:
|
else:
|
||||||
self.__set_im_icon(ICON_KEYBOARD)
|
self.__set_im_icon(ICON_KEYBOARD)
|
||||||
self.__set_im_name(None)
|
self.__set_im_name(None)
|
||||||
@@ -315,6 +426,7 @@ class Panel(ibus.PanelBase):
|
@@ -315,6 +424,7 @@ class Panel(ibus.PanelBase):
|
||||||
|
|
||||||
def __config_load_show(self):
|
def __config_load_show(self):
|
||||||
show = self.__config.get_value("panel", "show", 0)
|
show = self.__config.get_value("panel", "show", 0)
|
||||||
@ -1532,7 +1553,7 @@ index 8804634..f7b3e50 100644
|
|||||||
self.__language_bar.set_show(show)
|
self.__language_bar.set_show(show)
|
||||||
|
|
||||||
def __config_load_position(self):
|
def __config_load_position(self):
|
||||||
@@ -443,6 +555,21 @@ class Panel(ibus.PanelBase):
|
@@ -443,6 +553,21 @@ class Panel(ibus.PanelBase):
|
||||||
# menu.set_take_focus(False)
|
# menu.set_take_focus(False)
|
||||||
# return menu
|
# return menu
|
||||||
|
|
||||||
@ -1554,7 +1575,7 @@ index 8804634..f7b3e50 100644
|
|||||||
def __create_im_menu(self):
|
def __create_im_menu(self):
|
||||||
engines = self.__bus.list_active_engines()
|
engines = self.__bus.list_active_engines()
|
||||||
current_engine = \
|
current_engine = \
|
||||||
@@ -453,25 +580,39 @@ class Panel(ibus.PanelBase):
|
@@ -453,25 +578,39 @@ class Panel(ibus.PanelBase):
|
||||||
size = gtk.icon_size_lookup(gtk.ICON_SIZE_MENU)
|
size = gtk.icon_size_lookup(gtk.ICON_SIZE_MENU)
|
||||||
menu = gtk.Menu()
|
menu = gtk.Menu()
|
||||||
for i, engine in enumerate(engines):
|
for i, engine in enumerate(engines):
|
||||||
@ -1607,7 +1628,7 @@ index 8804634..f7b3e50 100644
|
|||||||
|
|
||||||
menu.show_all()
|
menu.show_all()
|
||||||
menu.set_take_focus(False)
|
menu.set_take_focus(False)
|
||||||
@@ -523,8 +664,25 @@ class Panel(ibus.PanelBase):
|
@@ -523,8 +662,25 @@ class Panel(ibus.PanelBase):
|
||||||
if not self.__focus_ic:
|
if not self.__focus_ic:
|
||||||
return
|
return
|
||||||
if engine:
|
if engine:
|
||||||
@ -1634,7 +1655,7 @@ index 8804634..f7b3e50 100644
|
|||||||
self.__focus_ic.disable()
|
self.__focus_ic.disable()
|
||||||
|
|
||||||
def __sys_menu_item_activate_cb(self, item, command):
|
def __sys_menu_item_activate_cb(self, item, command):
|
||||||
@@ -573,12 +731,85 @@ class Panel(ibus.PanelBase):
|
@@ -573,12 +729,85 @@ class Panel(ibus.PanelBase):
|
||||||
self.__setup_pid = pid
|
self.__setup_pid = pid
|
||||||
glib.child_watch_add(self.__setup_pid, self.__child_watch_cb)
|
glib.child_watch_add(self.__setup_pid, self.__child_watch_cb)
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
Name: ibus
|
Name: ibus
|
||||||
Version: 1.3.99.20110419
|
Version: 1.3.99.20110419
|
||||||
Release: 16%{?dist}
|
Release: 17%{?dist}
|
||||||
Summary: Intelligent Input Bus for Linux OS
|
Summary: Intelligent Input Bus for Linux OS
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
@ -369,7 +369,7 @@ fi
|
|||||||
%{_datadir}/gtk-doc/html/*
|
%{_datadir}/gtk-doc/html/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Aug 18 2011 Takao Fujiwara <tfujiwar@redhat.com> - 1.3.99.20110419-16
|
* Fri Aug 19 2011 Takao Fujiwara <tfujiwar@redhat.com> - 1.3.99.20110419-17
|
||||||
- Updated ibus-HEAD.patch for upstream.
|
- Updated ibus-HEAD.patch for upstream.
|
||||||
- Removed ibus-435880-surrounding-text.patch as upstream.
|
- Removed ibus-435880-surrounding-text.patch as upstream.
|
||||||
- Added ibus-711632-fedora-fallback-icon.patch
|
- Added ibus-711632-fedora-fallback-icon.patch
|
||||||
@ -378,6 +378,7 @@ fi
|
|||||||
Fixed Bug 700472 Use a symbol icon instead of an image icon.
|
Fixed Bug 700472 Use a symbol icon instead of an image icon.
|
||||||
- Added ibus-xx-bridge-hotkey.patch
|
- Added ibus-xx-bridge-hotkey.patch
|
||||||
Triaged Bug 707370 SetEngine timeout
|
Triaged Bug 707370 SetEngine timeout
|
||||||
|
Fixed Bug 731610 Keep IM state when text input focus changes
|
||||||
- Added transitional ibus-gnome3 package.
|
- Added transitional ibus-gnome3 package.
|
||||||
Fixed Bug 718110 Use a shell icon instead of pygtk2 icon.
|
Fixed Bug 718110 Use a shell icon instead of pygtk2 icon.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user