1 | *** /home/haiku/src/servers/input/InputServer.cpp 2006-02-14 13:04:31.000000000 +0900
|
---|
2 | --- /bfs/haiku/haiku/src/servers/input/InputServer.cpp 2006-02-14 13:24:04.000000000 +0900
|
---|
3 | ***************
|
---|
4 | *** 1477,1484 ****
|
---|
5 | fKeyInfo.key_states[KEY_Spacebar >> 3]));
|
---|
6 |
|
---|
7 | if ((fKeyInfo.modifiers & B_COMMAND_KEY) != 0
|
---|
8 | ! && (fKeyInfo.key_states[KEY_Spacebar >> 3]
|
---|
9 | ! & (1 << (7 - (KEY_Spacebar % 8))))) {
|
---|
10 | SetNextMethod(!fKeyInfo.modifiers & B_SHIFT_KEY);
|
---|
11 |
|
---|
12 | // this event isn't sent to the user
|
---|
13 | --- 1477,1483 ----
|
---|
14 | fKeyInfo.key_states[KEY_Spacebar >> 3]));
|
---|
15 |
|
---|
16 | if ((fKeyInfo.modifiers & B_COMMAND_KEY) != 0
|
---|
17 | ! && event->FindInt8("byte") == ' ') {
|
---|
18 | SetNextMethod(!fKeyInfo.modifiers & B_SHIFT_KEY);
|
---|
19 |
|
---|
20 | // this event isn't sent to the user
|
---|
21 | ***************
|
---|
22 | *** 1526,1532 ****
|
---|
23 |
|
---|
24 | if (!fInputMethodAware) {
|
---|
25 | // special handling for non-input-method-aware views
|
---|
26 | ! for (int32 i = count; i < newCount; i++) {
|
---|
27 | BMessage* event = events.ItemAt(i);
|
---|
28 |
|
---|
29 | if (event->what != B_INPUT_METHOD_EVENT)
|
---|
30 | --- 1525,1531 ----
|
---|
31 |
|
---|
32 | if (!fInputMethodAware) {
|
---|
33 | // special handling for non-input-method-aware views
|
---|
34 | ! for (int32 i = 0; i < newCount; i++) {
|
---|
35 | BMessage* event = events.ItemAt(i);
|
---|
36 |
|
---|
37 | if (event->what != B_INPUT_METHOD_EVENT)
|
---|
38 | ***************
|
---|
39 | *** 1536,1567 ****
|
---|
40 |
|
---|
41 | int32 opcode;
|
---|
42 | if (event->FindInt32("be:opcode", &opcode) == B_OK) {
|
---|
43 | - if (fInputMethodWindow && opcode == B_INPUT_METHOD_STOPPED) {
|
---|
44 | - fInputMethodWindow->PostMessage(B_QUIT_REQUESTED);
|
---|
45 | - fInputMethodWindow = NULL;
|
---|
46 | - continue;
|
---|
47 | - }
|
---|
48 | if (fInputMethodWindow == NULL
|
---|
49 | && opcode == B_INPUT_METHOD_STARTED)
|
---|
50 | fInputMethodWindow = new (nothrow) BottomlineWindow();
|
---|
51 | - }
|
---|
52 |
|
---|
53 | ! if (fInputMethodWindow != NULL) {
|
---|
54 | ! EventList newEvents;
|
---|
55 | ! fInputMethodWindow->HandleInputMethodEvent(event, newEvents);
|
---|
56 | !
|
---|
57 | ! if (!newEvents.IsEmpty()) {
|
---|
58 | ! fInputMethodWindow->PostMessage(B_QUIT_REQUESTED);
|
---|
59 | ! fInputMethodWindow = NULL;
|
---|
60 |
|
---|
61 | // replace event with new events (but don't scan them again
|
---|
62 | // for input method messages)
|
---|
63 | ! events.RemoveItemAt(i);
|
---|
64 | delete event;
|
---|
65 |
|
---|
66 | ! events.AddList(&newEvents, i);
|
---|
67 | ! i += newEvents.CountItems() - 1;
|
---|
68 | ! newCount = events.CountItems();
|
---|
69 | }
|
---|
70 | }
|
---|
71 | }
|
---|
72 | --- 1535,1563 ----
|
---|
73 |
|
---|
74 | int32 opcode;
|
---|
75 | if (event->FindInt32("be:opcode", &opcode) == B_OK) {
|
---|
76 | if (fInputMethodWindow == NULL
|
---|
77 | && opcode == B_INPUT_METHOD_STARTED)
|
---|
78 | fInputMethodWindow = new (nothrow) BottomlineWindow();
|
---|
79 |
|
---|
80 | ! if (fInputMethodWindow != NULL) {
|
---|
81 | ! EventList newEvents;
|
---|
82 | ! fInputMethodWindow->HandleInputMethodEvent(event, newEvents);
|
---|
83 |
|
---|
84 | // replace event with new events (but don't scan them again
|
---|
85 | // for input method messages)
|
---|
86 | ! events.RemoveItemAt(i--);
|
---|
87 | delete event;
|
---|
88 | + newCount--;
|
---|
89 |
|
---|
90 | ! if (!newEvents.IsEmpty()) {
|
---|
91 | ! events.AddList(&newEvents);
|
---|
92 | ! opcode = B_INPUT_METHOD_STOPPED;
|
---|
93 | ! }
|
---|
94 | !
|
---|
95 | ! if (opcode == B_INPUT_METHOD_STOPPED) {
|
---|
96 | ! fInputMethodWindow->PostMessage(B_QUIT_REQUESTED);
|
---|
97 | ! fInputMethodWindow = NULL;
|
---|
98 | ! }
|
---|
99 | }
|
---|
100 | }
|
---|
101 | }
|
---|