summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHuang Peng <shawn.p.huang@gmail.com>2008-06-17 15:08:24 +0800
committerHuang Peng <shawn.p.huang@gmail.com>2008-06-17 15:08:24 +0800
commit299fbcf8810eaac00b6bf29560100edea8638c8a (patch)
treec958126cf7d8bbb48acbad2339102da88fd195f3
parentc3840b20c247dc6596a6905839c48ec0ca306aab (diff)
downloadibus-299fbcf8810eaac00b6bf29560100edea8638c8a.tar.gz
ibus-299fbcf8810eaac00b6bf29560100edea8638c8a.tar.xz
ibus-299fbcf8810eaac00b6bf29560100edea8638c8a.zip
Reset panel when focused_context be destroyed
-rw-r--r--ibusdaemon/bus.py1
-rw-r--r--ibusdaemon/contextmanager.py5
-rw-r--r--ibusdaemon/inputcontext.py8
3 files changed, 8 insertions, 6 deletions
diff --git a/ibusdaemon/bus.py b/ibusdaemon/bus.py
index 2aaa37d..76bc4f8 100644
--- a/ibusdaemon/bus.py
+++ b/ibusdaemon/bus.py
@@ -167,6 +167,7 @@ class IBus (ibus.Object):
assert context == self._focused_context
self._context_handlers = []
self._focused_context = None
+ self._panel.reset ()
##########################################################
# methods for im engines
diff --git a/ibusdaemon/contextmanager.py b/ibusdaemon/contextmanager.py
index 3d9e9ce..f306a9d 100644
--- a/ibusdaemon/contextmanager.py
+++ b/ibusdaemon/contextmanager.py
@@ -12,11 +12,12 @@ class ContextManager (ibus.Object):
return context
def release_input_context (self, ic, ibusconn):
- del self._contexts[ic]
+ context = self._contexts[ic]
+ context.destroy ()
def lookup_context (self, ic, ibusconn):
return self._contexts[ic]
def _context_destroy_cb (self, context):
- del self._clients[context.get_id ()]
+ del self._contexts[context.get_id ()]
diff --git a/ibusdaemon/inputcontext.py b/ibusdaemon/inputcontext.py
index 4d5a7d6..e7db89c 100644
--- a/ibusdaemon/inputcontext.py
+++ b/ibusdaemon/inputcontext.py
@@ -93,15 +93,15 @@ class InputContext (ibus.Object):
def page_up (self):
if self._engine:
self._engine.page_up ()
-
+
def page_down (self):
if self._engine:
self._engine.page_down ()
-
+
def cursor_up (self):
if self._engine:
self._engine.cursor_up ()
-
+
def cursor_down (self):
if self._engine:
self._engine.cursor_down ()
@@ -186,7 +186,7 @@ class InputContext (ibus.Object):
def _register_properties_cb (self, engine, props):
self.emit ("register-properties", props)
-
+
def _update_property_cb (self, engine, prop):
self.emit ("update-property", prop)