mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-13 07:06:10 +08:00
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:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user