From 10214ec48fd8c9cf1798d7178be668826a4b1da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Fri, 10 Feb 2006 10:45:08 +0000 Subject: [PATCH] hopefully taken B_INPUT_METHOD_STOPPED into account git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16325 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/input/InputServer.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/servers/input/InputServer.cpp b/src/servers/input/InputServer.cpp index c0b16fcd39..198b29a1a8 100644 --- a/src/servers/input/InputServer.cpp +++ b/src/servers/input/InputServer.cpp @@ -1504,10 +1504,16 @@ InputServer::_MethodizeEvents(EventList& events) SERIAL_PRINT(("IME received\n")); int32 opcode; - if (fInputMethodWindow == NULL - && event->FindInt32("be:opcode", &opcode) == B_OK - && opcode == B_INPUT_METHOD_STARTED) - fInputMethodWindow = new (nothrow) BottomlineWindow(); + if (event->FindInt32("be:opcode", &opcode) == B_OK) { + if (fInputMethodWindow && opcode == B_INPUT_METHOD_STOPPED) { + fInputMethodWindow->PostMessage(B_QUIT_REQUESTED); + fInputMethodWindow = NULL; + continue; + } + if (fInputMethodWindow == NULL + && opcode == B_INPUT_METHOD_STARTED) + fInputMethodWindow = new (nothrow) BottomlineWindow(); + } if (fInputMethodWindow != NULL) { EventList newEvents;