-
Notifications
You must be signed in to change notification settings - Fork 15k
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
[Bug]: Windows Control Overlay button hover effect not working #32360
Comments
any update here? |
any workarounds? hope this is fixed soon |
👀 |
Just noting this observation here while I look into this: if you create a BrowserWindow but don't load anything (no |
I've been diving deep into this one and I've managed to find out a lot. Take a look: This bug seems to be triggered due to I think the only fix here is to somehow mark the original call to # void Widget::OnMouseEvent(ui::MouseEvent* event) {
# ...
# case ui::ET_MOUSE_MOVED: {
# ...
last_mouse_event_was_move_ = true;
if (root_view)
root_view->OnMouseMoved(*event);
+ if ((event->flags() & ui::EF_IS_NON_CLIENT) == 0)
+ event->SetHandled();
}
return;
# }
# ...
# } |
Preflight Checklist
Electron Version
14.0.0
What operating system are you using?
Windows
Operating System Version
Windows 11
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
See #30764 for specific behavior
Actual Behavior
See #30764 for specific behavior
Testcase Gist URL
No response
Additional Information
I am creating this issue based on #30764 and the information I have gathered while trying to triage it. Though this not a breaking bug, it does create a visual inconsistency for users, as a window control button would typically change color when hovered over. For this reason, I think it should still be addressed at some point. Consolidating all current information and future questions/comments here should help in finding a solution.
Here is a link to the bug that led to the original fix implemented in Chromium
And here is the link to the follow-up bug report created noting issues with the implemented fix. This was then labeled as
WontFix
The chromium fix artificially creates the correct tooltips and allows for the button color to change on hover. However, this results in a response to the
WM_NCHITTEST
message that does not correspond with the function of the button. For example,HTMAXIMIZE
is not returned, thus Snap Layout on Windows 11 does not work.If someone else wants to take a look at this, the relevant Electron files can be found in this PR adding WCO to Electron. For this bug in particular, I believe the related files are:
shell/browser/ui/views/win_caption_button.cc
,shell/browser/ui/views/win_caption_button_container.cc
, andshell/browser/ui/views/win_frame_view.cc
but changes to other files may provide a solution as well.The text was updated successfully, but these errors were encountered: