Skip to content

fix: add check in IsMaximized for non-WS_THICKFRAME windows - #26586

Merged
zcbenz merged 8 commits into
masterfrom
transparent-maximize-fix
Dec 1, 2020
Merged

zcbenz merged 8 commits into
masterfrom
transparent-maximize-fix

Conversation

@mlaurencin

@mlaurencin mlaurencin commented Nov 19, 2020 •

Copy link
Copy Markdown
Member

Description of Change

Closes #25348

This PR allows for windows without the WS_THICKFRAME style to be properly checked when determining if they are maximized. Transparent windows fall under this category. Since windows without the WS_THICKFRAME style cannot be put in a maximized state, we simulate it by increasing the window to the size of the display. Previously, when a window without the WS_THICKFRAME style was "maximized" in this way, the IsMaximized check did not account for this workaround. Now IsMaximized checks for both cases involving WS_THICKFRAME.
(An additional criteria commented for maximization was also removed, since the implementation was removed at some point before this PR).

Checklist

Release Notes

Notes: Fixed an issue where IsMaximized would incorrectly return false for some windows on Windows.

@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Nov 19, 2020

@codebytere codebytere left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great find! Let's add a test for this here to create a transparent window and then check isMaximized state before & after calling maximize()

Comment thread shell/browser/native_window_views.cc Resolved
@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label Nov 20, 2020
@mlaurencin
mlaurencin force-pushed the transparent-maximize-fix branch from 08b5ed1 to 3b025e3 Compare November 20, 2020 01:18
Comment thread shell/browser/native_window_views.cc Resolved
@codebytere

Copy link
Copy Markdown
Member

@mlaurencin looks like this accidentally caught a release commit :) rebasing against master should fix that

@mlaurencin
mlaurencin force-pushed the transparent-maximize-fix branch from 0563b21 to 584a140 Compare November 24, 2020 21:33
Comment thread shell/browser/native_window_views.cc Resolved
@mlaurencin
mlaurencin force-pushed the transparent-maximize-fix branch from 584a140 to 86f0d5c Compare November 25, 2020 04:25
@zcbenz

zcbenz commented Nov 30, 2020

Copy link
Copy Markdown
Contributor

@mlaurencin Can you rebase the PR on master? It should be able to fix the failing mac CI.

@mlaurencin
mlaurencin force-pushed the transparent-maximize-fix branch from 86f0d5c to 12eba95 Compare November 30, 2020 19:07
@mlaurencin
mlaurencin force-pushed the transparent-maximize-fix branch from 12eba95 to 4436027 Compare November 30, 2020 23:14
@zcbenz
zcbenz merged commit 32d4c9a into master Dec 1, 2020
@release-clerk

release-clerk Bot commented Dec 1, 2020 •

Copy link
Copy Markdown

Release Notes Persisted

Fixed an issue where IsMaximized would incorrectly return false for some windows on Windows.

@zcbenz
zcbenz deleted the transparent-maximize-fix branch December 1, 2020 06:28
@codebytere

Copy link
Copy Markdown
Member

/trop run backport-to 12-x-y, 11-x-y, 10-x-y

@codebytere

Copy link
Copy Markdown
Member

/trop run backport-to 11-x-y,10-x-y

@trop

trop Bot commented Dec 1, 2020

Copy link
Copy Markdown
Contributor

The backport process for this PR has been manually initiated -
sending your commits to "11-x-y"!

@trop

trop Bot commented Dec 1, 2020

Copy link
Copy Markdown
Contributor

The backport process for this PR has been manually initiated -
sending your commits to "10-x-y"!

@trop

trop Bot commented Dec 1, 2020

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "11-x-y" cleanly;
you will need to perform this backport manually.

@trop

trop Bot commented Dec 1, 2020

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "10-x-y" cleanly;
you will need to perform this backport manually.

@trop

trop Bot commented Dec 1, 2020

Copy link
Copy Markdown
Contributor

@mlaurencin has manually backported this PR to "12-x-y", please check out #26772

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.isMaximized() always false with transparent:true

5 participants