incorporating sonar's major
This commit is contained in:
parent
b9d3ce8aa0
commit
23037d7932
3 changed files with 24 additions and 28 deletions
|
|
@ -61,7 +61,7 @@ ArchFileUnix::getUserDirectory()
|
|||
std::string dir;
|
||||
#if HAVE_GETPWUID_R
|
||||
struct passwd pwent;
|
||||
struct passwd* pwentp;
|
||||
struct passwd* pwentp {};
|
||||
#if defined(_SC_GETPW_R_SIZE_MAX)
|
||||
long size = sysconf(_SC_GETPW_R_SIZE_MAX);
|
||||
if (size == -1) {
|
||||
|
|
|
|||
|
|
@ -848,12 +848,12 @@ void
|
|||
XWindowsScreen::fakeMouseRelativeMove(SInt32 dx, SInt32 dy) const
|
||||
{
|
||||
// FIXME -- ignore xinerama for now
|
||||
if (false && m_xinerama && m_xtestIsXineramaUnaware) {
|
||||
// XWarpPointer(m_display, None, m_root, 0, 0, 0, 0, x, y);
|
||||
}
|
||||
else {
|
||||
XTestFakeRelativeMotionEvent(m_display, dx, dy, CurrentTime);
|
||||
}
|
||||
// if (false && m_xinerama && m_xtestIsXineramaUnaware) {
|
||||
// XWarpPointer(m_display, None, m_root, 0, 0, 0, 0, x, y);
|
||||
// }
|
||||
// else {
|
||||
XTestFakeRelativeMotionEvent(m_display, dx, dy, CurrentTime);
|
||||
// }
|
||||
XFlush(m_display);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -174,28 +174,24 @@ ArgParser::parsePlatformArg(lib::synergy::ArgsBase& argsBase, const int& argc, c
|
|||
bool
|
||||
ArgParser::parseToolArgs(ToolArgs& args, int argc, const char* const* argv)
|
||||
{
|
||||
for (int i = 1; i < argc; ++i) {
|
||||
if (isArg(i, argc, argv, NULL, "--get-active-desktop", 0)) {
|
||||
args.m_printActiveDesktopName = true;
|
||||
return true;
|
||||
}
|
||||
else if (isArg(i, argc, argv, NULL, "--get-installed-dir", 0)) {
|
||||
args.m_getInstalledDir = true;
|
||||
return true;
|
||||
}
|
||||
else if (isArg(i, argc, argv, NULL, "--get-profile-dir", 0)) {
|
||||
args.m_getProfileDir = true;
|
||||
return true;
|
||||
}
|
||||
else if (isArg(i, argc, argv, NULL, "--get-arch", 0)) {
|
||||
args.m_getArch = true;
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
// We support exactly one argument at a fix position
|
||||
static const int only_index {1};
|
||||
if (isArg(only_index, argc, argv, NULL, "--get-active-desktop", 0)) {
|
||||
args.m_printActiveDesktopName = true;
|
||||
return true;
|
||||
}
|
||||
else if (isArg(only_index, argc, argv, NULL, "--get-installed-dir", 0)) {
|
||||
args.m_getInstalledDir = true;
|
||||
return true;
|
||||
}
|
||||
else if (isArg(only_index, argc, argv, NULL, "--get-profile-dir", 0)) {
|
||||
args.m_getProfileDir = true;
|
||||
return true;
|
||||
}
|
||||
else if (isArg(only_index, argc, argv, NULL, "--get-arch", 0)) {
|
||||
args.m_getArch = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue