#141 closed bug (fixed)
BottomlineWindow
Reported by: | Owned by: | korli | |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | - General | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
input_method doesn't use Filter so much. input_method uses EnqueueMessage(). Therefore, EnqueueMethodMessage() should process BottomlineWindow.
If it is B_INPUT_METHOD_STOPPED, it is necessary to do fInputMethodWindow->PostMessage(B_QUIT_REQUESTED).
Attachments (3)
Change History (13)
comment:1 by , 19 years ago
comment:2 by , 19 years ago
Resolution: | → fixed |
---|
comment:3 by , 19 years ago
Status: | new → closed |
---|
comment:4 by , 19 years ago
But I don't understand your comments
I'm sorry. Because it cannot speak English The web translation is used. Please look at this Code. src/add-ons/input_server/methods/canna/CannaMethod.cpp filter_result CannaMethod::Filter( BMessage *msg, BList *outList ) {
if ( msg->what != B_KEY_DOWN )
return B_DISPATCH_MESSAGE;
cannaLooper.SendMessage( msg );
return B_SKIP_MESSAGE;
} B_INPUT_METHOD_EVENT is not returned in Filter. Therefore, event->what != B_INPUT_METHOD_EVENT is true. It doesn't execute since 1507 lines.
It is necessary to check EnqueueMethodMessage() or fMethodQueue. (In reply to comment #1)
hopefully taken B_INPUT_METHOD_STOPPED into account in revision 16325.
But I don't understand your comments : "input_method doesn't use Filter so much. input_method uses EnqueueMessage(). Therefore, EnqueueMethodMessage() should process BottomlineWindow. "
(In reply to comment #0)
input_method doesn't use Filter so much. input_method uses EnqueueMessage(). Therefore, EnqueueMethodMessage() should process BottomlineWindow.
If it is B_INPUT_METHOD_STOPPED, it is necessary to do fInputMethodWindow->PostMessage(B_QUIT_REQUESTED).
(In reply to comment #1)
hopefully taken B_INPUT_METHOD_STOPPED into account in revision 16325.
But I don't understand your comments : "input_method doesn't use Filter so much. input_method uses EnqueueMessage(). Therefore, EnqueueMethodMessage() should process BottomlineWindow. "
comment:5 by , 19 years ago
My idea for (int32 i = 0; i < newCount; i++) {
BMessage* event = events.ItemAt(i);
if (event->what != B_INPUT_METHOD_EVENT)
continue;
SERIAL_PRINT(("IME received\n"));
int32 opcode; 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; fInputMethodWindow->HandleInputMethodEvent(event, newEvents);
replace event with new events (but don't scan them again for input method messages) events.RemoveItemAt(i--); delete event; newCount--;
if (!newEvents.IsEmpty()) {
fInputMethodWindow->PostMessage(B_QUIT_REQUESTED); fInputMethodWindow = NULL;
events.AddList(&newEvents);
}
}
}
src/servers/input/BottomlineWindow.cpp
fTextView->MakeFocus(true);
Do not do MakeFocus to BottomlineWindow.
newEvent->AddData("bytes", B_STRING_TYPE, string + offset, nextOffset - offset);
The terminal is necessary.
char bytes[8]; bytes[nextOffset-offset] = string[nextOffset]; for (++nextOffset; (string[nextOffset] & 0xC0) == 0x80; ++nextOffset)
bytes[nextOffset-offset] = string[nextOffset];
bytes[nextOffset-offset] = '\0';
newEvent->AddString("bytes", bytes);
comment:6 by , 19 years ago
Could you provide a patch ? Should be easier if you already coded this change. Thanks.
comment:7 by , 19 years ago
Could you :
- use "diff -u" to make patchs (unable to patch with this patch)
- avoid using FindInt8(char*) as it is obsolete
Thanks.
comment:8 by , 19 years ago
I committed a fix for the problem in BottomLineWindow.cpp you noticed in revision 16547. Do I have to apply patch InputServer.cpp as is ? Please describe what it fix.
comment:9 by , 19 years ago
I committed your patch in revision 16666. Could you explain how your textview displays IM characters instead of the BottomLineWindow ? Thanks!
comment:10 by , 19 years ago
hank you for the patch.
No one issues neither IS_FOCUS_IM_AWARE_VIEW nor IS_UNFOCUS_IM_AWARE_VIEW.
Therefore,fInputMethodAware is always "false".
Therefore,BottomlineWindow is started.
hopefully taken B_INPUT_METHOD_STOPPED into account in revision 16325.
But I don't understand your comments : "input_method doesn't use Filter so much. input_method uses EnqueueMessage(). Therefore, EnqueueMethodMessage() should process BottomlineWindow. "