Commit Graph

10 Commits (d600b1c9fd6659f79ef15fc3eba481b43b51f28c)

Author SHA1 Message Date
Chris Burel 0502ddbe2b [Linux] Return the active window when there's no cursor constraint window
The cursor constraint window is only set by the Editor. In the game
launcher, this function was returning a null window, which makes
`GetSystemCursorPositionNormalized()` unable to determine the cursor
position. This in turn causes mouse input in ImGui to not work.

Fixes #4722, LYN-7491

Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
Chris Burel 43c83f13c6 [Linux] Add unit tests for xcb mouse input
Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
Chris Burel 5967b419a2
Only enable the Keyboard device in the XcbKeyboard unit tests (#4682)
This prevents other input devices from interfering with the expected calls
that the Keyboard tests should make.

Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
Chris Burel 189aa5f3ac
Disable the creation of the UserSettings.xml file in Xcb tests (#4593)
Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
Chris Burel 8668d8b2fe [XCB] Avoid emitting text events when a key press does not generate text
Many keys will generate key press events but return an empty string from
`xkb_state_key_get_utf8`, like modifier keys, arrow keys, function keys,
etc. This checks if the string retrieved from such a key press is empty
before emitting an associated text event for it, to avoid notifying a
potentially large number of listeners about an empty string.

Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
Chris Burel 3e0535e211 [XCB] Add tests to cover text events from key presses
Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
Chris Burel b1b52c201f [XCB] Add test fixtures for xcb connection and keyboard setup
Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
Chris Burel aa8594b491
Add a unit test for `XcbInputDeviceKeyboard` (#4393)
* Use XcbUniquePtr to manage xcb resources

Signed-off-by: Chris Burel <burelc@amazon.com>

* Add a unit test for XcbInputDeviceKeyboard

Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
Steve Pham 38261d0800
Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
4 years ago
Esteban Papp afd97abdcf Move files to AzFramework/Test and AzToolsFramework/Test accordingly
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
5 years ago