In article <[EMAIL PROTECTED]>,
 aaron reed <[EMAIL PROTECTED]> wrote:

> I've run into a problem with the clipping that is involved with
> nsRenderingContextOS2::CopyOffscreenBits.  There is a difference between
> os/2 and Windows such that it will be possible in the OS/2 mozilla that
> when drawing the cursor in nsCaret::DrawCaret that we'll use the same DC
> during the ::InvertRect that we used during the CopyOffscreenBits.
> Specifically, if I tab in a TEXTAREA such that scroll bars appear and
> then I hit the home key, there will be a call to CopyOffscreenBits to
> scoll the scrollbar back to the left side of the scroll area.  Then
> there will be a call to start the cursor blinking again.  The problem is
> that where we are drawing the cursor is outside the clip region that was
> put in the DC during CopyOffscreenBits.  That will cause the cursor not
> to draw.  Basically since it is outside the clip region, it won't draw
> but in DrawCaret we'll still toggle the mDrawn flag.  So now the caret
> thinks that he has drawn, but in reality it isn't on the screen.  Then
> the next time we come through DrawCaret we'll do the InvertRect and draw
> the cursor on the screen but also toggle mDrawn to 0.  What I want to
> know is whether there is any need for the clip region to exist in the DC
> after the BitBlt is done from the offscreen DC to the target DC.  Would
> it be safe to remove the clipping region in the target DC before
> returning from CopyOffscreenBits?  I know that this might not be the
> right thing for mozilla, but I just want to put this change in the OS2
> code as a stop gap until we update our gfx code.

The caret lives in a dangerous world, since it has to draw
directly to the screen in XOR mode, which causes fighting with
the copying of offscreen bits. This is the cause of a number
of 'caret turd' bugs, and forces the caret code to create a new
rendering context for each blink. This area is definately in need
of review.

[Sorry to not answer your question!]

Simon

-- 
          Simon Fraser   Entomologist
  [EMAIL PROTECTED]   http://people.netscape.com/sfraser/

Reply via email to