Extended input method protocol a bit: you can now set "be:inline_only" to true, which
means that no bottomline window will be opened in case the current view is not input method aware. Instead, only the confirmed B_INPUT_METHOD_CHANGE event will be translated to a message the view will understand - this message must be part of the event in the "be:translated" member. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19116 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1541,6 +1541,20 @@ InputServer::_MethodizeEvents(EventList& events)
|
||||
|
||||
int32 opcode;
|
||||
if (event->FindInt32("be:opcode", &opcode) == B_OK) {
|
||||
bool inlineOnly;
|
||||
if (event->FindBool("be:inline_only", &inlineOnly) != B_OK)
|
||||
inlineOnly = false;
|
||||
|
||||
if (inlineOnly) {
|
||||
BMessage translated;
|
||||
bool confirmed;
|
||||
if (opcode == B_INPUT_METHOD_CHANGED
|
||||
&& event->FindBool("be:confirmed", &confirmed) == B_OK && confirmed
|
||||
&& event->FindMessage("be:translated", &translated) == B_OK) {
|
||||
// translate event for the non-aware view
|
||||
*event = translated;
|
||||
}
|
||||
} else {
|
||||
if (fInputMethodWindow == NULL
|
||||
&& opcode == B_INPUT_METHOD_STARTED)
|
||||
fInputMethodWindow = new (nothrow) BottomlineWindow();
|
||||
@@ -1568,6 +1582,7 @@ InputServer::_MethodizeEvents(EventList& events)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return events.CountItems() > 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user