[SailfishDevel] How to detect when an app are restored from minimized

Kim Foder kim at foder.dk
Sat Jan 24 13:00:54 UTC 2015


Hi

That did solve my problem, thanks.

On Sat, 2015-01-24 at 03:28 +0200, Osmo Salomaa wrote:
> 24.01.2015, 01:04, Kim Foder kirjoitti:
> > I believe this is because of the change where the context is freed when
> > the app is minimized, so I added a call to var getContext("2d") to my
> > onPaint event, and the app can paint on the canvas again.
> 
> I noticed the same, it changed with Uitukka/Qt5.2. Adding an 
> onContextChanged handler worked for me.
> 
> Canvas {
>      id: canvas
>      onContextChanged: {
>          if (!canvas.context) return;
>          // Initialize context properties here...
>          canvas.requestPaint();
>      }
> }
> 




More information about the Devel mailing list