diff --git a/src/servers/input/InputServer.cpp b/src/servers/input/InputServer.cpp index 8c791dee70..c428778c4e 100644 --- a/src/servers/input/InputServer.cpp +++ b/src/servers/input/InputServer.cpp @@ -147,11 +147,14 @@ InputDeviceListItem::Matches(const char* name, input_device_type type) const InputServer::InputServer() : BApplication(INPUTSERVER_SIGNATURE), fSafeMode(false), + fKeyboardID(0), fInputDeviceListLocker("input server device list"), fKeyboardSettings(), fMouseSettings(), fChars(NULL), fScreen(B_MAIN_SCREEN_ID), + fEventQueueLock("input server event queue"), + fReplicantMessenger(NULL), fInputMethodWindow(NULL), fInputMethodAware(false), fCursorSem(-1), @@ -273,8 +276,11 @@ InputServer::_InitKeyboardMouseStates() fFrame = fScreen.Frame(); if (fFrame == BRect(0, 0, 0, 0)) - fFrame = BRect(0, 0, 800, 600); - fMousePos = BPoint(fFrame.right / 2, fFrame.bottom / 2); + fFrame = BRect(0, 0, 799, 599); + fMousePos = BPoint((int32)((fFrame.right + 1) / 2), + (int32)((fFrame.bottom + 1) / 2)); + + memset(&fKeyInfo, 0, sizeof(fKeyInfo)); if (_LoadKeymap() != B_OK) _LoadSystemKeymap(); diff --git a/src/servers/input/InputServer.h b/src/servers/input/InputServer.h index 735832c07b..41baf3d903 100644 --- a/src/servers/input/InputServer.h +++ b/src/servers/input/InputServer.h @@ -209,10 +209,7 @@ class InputServer : public BApplication { void _ReleaseInput(BMessage* message); private: - bool fEventLoopRunning; bool fSafeMode; - port_id fEventPort; - uint16 fKeyboardID; BList fInputDeviceList; @@ -251,7 +248,6 @@ class InputServer : public BApplication { #else uint32* fCursorBuffer; #endif - }; extern InputServer* gInputServer;