[SailfishDevel] Close app in background with visible overlay

Андрей Кожевников coderusinbox at gmail.com
Tue Dec 3 07:10:05 UTC 2019


Hello. Please repeat your actual question. I dont understand what the
problem is and what are you trying to achieve.

вт, 3 дек. 2019 г. в 01:27, Thomas Eigel <yurumi at gmx.de>:

> Hi all,
>
> I have a quite special question: When my app (schwarzenmaker) runs in the
> background, an overlay is visible to show some kind of progress. If the app
> is closed from home screen the program keeps up running (cover disappears
> but 'ps aux' still showing the process and overlay still visible). Closing
> works as expected when the overlay is hidden beforehand.
>
> I tried listening to different signals but to no avail:
>
>   - quit, aboutToQuit: Don't seem to be emitted since the program is not
> quitting until the overlay is hidden.
>   - onStatusChanged: Is emitted when app is moved to background
> (Qt.ApplicationInactive) but no new signal when app is "closed".
>
> The code to create the overlay (which I don't fully understand) can be
> sketched as follows:
>
> m_overlayView = SailfishApp::createView();
>
> m_overlayView->setSource(SailfishApp::pathTo("qml/components/overlay.qml"));
> m_overlayView->create();
> QPlatformNativeInterface *native =
> QGuiApplication::platformNativeInterface();
> native->setWindowProperty(m_overlayView->handle(),
> QLatin1String("CATEGORY"), "notification");
> native->setWindowProperty(m_overlayView->handle(),
> QLatin1String("MOUSE_REGION"), QRegion(0, 0, 0, 0));
> m_overlayView = SailfishApp::createView();
>
> Maybe closing fails because another "window" is created. So my question
> is: Does anybody know how to detect the attempted closing of the app?
>
> Cheers,
> Thomas
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to
> devel-unsubscribe at lists.sailfishos.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20191203/6959813a/attachment.html>


More information about the Devel mailing list