×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    8

    CDirectScreenAccess goes wrong when a dialog is displayed

    Hello,

    I have implemented CDirectScreenAccess on Series60 (NGage) and it works absolutely fine for task-switches, when the application key is pressed.

    However, when a dialog is displayed (eg. phone charger is plugged in, battery is low, incoming call, etc) or the application menu appers - the screen display completely messes up : the area where the dialog was is fine, but the area not covered by the dialog becomes flickery (not being updated?).

    I have read all the other relevant threads in the forums about this btw!! It seems that several people have this problem, but nobody has revealed a definitive solution for it.

    I suspect that this problem is to do with the order of HandleForegroundEventL() and/or CDirectScreenAccess::AbortNow() & Restart().

    Could it be that Restart() is being called too early, before the dialog box has disapperated. We are supposed to call StartL() from within this function, and StartL() is supposed to internally update the drawing region for the application - but if the dialog is still active then might that mess up the drawing region.
    I should mention that I get the drawing region, and set the clipping region on the GC every frame to be on the same side.

    Does anyone (experts??) have the definitive solution to handling dialogs and suchlike, within the CDirectScreenAccess() system - as there does seem to be a problem with this.

    Regards,
    CW

  2. #2
    Registered User
    Join Date
    Dec 2005
    Posts
    46

    Re: CDirectScreenAccess goes wrong when a dialog is displayed

    Hi,
    I got a same situation with you, and I had been pained for several days ago . and then I fixed it by follow codes:
    CMyView::Restart(RDirectScreenAccess::TTerminationReasons /*aReason*/)
    {
    TRAPD(err, iDirectScrAccess->StartL());
    if(err == KErrNone)
    {
    /*
    * The key code here, determine the Region.whether it draw the full screen, otherwise I do nothing.
    */
    RRegion *aRegion;
    aRegion = iDirectScrAccess->DrawingRegion();
    if(Rect() != aRegion->BoundingRect())
    return;

    iIsPauseDrawbyFramework = EFalse;

    // Begin to draw ...
    DisplayOffScrBuffer();

    }
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×