From 69e698bdb1d9d7bb7c58ce2cb9aaf4e1e9e65b30 Mon Sep 17 00:00:00 2001 From: Yuriy Puchkov Date: Tue, 24 Nov 2020 10:08:12 -0800 Subject: [PATCH] Fix - MacOS - activate new widgets, swith to fullscreen mode+hotkeys --- src/core/controller.cpp | 16 +++++++++++++++- src/widgets/capture/capturewidget.cpp | 11 +++++++---- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/core/controller.cpp b/src/core/controller.cpp index 69973cd0..c795bf5f 100644 --- a/src/core/controller.cpp +++ b/src/core/controller.cpp @@ -152,7 +152,9 @@ void Controller::startVisualCapture(const uint id, m_captureWindow->show(); #elif (defined(Q_OS_MAC) || defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || \ defined(Q_OS_MACX)) - m_captureWindow->show(); + // In "Emulate fullscreen mode" + // m_captureWindow->show(); + m_captureWindow->showFullScreen(); m_captureWindow->activateWindow(); #else m_captureWindow->showFullScreen(); @@ -185,6 +187,10 @@ void Controller::openConfigWindow() if (!m_configWindow) { m_configWindow = new ConfigWindow(); m_configWindow->show(); +#if (defined(Q_OS_MAC) || defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || \ + defined(Q_OS_MACX)) + m_configWindow->activateWindow(); +#endif } } @@ -202,6 +208,10 @@ void Controller::openLauncherWindow() m_launcherWindow = new CaptureLauncher(); } m_launcherWindow->show(); +#if (defined(Q_OS_MAC) || defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || \ + defined(Q_OS_MACX)) + m_launcherWindow->activateWindow(); +#endif } void Controller::enableTrayIcon() @@ -324,6 +334,10 @@ void Controller::showRecentScreenshots() } m_history->loadHistory(); m_history->show(); +#if (defined(Q_OS_MAC) || defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || \ + defined(Q_OS_MACX)) + m_history->activateWindow(); +#endif } void Controller::startFullscreenCapture(const uint id) diff --git a/src/widgets/capture/capturewidget.cpp b/src/widgets/capture/capturewidget.cpp index c4b364ca..17f403a2 100644 --- a/src/widgets/capture/capturewidget.cpp +++ b/src/widgets/capture/capturewidget.cpp @@ -115,10 +115,13 @@ CaptureWidget::CaptureWidget(const uint id, resize(pixmap().size()); #elif (defined(Q_OS_MAC) || defined(Q_OS_MAC64) || defined(Q_OS_MACOS) || \ defined(Q_OS_MACX)) - setWindowFlags(Qt::WindowStaysOnTopHint | Qt::BypassWindowManagerHint | - Qt::FramelessWindowHint | Qt::NoDropShadowWindowHint | - Qt::ToolTip | Qt::Popup); - + // Emulate fullscreen mode + // setWindowFlags(Qt::WindowStaysOnTopHint | + // Qt::BypassWindowManagerHint | + // Qt::FramelessWindowHint | + // Qt::NoDropShadowWindowHint | Qt::ToolTip | + // Qt::Popup + // ); QScreen* currentScreen = QGuiApplication::screenAt(QCursor::pos()); move(currentScreen->geometry().x(), currentScreen->geometry().y()); resize(currentScreen->size());