* 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:
@@ -147,11 +147,14 @@ InputDeviceListItem::Matches(const char* name, input_device_type type) const
|
|||||||
InputServer::InputServer()
|
InputServer::InputServer()
|
||||||
: BApplication(INPUTSERVER_SIGNATURE),
|
: BApplication(INPUTSERVER_SIGNATURE),
|
||||||
fSafeMode(false),
|
fSafeMode(false),
|
||||||
|
fKeyboardID(0),
|
||||||
fInputDeviceListLocker("input server device list"),
|
fInputDeviceListLocker("input server device list"),
|
||||||
fKeyboardSettings(),
|
fKeyboardSettings(),
|
||||||
fMouseSettings(),
|
fMouseSettings(),
|
||||||
fChars(NULL),
|
fChars(NULL),
|
||||||
fScreen(B_MAIN_SCREEN_ID),
|
fScreen(B_MAIN_SCREEN_ID),
|
||||||
|
fEventQueueLock("input server event queue"),
|
||||||
|
fReplicantMessenger(NULL),
|
||||||
fInputMethodWindow(NULL),
|
fInputMethodWindow(NULL),
|
||||||
fInputMethodAware(false),
|
fInputMethodAware(false),
|
||||||
fCursorSem(-1),
|
fCursorSem(-1),
|
||||||
@@ -273,8 +276,11 @@ InputServer::_InitKeyboardMouseStates()
|
|||||||
|
|
||||||
fFrame = fScreen.Frame();
|
fFrame = fScreen.Frame();
|
||||||
if (fFrame == BRect(0, 0, 0, 0))
|
if (fFrame == BRect(0, 0, 0, 0))
|
||||||
fFrame = BRect(0, 0, 800, 600);
|
fFrame = BRect(0, 0, 799, 599);
|
||||||
fMousePos = BPoint(fFrame.right / 2, fFrame.bottom / 2);
|
fMousePos = BPoint((int32)((fFrame.right + 1) / 2),
|
||||||
|
(int32)((fFrame.bottom + 1) / 2));
|
||||||
|
|
||||||
|
memset(&fKeyInfo, 0, sizeof(fKeyInfo));
|
||||||
|
|
||||||
if (_LoadKeymap() != B_OK)
|
if (_LoadKeymap() != B_OK)
|
||||||
_LoadSystemKeymap();
|
_LoadSystemKeymap();
|
||||||
|
|||||||
@@ -209,10 +209,7 @@ class InputServer : public BApplication {
|
|||||||
void _ReleaseInput(BMessage* message);
|
void _ReleaseInput(BMessage* message);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool fEventLoopRunning;
|
|
||||||
bool fSafeMode;
|
bool fSafeMode;
|
||||||
port_id fEventPort;
|
|
||||||
|
|
||||||
uint16 fKeyboardID;
|
uint16 fKeyboardID;
|
||||||
|
|
||||||
BList fInputDeviceList;
|
BList fInputDeviceList;
|
||||||
@@ -251,7 +248,6 @@ class InputServer : public BApplication {
|
|||||||
#else
|
#else
|
||||||
uint32* fCursorBuffer;
|
uint32* fCursorBuffer;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern InputServer* gInputServer;
|
extern InputServer* gInputServer;
|
||||||
|
|||||||
Reference in New Issue
Block a user