Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#141 closed bug (fixed)

BottomlineWindow

Reported by: bxi07354@… Owned by: korli
Priority: normal Milestone: R1
Component: - General Version:
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no 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)

InputServer.cpp.patch (3.1 KB ) - added by bxi07354@… 14 years ago.
BottomLineWindow patch
InputServer.cpp.2.patch (2.3 KB ) - added by bxi07354@… 14 years ago.
InputServer.cpp
inputserver.png (16.0 KB ) - added by bxi07354@… 14 years ago.
Double B_INPUT_METHOD_EVENT

Download all attachments as: .zip

Change History (13)

comment:1 by korli, 14 years ago

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:2 by korli, 14 years ago

Resolution: fixed

comment:3 by korli, 14 years ago

Status: newclosed

comment:4 by bxi07354@…, 14 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 bxi07354@…, 14 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 korli, 14 years ago

Could you provide a patch ? Should be easier if you already coded this change. Thanks.

by bxi07354@…, 14 years ago

Attachment: InputServer.cpp.patch added

BottomLineWindow patch

comment:7 by korli, 14 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.

by bxi07354@…, 14 years ago

Attachment: InputServer.cpp.2.patch added

InputServer.cpp

comment:8 by korli, 14 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.

by bxi07354@…, 14 years ago

Attachment: inputserver.png added

Double B_INPUT_METHOD_EVENT

comment:9 by korli, 14 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 bxi07354@…, 14 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.

Note: See TracTickets for help on using tickets.