Qt needs to dispatch DID_PAINT events

RESOLVED FIXED in mozilla14

Status

Core Graveyard
Widget: Qt
RESOLVED FIXED
5 years ago
10 months ago

People

(Reporter: bz, Assigned: romaxa)

Tracking

Trunk
mozilla14

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

See bug 598482 comment 79.
(Assignee)

Comment 1

5 years ago
Created attachment 606923 [details] [diff] [review]
Widget Wil/Did Paint
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?
(Assignee)

Comment 3

5 years ago
Created attachment 606937 [details] [diff] [review]
Widget Wil/Did Paint

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)
(Assignee)

Comment 4

5 years ago
Created attachment 606938 [details] [diff] [review]
Widget Wil/Did Paint

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-
(Assignee)

Comment 6

5 years ago
Created attachment 606949 [details] [diff] [review]
Widget Wil/Did Paint

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.
(Assignee)

Comment 8

5 years ago
Comment on attachment 606949 [details] [diff] [review]
Widget Wil/Did Paint

Ok, hopefully we can survive with that
Attachment #606949 - Flags: review?(roc)
Attachment #606949 - Flags: review?(roc) → review+
(Assignee)

Updated

5 years ago
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
Last Resolved: 5 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.