Closed Bug 513922 Opened 15 years ago Closed 15 years ago

AutoErase() should invalidate the erased region on WinCE

Categories

(Core :: Widget: Win32, defect)

defect
Not set
major

Tracking

()

RESOLVED FIXED
Tracking Status
status1.9.2 --- beta1-fixed

People

(Reporter: crowderbt, Assigned: crowderbt)

Details

Attachments

(1 file, 1 obsolete file)

This fixes a bug introduced, I think, by bug 510979.

Would ask blassey for review, but the idea is essentially his.
Attachment #397870 - Flags: review?(pavlov)
Attachment #397870 - Flags: review?(pavlov) → review?(roc)
Component: General → Widget: Win32
Product: Fennec → Core
QA Contact: general → win32
Summary: AutoErase() should Invalidate() → AutoErase() should Invalidate() on WINCE
The symptom of this is that opening the keyboard (which causes the screen to be re-oriented) wasn't redrawing the screen.
This will cause the entire window to be repainted anytime any part of it is uncovered. Is that OK?

Do our own Invalidate calls trigger a call to WM_ERASEBKGND? If so, this would be really bad...
(In reply to comment #2)
> This will cause the entire window to be repainted anytime any part of it is
> uncovered. Is that OK?
Perhaps we should use GetClipRgn and only invalidate those rects. 

> Do our own Invalidate calls trigger a call to WM_ERASEBKGND? If so, this would
> be really bad...

No, I don't see that.
Attachment #397870 - Flags: approval1.9.2?
(In reply to comment #3)
> (In reply to comment #2)
> > This will cause the entire window to be repainted anytime any part of it is
> > uncovered. Is that OK?
> Perhaps we should use GetClipRgn and only invalidate those rects. 

That sounds like a good idea, although you should verify that GetClipRgn can return a region less than the whole window when part of the window is uncovered.

> > Do our own Invalidate calls trigger a call to WM_ERASEBKGND? If so, this would
> > be really bad...
> 
> No, I don't see that.

Great.
Attached patch new versionSplinter Review
blassey suggests that this patch has the issue of invalidating the whole region, rather than its sub-rects (ie., we should be using GetClipRgn, and then adding the clip regions individual sub-rects), but this seems adequate and minimal for now.

Am I allowed to change the signature of AutoErase?   Why is this function virtual?  I can't find any usage of it in mxr other than the reference in nsWindow.cpp for the erase-background message handler.
Assignee: nobody → crowder
Attachment #397870 - Attachment is obsolete: true
Attachment #397870 - Flags: review?(roc)
Attachment #397870 - Flags: approval1.9.2?
Summary: AutoErase() should Invalidate() on WINCE → AutoErase() should invalidate the erased region on WinCE
Comment on attachment 398245 [details] [diff] [review]
new version

More to your liking, roc?
Attachment #398245 - Flags: review?(roc)
Comment on attachment 398245 [details] [diff] [review]
new version

This looks like a good solution! congrats :-)
Attachment #398245 - Flags: review?(roc) → review+
Attachment #398245 - Flags: approval1.9.2?
pushed http://hg.mozilla.org/mozilla-central/rev/985139e9ecea 

and followed up with a build bustage fix http://hg.mozilla.org/mozilla-central/rev/70e87cce109f
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Attachment #398245 - Flags: approval1.9.2? → approval1.9.2+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: