You're creating a view and assigning it to m_overlayView twice.

Grtz,
Sander


On maandag 2 december 2019 23:27:40 CET Thomas Eigel wrote:
> 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-unsubscr...@lists.sailfishos.org

Reply via email to