CEF stealing focus

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

CEF stealing focus

Postby rashid301 » Fri Jun 01, 2018 7:37 am

I am working with CEF 3325-1750 build.

I have main application and notification window.
Whenever I create the notification window using CreateBrowser, it steals focus from the other applications and brings the main application in foreground.

I have implemented notification windows client_handler OnSetFocus function to return true. Using the breakpoint, I know that it is calling that function as well. But it still takes the focus.

If the main application is minimized or dialog is closed, then only the notification window takes focus.
If the main application is behind other applications, then it comes in the foreground and gets focus.

I have worked with older versions of CEF (3.2171) and returning true from OnSetFocus function did the trick. But it is no longer working. Is this a new bug?
rashid301
Techie
 
Posts: 13
Joined: Wed Oct 15, 2014 11:04 am

Re: CEF stealing focus

Postby amaitland » Fri Jun 01, 2018 8:09 am

Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am

Re: CEF stealing focus

Postby rashid301 » Fri Jun 01, 2018 8:13 am

Thanks for the issue link.

I tried locking LockSetForegroundWindow API work around and it worked for me.

It is mentioned here viewtopic.php?f=6&t=12205
rashid301
Techie
 
Posts: 13
Joined: Wed Oct 15, 2014 11:04 am


Return to CEF Discussion

Who is online

Users browsing this forum: No registered users and 20 guests