mirror of
https://github.com/debauchee/barrier.git
synced 2025-07-14 23:27:38 +02:00
refactored duplicated code in dragInfoReceived
refactored fakeDraggigFiles interface
This commit is contained in:
parent
fd68b70878
commit
f773ff3d00
11 changed files with 29 additions and 48 deletions
|
@ -2075,12 +2075,16 @@ COSXScreen::CFStringRefToUTF8String(CFStringRef aString)
|
|||
}
|
||||
|
||||
void
|
||||
COSXScreen::fakeDraggingFiles(CString str)
|
||||
COSXScreen::fakeDraggingFiles(CDragFileList fileList)
|
||||
{
|
||||
m_fakeDraggingStarted = true;
|
||||
CString fileExt;
|
||||
if (fileList.size() == 1) {
|
||||
fileExt = CDragInformation::getDragFileExtension(fileList.at(0));
|
||||
}
|
||||
|
||||
#if defined(MAC_OS_X_VERSION_10_7)
|
||||
// TODO: use real file extension
|
||||
fakeDragging(str.c_str(), m_xCursor, m_yCursor);
|
||||
fakeDragging(fileExt.c_str(), m_xCursor, m_yCursor);
|
||||
#else
|
||||
LOG((CLOG_WARN "drag drop not supported"));
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue