Skip to content

Commit

Permalink
115.7 revision
Browse files Browse the repository at this point in the history
  • Loading branch information
ephemeralViolette committed Jan 25, 2024
1 parent d72edfa commit de15b44
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions native-controls-esr-115.7.0.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# HG changeset patch
# User daylin <[email protected]>
# Date 1706144999 25200
# Wed Jan 24 18:09:59 2024 -0700
# Node ID 3db86a39b5c9930d3642bfd417c2166019dd1157
# Parent 1be366378c56d2cb64171ff9f714292f50641bbe
Native Controls: Revise override caption button width/height

# This is a patch that is applied on top of the 115.6.0 R2 patch. It simply revises this custom behaviour:

diff --git a/widget/windows/nsUXThemeData.cpp b/widget/windows/nsUXThemeData.cpp
--- a/widget/windows/nsUXThemeData.cpp
+++ b/widget/windows/nsUXThemeData.cpp
@@ -200,22 +200,26 @@ void nsUXThemeData::UpdateTitlebarInfo(H
int overrideCaptionButtonsHeight = StaticPrefs::
widget_ev_native_controls_patch_override_aero_caption_buttons_mask_height();

- if (overrideCaptionButtonsWidth && overrideCaptionButtonsHeight) {
- sCommandButtonBoxMetrics.cx = overrideCaptionButtonsWidth;
- sCommandButtonBoxMetrics.cy = overrideCaptionButtonsHeight;
- sCommandButtonBoxMetricsInitialized = true;
- sTitlebarInfoPopulatedAero = true;
- } else if (SUCCEEDED(DwmGetWindowAttribute(
- aWnd, DWMWA_CAPTION_BUTTON_BOUNDS, &captionButtons,
- sizeof(captionButtons)))) {
+ if (SUCCEEDED(DwmGetWindowAttribute(aWnd, DWMWA_CAPTION_BUTTON_BOUNDS,
+ &captionButtons,
+ sizeof(captionButtons)))) {
sCommandButtonBoxMetrics.cx =
captionButtons.right - captionButtons.left - 3;
sCommandButtonBoxMetrics.cy =
(captionButtons.bottom - captionButtons.top) - 1;
+
+ if (overrideCaptionButtonsWidth > 0) {
+ sCommandButtonBoxMetrics.cx = overrideCaptionButtonsWidth;
+ }
+
+ if (overrideCaptionButtonsHeight > 0) {
+ sCommandButtonBoxMetrics.cy = overrideCaptionButtonsHeight;
+ }
+
sCommandButtonBoxMetricsInitialized = true;
- MOZ_ASSERT(
- sCommandButtonBoxMetrics.cx > 0 && sCommandButtonBoxMetrics.cy > 0,
- "We must not cache bad command button box dimensions");
+ // MOZ_ASSERT(
+ // sCommandButtonBoxMetrics.cx > 0 && sCommandButtonBoxMetrics.cy > 0,
+ // "We must not cache bad command button box dimensions");
sTitlebarInfoPopulatedAero = true;
}
}

0 comments on commit de15b44

Please sign in to comment.