<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Sure!</div>
<div> </div>
<div>Goal: I want to close my app from home screen when an overlay is visible.</div>
<div>Problem: The cover disappears but the app itself is still running (e.g. overlay can be seen, process still existing).</div>
<div>Question: How can I close the app correctly - including the overlay?</div>
<div> </div>
<div>Thanks,</div>
<div>Thomas</div>
<div>
<div> </div>
<div>PS: If still unclear, user Najoj opened an issue describing the problem: https://github.com/yurumi/harbour-schwarzenmaker/issues/15</div>
<div> </div>
<div>@Андрей: I think, I borrowed the code for the overlay from you a few years ago. Thanks for that and all your support!</div>
<div>
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Dienstag, 03. Dezember 2019 um 08:10 Uhr<br/>
<b>Von:</b> "Андрей Кожевников" <coderusinbox@gmail.com><br/>
<b>An:</b> "Sailfish OS Developers" <devel@lists.sailfishos.org><br/>
<b>Betreff:</b> Re: [SailfishDevel] Close app in background with visible overlay</div>
<div name="quoted-content">
<div>Hello. Please repeat your actual question. I dont understand what the problem is and what are you trying to achieve.</div>
<div class="gmail_quote">
<div class="gmail_attr">вт, 3 дек. 2019 г. в 01:27, Thomas Eigel <<a href="mailto:yurumi@gmx.de" onclick="parent.window.location.href='mailto:yurumi@gmx.de'; return false;" target="_blank">yurumi@gmx.de</a>>:</div>
<blockquote class="gmail_quote" style="margin: 0.0px 0.0px 0.0px 0.8ex;border-left: 1.0px solid rgb(204,204,204);padding-left: 1.0ex;">
<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>Hi all,</div>
<div> </div>
<div>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.</div>
<div> </div>
<div>I tried listening to different signals but to no avail:</div>
<div> </div>
<div> - quit, aboutToQuit: Don't seem to be emitted since the program is not quitting until the overlay is hidden.</div>
<div> - onStatusChanged: Is emitted when app is moved to background (Qt.ApplicationInactive) but no new signal when app is "closed".</div>
<div> </div>
<div>The code to create the overlay (which I don't fully understand) can be sketched as follows:</div>
<div> </div>
<div>m_overlayView = SailfishApp::createView();</div>
<div>
<div>m_overlayView->setSource(SailfishApp::pathTo("qml/components/overlay.qml"));<br/>
m_overlayView->create();<br/>
QPlatformNativeInterface *native = QGuiApplication::platformNativeInterface();<br/>
native->setWindowProperty(m_overlayView->handle(), QLatin1String("CATEGORY"), "notification");<br/>
native->setWindowProperty(m_overlayView->handle(), QLatin1String("MOUSE_REGION"), QRegion(0, 0, 0, 0));</div>
<div>m_overlayView = SailfishApp::createView();</div>
<div> </div>
<div>Maybe closing fails because another "window" is created. So my question is: Does anybody know how to detect the attempted closing of the app?</div>
</div>
<div> </div>
<div>Cheers,</div>
<div>Thomas</div>
</div>
</div>
_______________________________________________<br/>
SailfishOS.org Devel mailing list<br/>
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org" onclick="parent.window.location.href='mailto:devel-unsubscribe@lists.sailfishos.org'; return false;" target="_blank">devel-unsubscribe@lists.sailfishos.org</a></blockquote>
</div>
_______________________________________________ SailfishOS.org Devel mailing list To unsubscribe, please send a mail to devel-unsubscribe@lists.sailfishos.org</div>
</div>
</div>
</div></div></body></html>