Esempio n. 1
0
void WinDesktop::setMouseEvent(UINT16 x, UINT16 y, UINT8 buttonMask)
{
  Log::info(_T("set mouse event (x = %u, y = %u)"), (UINT32)x, (UINT32)y);
  Point point(x, y);
  try {
    if (isRemoteInputAllowed()) {
      m_userInput->setMouseEvent(&point, buttonMask);
    }
  } catch (...) {
    m_extDeskTermListener->onAbnormalDesktopTerminate();
  }
}
Esempio n. 2
0
void WinDesktop::setKeyboardEvent(UINT32 keySym, bool down)
{
  Log::info(_T("set keyboard event (keySym = %u, down = %d)"), keySym, (int)down);
  try {
    if (isRemoteInputAllowed()) {
      m_userInput->setKeyboardEvent(keySym, down);
    }
  } catch (Exception &e) {
    Log::error(_T("setKeyboardEvent() crashed: %s"), e.getMessage());
    m_extDeskTermListener->onAbnormalDesktopTerminate();
  }
}
void DesktopBaseImpl::setMouseEvent(UINT16 x, UINT16 y, UINT8 buttonMask)
{
  _ASSERT(m_userInput != 0);
  _ASSERT(m_extDeskTermListener != 0);

  m_log->info(_T("set mouse event (x = %u, y = %u)"), (UINT32)x, (UINT32)y);
  Point point(x, y);
  try {
    if (isRemoteInputAllowed()) {
      m_userInput->setMouseEvent(&point, buttonMask);
    }
  } catch (...) {
    m_extDeskTermListener->onAbnormalDesktopTerminate();
  }
}