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

Invalid premise in detectFullscreen #229058

Open
a-stewart opened this issue Sep 19, 2024 · 1 comment
Open

Invalid premise in detectFullscreen #229058

a-stewart opened this issue Sep 19, 2024 · 1 comment
Assignees

Comments

@a-stewart
Copy link
Contributor

If you run insiders.vscode.dev on a PWA in Linux with multiple monitors and WCO enabled, the window controls are on top of the icons on the right.

image

The issue is that there is a bad premise in dom.ts.

	if (targetWindow.innerHeight === targetWindow.screen.height) {
		// if the height of the window matches the screen height, we can
		// safely assume that the browser is fullscreen because no browser
		// chrome is taking height away (e.g. like toolbars).
		return { mode: DetectedFullscreenMode.BROWSER, guess: false };
	}

The problem with this is that if you are on a Linux machine with a secondary screen (so no task bar), with the App running as a PWA and with window controls overlay enabled, then the regular - non full screen but maximised window will be the same height as the screen height.

As such it will falsely report being fullscreen and the window controls will render on top of the icons, since the css includes:

.monaco-workbench.fullscreen .part.titlebar .window-controls-container {
    display: none;
    background-color: transparent;
}

There is a secondary issue that window.screen seems to be faulty on Chrome/Linux too which means sometimes it gets the wrong screen, and that results in the PWA actually rendering correctly which makes this tricky to debug.

@a-stewart
Copy link
Contributor Author

This also causes a second issue when you have `Window: Menu Bar Visibility" which causes the menu bar to be hidden when you maximise VS Code.

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

2 participants