faked escape key down and up then a left mouse button up in CServer when isSwitchOkay return true.

removed the assertions in CScreen so server screen can fake input event as well.
This commit is contained in:
jerry 2013-09-23 15:31:34 +00:00
parent f6ecf9322c
commit 57db3da6f3
3 changed files with 13 additions and 16 deletions

View file

@ -1741,6 +1741,11 @@ CServer::onMouseMovePrimary(SInt32 x, SInt32 y)
// should we switch or not?
if (isSwitchOkay(newScreen, dir, x, y, xc, yc)) {
if (m_screen->getDraggingStarted() && m_active != newScreen) {
// fake a escape key down and up then left mouse button up
m_screen->keyDown(kKeyEscape, 8192, 1);
m_screen->keyUp(kKeyEscape, 8192, 1);
m_screen->mouseUp(kButtonLeft);
CString& dragFileList = m_screen->getDraggingFileDir();
size_t size = dragFileList.size() + 1;
char* fileList = new char[size];