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

DeveloperTools window always in front of the browser window #190

Open
sakya opened this issue Nov 11, 2024 · 1 comment
Open

DeveloperTools window always in front of the browser window #190

sakya opened this issue Nov 11, 2024 · 1 comment

Comments

@sakya
Copy link

sakya commented Nov 11, 2024

When running on Windows 11 the developer tools window is always in front of the browser window.

@sakya
Copy link
Author

sakya commented Nov 11, 2024

It's the windowInfo.SetAsPopup call in this code that it is specific to Windows.
Removing that code correctly display the developer tools window without it beeing always displayed in front of the browser control.

        public void ShowDeveloperTools()
        {
            var windowInfo = CefWindowInfo.Create();

            if (CefRuntime.Platform == CefRuntimePlatform.Windows)
            {
                // This function set ParentHandle (owner in Windows) and set Bounds to CW_USERDEFAULT (only works on Windows).
                // So, it should be called only in Windows.
                windowInfo.SetAsPopup(BrowserHost?.GetWindowHandle() ?? IntPtr.Zero, "DevTools");
            }

            BrowserHost?.ShowDevTools(windowInfo, _cefClient, new CefBrowserSettings(), new CefPoint());
        }

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

No branches or pull requests

1 participant