added some debug PRINT

inited fChars to null


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14326 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2005-10-06 15:43:21 +00:00
parent 88ef6ce8fe
commit c495f81aab
+8
View File
@@ -119,6 +119,7 @@ int main()
*/ */
InputServer::InputServer(void) : BApplication(INPUTSERVER_SIGNATURE), InputServer::InputServer(void) : BApplication(INPUTSERVER_SIGNATURE),
sSafeMode(false), sSafeMode(false),
fChars(NULL),
fScreen(B_MAIN_SCREEN_ID), fScreen(B_MAIN_SCREEN_ID),
fBLWindow(NULL), fBLWindow(NULL),
fIMAware(false) fIMAware(false)
@@ -808,8 +809,11 @@ InputServer::HandleSetMousePosition(BMessage *message, BMessage *outbound)
outbound->FindInt32("modifiers", (int32*)&fKey_info.modifiers); outbound->FindInt32("modifiers", (int32*)&fKey_info.modifiers);
if ((outbound->FindData("states", B_UINT8_TYPE, (const void**)&data, &size) == B_OK) if ((outbound->FindData("states", B_UINT8_TYPE, (const void**)&data, &size) == B_OK)
&& (size == (ssize_t)sizeof(fKey_info.key_states))) { && (size == (ssize_t)sizeof(fKey_info.key_states))) {
PRINT(("updated keyinfo\n"));
memcpy(fKey_info.key_states, data, size); memcpy(fKey_info.key_states, data, size);
} }
PRINT(("keyinfo %ld %ld\n", size, (ssize_t)sizeof(fKey_info.key_states)));
} }
default: default:
break; break;
@@ -1542,13 +1546,17 @@ InputServer::SanitizeEvents(BList *events)
CALLED(); CALLED();
int32 index = 0; int32 index = 0;
BMessage *event; BMessage *event;
PRINT(("SanitizeEvents: %ld \n", events->CountItems()));
while (NULL != (event = (BMessage*)events->ItemAt(index) ) ) { while (NULL != (event = (BMessage*)events->ItemAt(index) ) ) {
PRINT(("SanitizeEvents: what:%lx\n", event->what));
switch (event->what) { switch (event->what) {
case B_KEY_DOWN: case B_KEY_DOWN:
case B_UNMAPPED_KEY_DOWN: case B_UNMAPPED_KEY_DOWN:
// we scan for Alt+Space key down events which means we change to next input method // we scan for Alt+Space key down events which means we change to next input method
// Note : Shift+Alt+Space key allows to change to the previous input method // Note : Shift+Alt+Space key allows to change to the previous input method
PRINT(("SanitizeEvents: %lx, %lx\n",fKey_info.modifiers, fKey_info.key_states[KEY_Spacebar >> 3] ));
if ((fKey_info.modifiers & B_COMMAND_KEY) if ((fKey_info.modifiers & B_COMMAND_KEY)
&& (fKey_info.key_states[KEY_Spacebar >> 3] & (1 << (7 - (KEY_Spacebar % 8))))) { && (fKey_info.key_states[KEY_Spacebar >> 3] & (1 << (7 - (KEY_Spacebar % 8))))) {
SetNextMethod(!fKey_info.modifiers & B_SHIFT_KEY); SetNextMethod(!fKey_info.modifiers & B_SHIFT_KEY);