diff options
| author | 2021-11-10 00:54:13 -0500 | |
|---|---|---|
| committer | 2021-11-10 00:54:13 -0500 | |
| commit | beb08eb751fa8e1f72042f263316ab5e5ddb596d (patch) | |
| tree | 3b00df983527648bdae610ac7b88cb639b1f1828 /src/test/integtests/platform/XWindowsScreenTests.cpp | |
| parent | fbc30002ab3438356c0476e70c4577a0310d52c0 (diff) | |
New upstream version 2.4.0+dfsg.upstream/2.4.0+dfsgupstream
Diffstat (limited to 'src/test/integtests/platform/XWindowsScreenTests.cpp')
| -rw-r--r-- | src/test/integtests/platform/XWindowsScreenTests.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/test/integtests/platform/XWindowsScreenTests.cpp b/src/test/integtests/platform/XWindowsScreenTests.cpp index d8f75e1..53f113e 100644 --- a/src/test/integtests/platform/XWindowsScreenTests.cpp +++ b/src/test/integtests/platform/XWindowsScreenTests.cpp @@ -20,16 +20,22 @@ #include "platform/XWindowsScreen.h" #include "test/global/gtest.h" +#include <cstdlib> using ::testing::_; TEST(CXWindowsScreenTests, fakeMouseMove_nonPrimary_getCursorPosValuesCorrect) { + const char* displayName = std::getenv("DISPLAY"); + if (displayName == NULL) { + displayName = ":0.0"; + } + MockEventQueue eventQueue; EXPECT_CALL(eventQueue, adoptHandler(_, _, _)).Times(2); EXPECT_CALL(eventQueue, adoptBuffer(_)).Times(2); EXPECT_CALL(eventQueue, removeHandler(_, _)).Times(2); - XWindowsScreen screen(new XWindowsImpl(), ":0.0", false, false, 0, &eventQueue); + XWindowsScreen screen(new XWindowsImpl(), displayName, false, false, 0, &eventQueue); screen.fakeMouseMove(10, 20); |
