chore: remove unneed mac os version checks
This commit is contained in:
parent
78d1c5222f
commit
60dc4c0cd8
2 changed files with 0 additions and 26 deletions
|
|
@ -329,10 +329,8 @@ private:
|
||||||
std::unique_ptr<Thread> m_getDropTargetThread;
|
std::unique_ptr<Thread> m_getDropTargetThread;
|
||||||
std::string m_dropTarget;
|
std::string m_dropTarget;
|
||||||
|
|
||||||
#if defined(MAC_OS_X_VERSION_10_7)
|
|
||||||
Mutex *m_carbonLoopMutex;
|
Mutex *m_carbonLoopMutex;
|
||||||
CondVar<bool> *m_carbonLoopReady;
|
CondVar<bool> *m_carbonLoopReady;
|
||||||
#endif
|
|
||||||
|
|
||||||
OSXPowerManager m_powerManager;
|
OSXPowerManager m_powerManager;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -127,18 +127,10 @@ OSXScreen::OSXScreen(
|
||||||
|
|
||||||
// only needed when running as a server.
|
// only needed when running as a server.
|
||||||
if (m_isPrimary) {
|
if (m_isPrimary) {
|
||||||
|
|
||||||
#if defined(MAC_OS_X_VERSION_10_9)
|
|
||||||
// we can't pass options to show the dialog, this must be done by the gui.
|
// we can't pass options to show the dialog, this must be done by the gui.
|
||||||
if (!AXIsProcessTrusted()) {
|
if (!AXIsProcessTrusted()) {
|
||||||
throw XArch("assistive devices does not trust this process, allow it in system settings.");
|
throw XArch("assistive devices does not trust this process, allow it in system settings.");
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
// now deprecated in mavericks.
|
|
||||||
if (!AXAPIEnabled()) {
|
|
||||||
throw XArch("assistive devices is not enabled, enable it in system settings.");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// install display manager notification handler
|
// install display manager notification handler
|
||||||
|
|
@ -164,10 +156,8 @@ OSXScreen::OSXScreen(
|
||||||
|
|
||||||
// create thread for monitoring system power state.
|
// create thread for monitoring system power state.
|
||||||
*m_pmThreadReady = false;
|
*m_pmThreadReady = false;
|
||||||
#if defined(MAC_OS_X_VERSION_10_7)
|
|
||||||
m_carbonLoopMutex = new Mutex();
|
m_carbonLoopMutex = new Mutex();
|
||||||
m_carbonLoopReady = new CondVar<bool>(m_carbonLoopMutex, false);
|
m_carbonLoopReady = new CondVar<bool>(m_carbonLoopMutex, false);
|
||||||
#endif
|
|
||||||
LOG((CLOG_DEBUG "starting watchSystemPowerThread"));
|
LOG((CLOG_DEBUG "starting watchSystemPowerThread"));
|
||||||
m_pmWatchThread = new Thread(new TMethodJob<OSXScreen>(this, &OSXScreen::watchSystemPowerThread));
|
m_pmWatchThread = new Thread(new TMethodJob<OSXScreen>(this, &OSXScreen::watchSystemPowerThread));
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
|
|
@ -227,10 +217,8 @@ OSXScreen::~OSXScreen()
|
||||||
delete m_keyState;
|
delete m_keyState;
|
||||||
delete m_screensaver;
|
delete m_screensaver;
|
||||||
|
|
||||||
#if defined(MAC_OS_X_VERSION_10_7)
|
|
||||||
delete m_carbonLoopMutex;
|
delete m_carbonLoopMutex;
|
||||||
delete m_carbonLoopReady;
|
delete m_carbonLoopReady;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void *OSXScreen::getEventTarget() const
|
void *OSXScreen::getEventTarget() const
|
||||||
|
|
@ -572,7 +560,6 @@ void OSXScreen::fakeMouseButton(ButtonID id, bool press)
|
||||||
|
|
||||||
void OSXScreen::getDropTargetThread(void *)
|
void OSXScreen::getDropTargetThread(void *)
|
||||||
{
|
{
|
||||||
#if defined(MAC_OS_X_VERSION_10_7)
|
|
||||||
// wait for 5 secs for the drop destinaiton string to be filled.
|
// wait for 5 secs for the drop destinaiton string to be filled.
|
||||||
uint32_t timeout = ARCH->time() + 5;
|
uint32_t timeout = ARCH->time() + 5;
|
||||||
m_dropTarget.clear();
|
m_dropTarget.clear();
|
||||||
|
|
@ -595,9 +582,6 @@ void OSXScreen::getDropTargetThread(void *)
|
||||||
LOG((CLOG_ERR "failed to get drop target"));
|
LOG((CLOG_ERR "failed to get drop target"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
LOG((CLOG_WARN "drag drop not supported"));
|
|
||||||
#endif
|
|
||||||
m_fakeDraggingStarted = false;
|
m_fakeDraggingStarted = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1542,7 +1526,6 @@ void OSXScreen::watchSystemPowerThread(void *)
|
||||||
LOG((CLOG_DEBUG "waiting for event loop"));
|
LOG((CLOG_DEBUG "waiting for event loop"));
|
||||||
m_events->waitForReady();
|
m_events->waitForReady();
|
||||||
|
|
||||||
#if defined(MAC_OS_X_VERSION_10_7)
|
|
||||||
{
|
{
|
||||||
Lock lockCarbon(m_carbonLoopMutex);
|
Lock lockCarbon(m_carbonLoopMutex);
|
||||||
if (*m_carbonLoopReady == false) {
|
if (*m_carbonLoopReady == false) {
|
||||||
|
|
@ -1555,7 +1538,6 @@ void OSXScreen::watchSystemPowerThread(void *)
|
||||||
m_carbonLoopReady->signal();
|
m_carbonLoopReady->signal();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// start the run loop
|
// start the run loop
|
||||||
LOG((CLOG_DEBUG "starting carbon loop"));
|
LOG((CLOG_DEBUG "starting carbon loop"));
|
||||||
|
|
@ -1909,11 +1891,7 @@ void OSXScreen::fakeDraggingFiles(DragFileList fileList)
|
||||||
fileExt = DragInformation::getDragFileExtension(fileList.at(0).getFilename());
|
fileExt = DragInformation::getDragFileExtension(fileList.at(0).getFilename());
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(MAC_OS_X_VERSION_10_7)
|
|
||||||
fakeDragging(fileExt.c_str(), m_xCursor, m_yCursor);
|
fakeDragging(fileExt.c_str(), m_xCursor, m_yCursor);
|
||||||
#else
|
|
||||||
LOG((CLOG_WARN "drag drop not supported"));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string &OSXScreen::getDraggingFilename()
|
std::string &OSXScreen::getDraggingFilename()
|
||||||
|
|
@ -1941,7 +1919,6 @@ std::string &OSXScreen::getDraggingFilename()
|
||||||
|
|
||||||
void OSXScreen::waitForCarbonLoop() const
|
void OSXScreen::waitForCarbonLoop() const
|
||||||
{
|
{
|
||||||
#if defined(MAC_OS_X_VERSION_10_7)
|
|
||||||
if (*m_carbonLoopReady) {
|
if (*m_carbonLoopReady) {
|
||||||
LOG((CLOG_DEBUG "carbon loop already ready"));
|
LOG((CLOG_DEBUG "carbon loop already ready"));
|
||||||
return;
|
return;
|
||||||
|
|
@ -1960,7 +1937,6 @@ void OSXScreen::waitForCarbonLoop() const
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG((CLOG_DEBUG "carbon loop ready"));
|
LOG((CLOG_DEBUG "carbon loop ready"));
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string OSXScreen::getSecureInputApp() const
|
std::string OSXScreen::getSecureInputApp() const
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue