moved fake esc and lmb between getDropFileURL and draggingInfoSending, otherwise it would make getDropFileURl return null or fail to fake lmb up on carbon hardware layer, then can not move mouse back from client
This commit is contained in:
parent
57db3da6f3
commit
e145fef76f
|
@ -920,19 +920,13 @@ COSXScreen::leave()
|
|||
CString fileList(dragInfoCStr);
|
||||
size_t size = fileList.size();
|
||||
|
||||
if (!m_isPrimary) {
|
||||
// fake esc key down and up
|
||||
fakeKeyDown(kKeyEscape, 8192, 1);
|
||||
fakeKeyUp(1);
|
||||
|
||||
fakeMouseButton(kButtonLeft, false);
|
||||
|
||||
if (m_isPrimary) {
|
||||
CServerApp& app = CServerApp::instance();
|
||||
CServer* server = app.getServerPtr();
|
||||
LOG((CLOG_DEBUG "send dragging file to client"));
|
||||
server->sendFileToClient(dragInfoCStr);
|
||||
}
|
||||
else {
|
||||
// fake ctrl key up
|
||||
fakeKeyUp(29);
|
||||
CClientApp& app = CClientApp::instance();
|
||||
|
|
|
@ -1741,11 +1741,6 @@ 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];
|
||||
|
@ -1753,6 +1748,11 @@ CServer::onMouseMovePrimary(SInt32 x, SInt32 y)
|
|||
fileList[size - 1] = '\0';
|
||||
UInt32 fileCount = 1;
|
||||
|
||||
// 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);
|
||||
|
||||
LOG((CLOG_DEBUG2 "sending drag information to client"));
|
||||
LOG((CLOG_DEBUG3 "dragging file list: %s", fileList));
|
||||
LOG((CLOG_DEBUG3 "dragging file list string size: %i", size));
|
||||
|
|
Loading…
Reference in New Issue