Closed Bug 1957227 Opened 5 months ago Closed 5 months ago

Wrong translucent window painting when opaque region is all the way to the left of the window

Categories

(Core :: Widget: Win32, defect)

defect

Tracking

()

RESOLVED FIXED
139 Branch
Tracking Status
firefox139 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

STR:

  • Enable mica.
  • Apply this patch, which just makes the contents of the window invisible, except for a big red rectangle to the rect:
diff --git a/browser/themes/shared/browser-shared.css b/browser/themes/shared/browser-shared.css
index 0f0ed96da4494..0a6e9962327a3 100644
--- a/browser/themes/shared/browser-shared.css
+++ b/browser/themes/shared/browser-shared.css
@@ -148,6 +148,19 @@ body {
   margin: 0;
 }

+:root::after {
+  content: "";
+  width: 40px;
+  position: fixed;
+  left: 0;
+  inset-block: 0;
+  background-color: red;
+}
+
+#browser, #navigator-toolbox {
+  visibility: hidden
+}
+
 /* Toolbox and Toolbars */

 #navigator-toolbox {

ER:

  • Mica backdrop as per usual, with the red bit to the left of the window.

AR:

  • There's a strip of uncleared window area.

This affects thunderbird's spaces toolbar, see bug 1957211.

Just making the red not fully opaque fixes it, which confirms this is an issue of the widget opaque region handling.

Blocks: windows-mica

The paint DC takes client coords, while we were providing window coords.

This means that the ComputeNonClientRegion() code was also clearing wrong
coords. Remove that, since it's disabled by default, and folks in bug 1935894
have confirmed that it's no longer needed after that and bug 1950441.

By the time this patch lands those should be in release already and we should
have two full cycles should any issue come up with those.

Assignee: nobody → emilio
Status: NEW → ASSIGNED

Test-only. The difference between the two scales is the OS text scale
factor. This just confused me a bit when using this API to debug this.

Keywords: leave-open
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f58b871efb91 Use prescontext scale to return opaque region in a test API. r=dholbert
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7a12774d16a8 Fix client vs. window coordinate confusion in transparent window code. r=win-reviewers,handyman
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 139 Branch
QA Whiteboard: [qa-triage-done-c140/b139]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: