Changed how key state is tracked on X11. Now updating key state

on every key press and release so we don't have to updateKeys()
in isLockedToScreen().  However, if any key appears to be down
we still call updateKeys() to double check that it's really down.
If not we note the spurious lock and don't lock to the screen.
This commit is contained in:
crs
2004-03-14 17:55:53 +00:00
parent 6f19fcfe39
commit 20ba10bfa8
11 changed files with 382 additions and 310 deletions

View File

@@ -67,6 +67,7 @@ public:
virtual void warpCursor(SInt32 x, SInt32 y);
virtual SInt32 getJumpZoneSize() const;
virtual bool isAnyMouseButtonDown() const;
virtual KeyModifierMask getActiveModifiers() const;
virtual void getCursorCenter(SInt32& x, SInt32& y) const;
virtual const char* getKeyName(KeyButton) const;
@@ -123,7 +124,7 @@ private:
bool grabMouseAndKeyboard();
void onKeyPress(XKeyEvent&);
void onKeyRelease(XKeyEvent&);
void onKeyRelease(XKeyEvent&, bool isRepeat);
void onMousePress(const XButtonEvent&);
void onMouseRelease(const XButtonEvent&);
void onMouseMove(const XMotionEvent&);