Raise window to the top on MacOS

This commit is contained in:
Yuriy Puchkov
2020-11-27 02:44:48 -08:00
parent bad270cce4
commit 9e897289b6
2 changed files with 15 additions and 0 deletions

View File

@@ -36,5 +36,11 @@
<string>NSApplication</string> <string>NSApplication</string>
<key>NSHighResolutionCapable</key> <key>NSHighResolutionCapable</key>
<string>True</string> <string>True</string>
<key>LSUIElement</key>
<string>1</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Application requires access to save screenshots to your gallery</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
</dict> </dict>
</plist> </plist>

View File

@@ -156,6 +156,7 @@ void Controller::startVisualCapture(const uint id,
// m_captureWindow->show(); // m_captureWindow->show();
m_captureWindow->showFullScreen(); m_captureWindow->showFullScreen();
m_captureWindow->activateWindow(); m_captureWindow->activateWindow();
m_captureWindow->raise();
#else #else
m_captureWindow->showFullScreen(); m_captureWindow->showFullScreen();
#endif #endif
@@ -190,6 +191,7 @@ void Controller::openConfigWindow()
#if (defined(Q_OS_MAC) || defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || \ #if (defined(Q_OS_MAC) || defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || \
defined(Q_OS_MACX)) defined(Q_OS_MACX))
m_configWindow->activateWindow(); m_configWindow->activateWindow();
m_configWindow->raise();
#endif #endif
} }
} }
@@ -199,6 +201,11 @@ void Controller::openInfoWindow()
{ {
if (!m_infoWindow) { if (!m_infoWindow) {
m_infoWindow = new InfoWindow(); m_infoWindow = new InfoWindow();
#if (defined(Q_OS_MAC) || defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || \
defined(Q_OS_MACX))
m_infoWindow->activateWindow();
m_infoWindow->raise();
#endif
} }
} }
@@ -211,6 +218,7 @@ void Controller::openLauncherWindow()
#if (defined(Q_OS_MAC) || defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || \ #if (defined(Q_OS_MAC) || defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || \
defined(Q_OS_MACX)) defined(Q_OS_MACX))
m_launcherWindow->activateWindow(); m_launcherWindow->activateWindow();
m_launcherWindow->raise();
#endif #endif
} }
@@ -337,6 +345,7 @@ void Controller::showRecentScreenshots()
#if (defined(Q_OS_MAC) || defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || \ #if (defined(Q_OS_MAC) || defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || \
defined(Q_OS_MACX)) defined(Q_OS_MACX))
m_history->activateWindow(); m_history->activateWindow();
m_history->raise();
#endif #endif
} }