* Initialize member variables.

* Remove some unused members.
* Avoid initializing the mouse position to non-integer coordinates.
* The frame right/bottom are width/height - 1.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32979 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2009-09-07 01:37:22 +00:00
parent 5987738cbe
commit 156b8d5d2d
2 changed files with 8 additions and 6 deletions

View File

@ -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();

View File

@ -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;