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

[Feature Request]: BrowserView → Support Window Controls Overlay #34947

Open
3 tasks done
arman-canva opened this issue Jul 18, 2022 · 1 comment
Open
3 tasks done

Comments

@arman-canva
Copy link

arman-canva commented Jul 18, 2022

Preflight Checklist

Problem Description

Currently, there is no obvious way to use the Window Controls Overlay (WCO) API from BrowserViews or webContents therein.

This is particularly inconvenient when using BrowserViews within BrowserWindows that have had the WCO API enabled using steps outlined here.

When this is the case, window controls are prone to be rendered over BrowserView content.

Currently, the WCO API isn't exposed to BrowserViews that have been added by way of BrowserWindow.addBrowserView/equivalent to BrowserWindows that have it enabled.

As a result, there is no obvious/OOTB way of signalling to BrowserViews/their contents when window controls are visible or how large they are.

Proposed Solution

Introduce means for enabling Window Controls API for BrowserViews/their webContents — ideally, with options for controlling whether window controls themselves are actually visible.

Optional: Automatically do this when BrowserViews are associated with BrowserWindows using addBrowserView or similar.

Alternatives Considered

Thinking out loud:

  • Expose key Window Controls API values from BrowserWindows via some additional methods; e.g. BrowserWindow:: getTitlebarAreaRect() and/or BrowserWindow::getWindowControlsAreaRect()

Additional Information

A GitHub Gist that demonstrates the availability of the WCO API in BrowserWindow, but not associated BrowserViews: https://gist.github.com/2d5e4dfa9f9a02644c9cf1f8fd04848b

@ckerr
Copy link
Member

ckerr commented Jul 18, 2022

CC @jkleinsc as fugu-related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants