Virtual Screens: Can't paint dialog window before changing origin

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Virtual Screens: Can't paint dialog window before changing origin

    My understanding is that the whole point of virtual screens is to hide the painting process from the user.

    The problem is, I can't figure out how to paint my dialog box to the virtual screen area BEFORE switching to that screen (with GUI_SetOrg()). It seems that the window manager is not painting because the area is not visible. The only way I can get it to paint is by setting the origin to the new v-screen FIRST, then creating the dialog box. After the first painting operation, I can switch between screens instantly, but the first painting operation is visible. Obviously, this allows the user to see the window being painted, which is extremely undesirable.

    I studied the example, VSCREEN_MultiPage, and indeed, this is how it works also (GUI_SetOrg, then GUI_CreateDialogBox). When I run the example; sure enough, I can see the windows get painted.

    1) Is this the expected behavior?
    2) Is there a way to make emWin paint the dialog box in a virtual screen area BEFORE changing the origin, so the painting operation is not apparent to the user?

    Thank you!
  • Hi,

    Actually it should work as you expect. I don't know your code so I can't really say why it is not working as expected.

    But, if you want to use virtual screens to hide a drawing process or avoid flickering you should use multibuffering. This is easier to handle, espacially in combination with the Window Manager.

    Multibuffering works only with the GUIDRV_Lin driver. If you are using a driver for an indirect connected LCD controller (like GUIDRV_FlexColor) you should use a cached version of this driver. Cached or not cached is indicated by the number behind the 'C':

    GUIDRV_FLEXCOLOR_M16C0B8 -> uncached
    GUIDRV_FLEXCOLOR_M16C1B8 -> cached

    Regards,
    Sven
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.