Closed Bug 1851585 Opened 2 years ago Closed 2 years ago

Remove nsWindow::mPaintDC.

Categories

(Core :: Widget: Win32, task)

task

Tracking

()

RESOLVED FIXED
119 Branch
Tracking Status
firefox119 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(3 files)

No description provided.

There's no real reason to do this, and other browsers don't either. This
is in preparation for further simplifications to how we deal with
transparent windows (because they're now pretty broken,
see bug 1850979).

Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/092f81f39e6a Remove nsWindow::mPaintDC. r=win-reviewers,gstoll
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ab71e5c57a38 Minor clean-ups in nsWindow::OnPaint. r=win-reviewers,gstoll
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bcda86efab04 Don't deal with WM_PRINTCLIENT. r=win-reviewers,rkraesig
Blocks: 1851775

External apps may use WM_PRINT/WM_PRINTCLIENT to take a screenshot of our windows. I don't think we can remove the WM_PRINTCLIENT handler based on our internal usage.

(In reply to Masatoshi Kimura [:emk] from comment #9)

External apps may use WM_PRINT/WM_PRINTCLIENT to take a screenshot of our windows. I don't think we can remove the WM_PRINTCLIENT handler based on our internal usage.

Can you elaborate? We don't paint synchronously so how does that work exactly? Why do other apps not need it? MSDN says that windows such as controls need to implement it, and that some APIs like AnimateWindow need it, but it doesn't say anything else and we're neither afaict.

Flags: needinfo?(VYV03354)

Sorry, I was wrong.

  • Cross-process ::SendMessage(WM_PRINT(CLIENT)) does not work.
  • ::PrintWindow() uses WM_PAINT instead of WM_PRINT(CLIENT) contrary to the documentation.

So external apps have no way to use the WM_PRINTCLIENT handler of Firefox.

Flags: needinfo?(VYV03354)

Cool, thanks for checking tho, and for the answer! (you're definitely more familiar with all this stuff than me).

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: