Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not render inactive titlebar as active on Windows #24847

Merged
merged 1 commit into from Aug 6, 2020

Conversation

zcbenz
Copy link
Member

@zcbenz zcbenz commented Aug 5, 2020

Description of Change

Chromium renders titlebar as active as long as there is any views window active, even when current window is not active, which is different from most other win32 apps. We prevent this behavior by overriding the WM_NCACTIVATE message to default behavior.

Close #24647.

Checklist

Release Notes

Notes: Fix inactive windows having active titlebar on Windows

@zcbenz zcbenz requested a review from ckerr August 5, 2020 07:55
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Aug 5, 2020
@zcbenz zcbenz requested a review from deepak1556 August 5, 2020 07:57
// active, which is different from most other win32 apps. We prevent this
// behavior by overriding the WM_NCACTIVATE message to default behavior.
// See also https://github.com/electron/electron/issues/24647.
*result =
Copy link
Member

@deepak1556 deepak1556 Aug 5, 2020

Choose a reason for hiding this comment

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

Can't we instead override HWNDMessageHandlerDelegate::ShouldPaintAsActive() to false which would still resort to the default behavior because of paint_as_active || active ?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a good idea 👍 , I have update the PR.

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Aug 6, 2020
@codebytere
Copy link
Member

Failures are previously known and unrelated - merging.

@codebytere codebytere merged commit 5f447e4 into master Aug 6, 2020
@release-clerk
Copy link

release-clerk bot commented Aug 6, 2020

Release Notes Persisted

Fix inactive windows having active titlebar on Windows

@trop
Copy link
Contributor

trop bot commented Aug 6, 2020

I have automatically backported this PR to "9-x-y", please check out #24873

@trop
Copy link
Contributor

trop bot commented Aug 6, 2020

I have automatically backported this PR to "10-x-y", please check out #24874

@trop
Copy link
Contributor

trop bot commented Aug 6, 2020

I have automatically backported this PR to "8-x-y", please check out #24875

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.

All child windows have active title bar
3 participants