diff --git a/src/core/capturerequest.h b/src/core/capturerequest.h index 45ea4a20..39abdcfb 100644 --- a/src/core/capturerequest.h +++ b/src/core/capturerequest.h @@ -18,6 +18,7 @@ #pragma once #include +#include class CaptureRequest { public: diff --git a/src/core/controller.cpp b/src/core/controller.cpp index e84400b1..671686b6 100644 --- a/src/core/controller.cpp +++ b/src/core/controller.cpp @@ -50,7 +50,9 @@ Controller::Controller() : m_captureWindow(nullptr) { GlobalShortcutFilter *nativeFilter = new GlobalShortcutFilter(this); qApp->installNativeEventFilter(nativeFilter); connect(nativeFilter, &GlobalShortcutFilter::printPressed, - this, [this](){ this->createVisualCapture(); }); + this, [this](){ + this->requestCapture(CaptureRequest(CaptureRequest::GRAPHICAL_MODE)); + }); #endif QString StyleSheet = CaptureButton::globalStyleSheet(); diff --git a/src/core/controller.h b/src/core/controller.h index 043a2954..b58d9b1d 100644 --- a/src/core/controller.h +++ b/src/core/controller.h @@ -21,6 +21,7 @@ #include #include #include +#include #include #include diff --git a/src/core/globalshortcutfilter.cpp b/src/core/globalshortcutfilter.cpp index 534f9683..58d83c88 100644 --- a/src/core/globalshortcutfilter.cpp +++ b/src/core/globalshortcutfilter.cpp @@ -43,7 +43,8 @@ bool GlobalShortcutFilter::nativeEventFilter( // TODO: this is just a temporal workwrround, proper global // support would need custom shortcuts defined by the user. - Controller::getInstance()->startVisualCapture(); + Controller::getInstance()->requestCapture( + CaptureRequest(CaptureRequest::GRAPHICAL_MODE)); return true; } return false;