Forum Discussion

sk_bruce's avatar
sk_bruce
Visitor
10 years ago

Re-drawing canvas when resuming from screen saver

Hi guys!

I am playing a bit with Image Canvass building a custom grid. I am setting up 2 of them. A more elaborated on in the background (canvas 1) and a simple one that will only display the selector on the top (canvas 2). I am using this approach so the app will move smother and faster on less fortunate devices (older ones).

Everything works fine. But I have a problem when returning form screensaver. The screen is black and I need to redraw canvas 1. If there anything I can do to intercept that event (coming back form screen saver) in order to redraw canvass 1? I am already redrawing canvas1 after I play a video/load a list/etc.

Or maybe I need to use another approach?

Thanks!

3 Replies

  • Hi!

    Is this a confirmed bug or I am doing something wrong?

    Thanks!
  • renojim's avatar
    renojim
    Community Streaming Expert
    I dealt with this a few years ago. It seems nothing's changed. There's no event to let you know the screen saver status, but it sure would be nice if there was. There's two approaches I've used:
    • Periodically send button presses using ECP such that the screen saver never appears.
    • Use a private screen saver within the app and have it report its status via tmp:/ (I periodically write a file to tmp:/ within the screen saver and check for the presence of that file within the main app; it's a little more complicated than that, but you get the gist).

    -JT
  • Seems clearly a bug, since other screens recover after screensaver.
    I imagine a fix is, on return from SS to:
    • either roImageCanvas to get "automagically" called its Show() method

    • or get a roImageCanvasEvent about it, something like "isDirty()"