Closed Bug 710774 Opened 13 years ago Closed 12 years ago

Qt needs to dispatch DID_PAINT events

Categories

(Core Graveyard :: Widget: Qt, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla14

People

(Reporter: bzbarsky, Assigned: romaxa)

Details

Attachments

(1 file, 3 obsolete files)

Attached patch Widget Wil/Did Paint (obsolete) — Splinter Review
Attachment #606923 - Flags: review?(roc)
Comment on attachment 606923 [details] [diff] [review]
Widget Wil/Did Paint

Review of attachment 606923 [details] [diff] [review]:
-----------------------------------------------------------------

::: widget/qt/nsWindow.cpp
@@ +1061,5 @@
> +    {
> +        nsEventStatus status;
> +        nsPaintEvent willPaintEvent(true, NS_WILL_PAINT, this);
> +        willPaintEvent.willSendDidPaint = true;
> +        DispatchEvent(&willPaintEvent, status);

Is it really safe to change widget geometry here (and where you call DispatchDidPaint)?

@@ +1103,5 @@
>  #endif //MOZ_ENABLE_QTMOBILITY
>  
> +        status = DispatchEvent(&event);
> +        DispatchDidPaint(this);
> +        aPainter->beginNativePainting();

maybe this should be "endNativePainting"?

And maybe that should happen before DispatchDidPaint?
Attached patch Widget Wil/Did Paint (obsolete) — Splinter Review
Fixed endNativePainting.

> Is it really safe to change widget geometry here
Did not get why geometry should change here?
> (and where you call DispatchDidPaint)?
I call it at the end of GL painting and at the end of DoPaint (software rendering)
Assignee: nobody → romaxa
Attachment #606923 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #606923 - Flags: review?(roc)
Attachment #606937 - Flags: review?(roc)
Attached patch Widget Wil/Did Paint (obsolete) — Splinter Review
Err, forgot to fix order
Attachment #606937 - Attachment is obsolete: true
Attachment #606937 - Flags: review?(roc)
Attachment #606938 - Flags: review?(roc)
Comment on attachment 606938 [details] [diff] [review]
Widget Wil/Did Paint

Review of attachment 606938 [details] [diff] [review]:
-----------------------------------------------------------------

::: widget/qt/nsWindow.cpp
@@ +1233,5 @@
>      }
>  
>      ctx = nsnull;
>      targetSurface = nsnull;
> +    DispatchDidPaint(this);

You're not setting willSendDidPaint to true for this paint event.
Attachment #606938 - Flags: review?(roc) → review-
Added WillSendDidPaint flag to software paint.
Also not sure what to do about geometry changed in this case... I guess nothing bad should happen
Is there are test related to this move/size during paint?
Attachment #606938 - Attachment is obsolete: true
I can't remember. It doesn't happen much anymore since we got rid of almost all child widgets.
Comment on attachment 606949 [details] [diff] [review]
Widget Wil/Did Paint

Ok, hopefully we can survive with that
Attachment #606949 - Flags: review?(roc)
Keywords: checkin-needed
http://hg.mozilla.org/integration/mozilla-inbound/rev/d548cc64e028
Keywords: checkin-needed
OS: Mac OS X → All
Hardware: x86 → All
Target Milestone: --- → mozilla14
https://hg.mozilla.org/mozilla-central/rev/d548cc64e028
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Version: 9 Branch → Trunk
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: