diff --git a/shared/qpa/oxidescreen.cpp b/shared/qpa/oxidescreen.cpp index aa048533b..658974afc 100644 --- a/shared/qpa/oxidescreen.cpp +++ b/shared/qpa/oxidescreen.cpp @@ -55,6 +55,27 @@ void OxideScreen::removeWindow(OxideWindow* window){ window->requestActivateWindow(); } +void OxideScreen::raiseTopWindow(){ + auto window = topPlatformWindow(); + if(window != nullptr){ + window->raise(); + } +} + +void OxideScreen::lowerTopWindow(){ + auto window = topPlatformWindow(); + if(window != nullptr){ + window->lower(); + } +} + +void OxideScreen::closeTopWindow(){ + auto window = topPlatformWindow(); + if(window != nullptr){ + window->close(); + } +} + bool OxideScreen::event(QEvent* event){ if(event->type() == QEvent::UpdateRequest){ redraw(); diff --git a/shared/qpa/oxidescreen.h b/shared/qpa/oxidescreen.h index 18919e9f0..248baf48e 100644 --- a/shared/qpa/oxidescreen.h +++ b/shared/qpa/oxidescreen.h @@ -26,6 +26,11 @@ class Q_DECL_EXPORT OxideScreen : public QObject, public QPlatformScreen{ void addWindow(OxideWindow* window); void removeWindow(OxideWindow* window); +public slots: + void raiseTopWindow(); + void lowerTopWindow(); + void closeTopWindow(); + protected: bool event(QEvent *event) override;