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

VS Code's maximize button doesn't trigger Snap Layouts in Windows 11 #127449

Closed
just1a-person opened this issue Jun 29, 2021 · 12 comments · Fixed by #147947
Closed

VS Code's maximize button doesn't trigger Snap Layouts in Windows 11 #127449

just1a-person opened this issue Jun 29, 2021 · 12 comments · Fixed by #147947
Assignees
Labels
electron Issues and items related to Electron insiders-released Patch has been released in VS Code Insiders upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-fixed The underlying upstream issue has been fixed windows VS Code on Windows issues
Milestone

Comments

@just1a-person
Copy link

just1a-person commented Jun 29, 2021

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.57.1
  • OS Version: Microsoft Windows [Version 10.0.22000.51]

Steps to Reproduce:

  1. Open VS Code in Windows 11 with above mentioned build.
  2. Hover over the maximize button

Snap Layouts doesn't get triggered because VS Code is using a custom title bar

Hovering over maximize button, screenshot

@sbatten sbatten added electron Issues and items related to Electron upstream Issue identified as 'upstream' component related (exists outside of VS Code) labels Jun 29, 2021
@sbatten
Copy link
Member

sbatten commented Jun 29, 2021

@deepak1556 if electron adopts the windows controls overlay and I adopt it in the titlebar, we could handle this I think

@deepak1556
Copy link
Collaborator

Depends on electron/electron#29600

@deepak1556 deepak1556 added upstream-issue-linked This is an upstream issue that has been reported upstream windows VS Code on Windows issues labels Jun 29, 2021
@just1a-person just1a-person changed the title VS Code's maximize button doesn't trigger Snap Groups in Windows 11 VS Code's maximize button doesn't trigger Snap Layouts in Windows 11 Jul 4, 2021
@Navpan18
Copy link

Navpan18 commented Aug 11, 2021

Snap layout is working when I switched my title bar type from custom to native in vs code

@esimkowitz
Copy link

esimkowitz commented Oct 19, 2021

Any update on this issue now that the upstream electron issue is merged and released circa electron v13?

@sbatten
Copy link
Member

sbatten commented Nov 1, 2021

While the upstream branch was merged, the implementation of window-controls-overlay on Windows still has issues. e.g. a persistent bottom border, the icons do not match system icons on Windows 11, and the color is not dynamically settable.

image

@yume-chan
Copy link
Contributor

@sbatten The bottom border was reported in electron/electron#31025.

The background color can be changed dynamically by set titlebarOverlay.color to transparent and put a div underneath it.

image

The symbol (_□×) color truly can't be changed dynamically, and Electron doesn't correctly draw hover color for transparent buttons now

image

@401-Unauthorized
Copy link

In VS code on Windows 11 snap layouts

Works normally with - "window.titleBarStyle": "native"
Does not work with - "window.titleBarStyle": "custom"

Refer to:
https://docs.microsoft.com/en-us/windows/apps/desktop/modernize/apply-snap-layout-menu

@zhiyong-ft
Copy link

@401-Unauthorized This worked on my setup.

@nonintanon
Copy link

@401-Unauthorized thanks! it works.

@JorisWijgert
Copy link

Also, if you still prefer to use the custom title bar style, you can also use Win + Z to open the Snap Layouts

@sanamhub
Copy link

sanamhub commented Jan 27, 2022

Yes, I was going to create this issue, eventually I find it here while searching for duplicate

@yume-chan
Copy link
Contributor

yume-chan commented Mar 29, 2022

Electron 18 now supports dynamically changing title bar color: electron/electron#33440

Still blocked on #145527

@deepak1556 deepak1556 added this to the April 2022 milestone Mar 29, 2022
@deepak1556 deepak1556 added upstream-issue-fixed The underlying upstream issue has been fixed and removed upstream-issue-linked This is an upstream issue that has been reported upstream labels Mar 29, 2022
@sbatten sbatten modified the milestones: April 2022, May 2022 Apr 27, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jun 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
electron Issues and items related to Electron insiders-released Patch has been released in VS Code Insiders upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-fixed The underlying upstream issue has been fixed windows VS Code on Windows issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

12 participants