mirror of
https://github.com/debauchee/barrier.git
synced 2026-07-07 20:38:57 +08:00
Feature to drag a file from Windows to Mac:
- On Mac client main thread is used for cocoa application in order to simulate drag. - Send dragging file dir from Windows server to Mac client while dragging after switching screen. - Dragging information sending is immature now (need to support multi files dragging in the future). - Used Cocoa function to monitor dragg pasteboard. - Changed Mac client to use another thread for event queue instead of the main thread. - Change fileRecieveComplete to fileRecieveCompleted.
This commit is contained in:
@@ -50,6 +50,10 @@
|
||||
#include "COSXScreen.h"
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#include "COSXDragSimulator.h"
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -531,7 +535,17 @@ CClientApp::mainLoop()
|
||||
// later. the timer installed by startClient() will take care of
|
||||
// that.
|
||||
DAEMON_RUNNING(true);
|
||||
|
||||
#if defined(__APPLE__)
|
||||
CThread thread(
|
||||
new TMethodJob<CClientApp>(
|
||||
this, &CClientApp::runEventsLoop,
|
||||
NULL));
|
||||
runCocoaApp();
|
||||
#else
|
||||
m_events->loop();
|
||||
#endif
|
||||
|
||||
DAEMON_RUNNING(false);
|
||||
|
||||
// close down
|
||||
@@ -612,3 +626,10 @@ CClientApp::startNode()
|
||||
m_bye(kExitFailed);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CClientApp::runEventsLoop(void*)
|
||||
{
|
||||
m_events->cacheCurrentEventQueueRef();
|
||||
m_events->loop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user