From 98e30c67df0bd2224c3c2b136f14be4f63f52181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 8 Aug 2011 21:11:03 +0000 Subject: [PATCH] =?UTF-8?q?*=20Fixed=20style=20violation=20(tab=20before?= =?UTF-8?q?=20'{'=20that=20J=C3=83=C2=A9r=C3=83=C2=B4me=20already=20mentio?= =?UTF-8?q?ned),=20and=20=20=20merged=20the=20two=20ifs.=20*=20Automatic?= =?UTF-8?q?=20white=20space=20cleanup.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42602 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/input/InputServer.cpp | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/servers/input/InputServer.cpp b/src/servers/input/InputServer.cpp index 767994112d..8b44ef8eb5 100644 --- a/src/servers/input/InputServer.cpp +++ b/src/servers/input/InputServer.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2002-2010, Haiku, Inc. All Rights Reserved. + * Copyright 2002-2011, Haiku, Inc. All Rights Reserved. * Distributed under the terms of the MIT License. */ @@ -1017,14 +1017,14 @@ InputServer::SetNextMethod(bool direction) int32 index = gInputMethodList.IndexOf(fActiveMethod); int32 oldIndex = index; - + index += (direction ? 1 : -1); if (index < -1) index = gInputMethodList.CountItems() - 1; if (index >= gInputMethodList.CountItems()) index = -1; - + if (index == oldIndex) return B_BAD_INDEX; @@ -1465,7 +1465,7 @@ InputServer::_UpdateMouseAndKeys(EventList& events) // we scan for Alt+Space key down events which means we change // to next input method // (pressing "shift" will let us switch to the previous method) - + // If there is only one input method, SetNextMethod will return // B_BAD_INDEX and the event will be forwarded to the user. @@ -1476,15 +1476,14 @@ InputServer::_UpdateMouseAndKeys(EventList& events) if (event->FindInt8("byte", (int8*)&byte) < B_OK) byte = 0; - if (((fKeyInfo.modifiers & B_COMMAND_KEY) != 0 && byte == ' ') - || byte == B_HANKAKU_ZENKAKU) { - if (SetNextMethod(!(fKeyInfo.modifiers & B_SHIFT_KEY)) - == B_OK) { - // this event isn't sent to the user - events.RemoveItemAt(index); - delete event; - continue; - } + if ((((fKeyInfo.modifiers & B_COMMAND_KEY) != 0 && byte == ' ') + || byte == B_HANKAKU_ZENKAKU) + && SetNextMethod((fKeyInfo.modifiers & B_SHIFT_KEY) == 0) + == B_OK) { + // this event isn't sent to the user + events.RemoveItemAt(index); + delete event; + continue; } break; }