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

WinForms freezes when using Alt+Space on Windows 10 Anniversary #1822

Closed
StBozov opened this issue Oct 7, 2016 · 8 comments
Closed

WinForms freezes when using Alt+Space on Windows 10 Anniversary #1822

StBozov opened this issue Oct 7, 2016 · 8 comments
Labels
faq-able! known-issue upstream These issues require fixing in the Chromium Embedded Framework(CEF) or Chromium. winforms
Milestone

Comments

@StBozov
Copy link

StBozov commented Oct 7, 2016

Hello all,

I use:

1 - Latest cefsharp master branch
2 - Winforms.Example (x86)
3 - Windows 10 (+ Anniversary update) - I cannot reproduce the issue on Windows 7/8/8.1
4 - Issue is not reproducible with cef simple (including Windows 10).
5 - VS 2013 (Update 4/5) and VS 2015 (Update 2/3)
6 - Issue is 100% reproducible (deterministic).

Observed behaviour is that once using Alt+Space Winforms.Example is no longer responsible. I'm able to reproduce the issue on more then 5 Windows 10 machines.

Thank you in advance for your answer.

Stefan Bozov.

@amaitland amaitland added the upstream These issues require fixing in the Chromium Embedded Framework(CEF) or Chromium. label Oct 7, 2016
@amaitland
Copy link
Member

You should discuss the issue at http://magpcss.org/ceforum/viewtopic.php?f=6&t=14479

@StBozov
Copy link
Author

StBozov commented Oct 7, 2016

Thanks a lot.

@amaitland amaitland changed the title WinForms.Example blockes(stuckes) when using Alt+Space WinForms freezes when using Alt+Space on Windows Anniversary Oct 10, 2016
@amaitland
Copy link
Member

amaitland commented Oct 10, 2016

This problem only appears when settings.MultiThreadedMessageLoop = true (the default). Integrating CEF into the existing message loop is possible, better integration can be obtained using #1748. This method is new and I've not tested in a production environment myself. There are reports of other CEF users implementing the method successfully. Remember that CefSharp is just a wrapper around the CEF framework. You can test the suggested workaround in the CefSharp.WinForms.Example project by changing true to false at https://github.com/cefsharp/CefSharp/blob/cefsharp/53/CefSharp.WinForms.Example/Program.cs#L62

@amaitland amaitland changed the title WinForms freezes when using Alt+Space on Windows Anniversary WinForms freezes when using Alt+Space on Windows 10 Anniversary Oct 10, 2016
@StBozov
Copy link
Author

StBozov commented Oct 18, 2016

Thank you very much! I'll play with the master.

@LamboG

This comment has been minimized.

@chylex
Copy link
Contributor

chylex commented Jan 28, 2017

Proper solution/workaround was posted in the mentioned forum link - http://magpcss.org/ceforum/viewtopic.php?p=32766#p32766

@amaitland amaitland added this to the 55.0.0 milestone Jan 29, 2017
@amaitland
Copy link
Member

I'm going to close this issue as there are valid workarounds and there really isn't a way to fix this in CefSharp directly.

Option 1

Add a MenuStrip to your application, can be invisible. Originally suggested in http://magpcss.org/ceforum/viewtopic.php?p=32766#p32766

This appears to be the easiest option.

Controls.Add(new MenuStrip { Visible = false });

Option 2

Integrate CEF into the WinForms existing message loop as described above in #1822 (comment)

@SnakeBite94
Copy link

SnakeBite94 commented Apr 24, 2020

Sorry for posting in closed issue, but this still is the only real reference to the ALT -> freeze issue.
Same issue happens in WPF. There is a workaround too: extend ChromiumWebBrowser class with following override:
protected override void OnPreviewKeyUp(KeyEventArgs e) { if (e.Key == Key.System) { e.Handled = true; } base.OnPreviewKeyDown(e); }
(inspired by this: https://stackoverflow.com/questions/54147615/how-to-mark-f10-key-as-handled-in-cefsharp-for-wpf)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
faq-able! known-issue upstream These issues require fixing in the Chromium Embedded Framework(CEF) or Chromium. winforms
Projects
None yet
Development

No branches or pull requests

5 participants