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

Maximize/restore button is not responsive when Window Controls Overlay is enabled #159851

Closed
johningve opened this issue Sep 2, 2022 · 13 comments · Fixed by #164864
Closed

Maximize/restore button is not responsive when Window Controls Overlay is enabled #159851

johningve opened this issue Sep 2, 2022 · 13 comments · Fixed by #164864
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member electron Issues and items related to Electron titlebar VS Code main title bar issues upstream Issue identified as 'upstream' component related (exists outside of VS Code) verified Verification succeeded windows 11 VS Code on Windows 11 issues
Milestone

Comments

@johningve
Copy link

johningve commented Sep 2, 2022

Type: Bug

After updating to vscode 1.71.0, the Window Controls Overlay (WCO) becomes enabled by default, and the maximize/restore button no longer responds to hover / clicks. The button works when WCO is disabled.

Video:

ezgif-5-34c5d188ea

VS Code version: Code 1.71.0 (784b017, 2022-09-01T07:36:10.600Z)
OS version: Windows_NT x64 10.0.22621
Modes:
Sandboxed: No
Remote OS version: Linux x64 5.15.57.1-microsoft-standard-WSL2

System Info
Item Value
CPUs AMD Ryzen 9 5900HS with Radeon Graphics (16 x 3294)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) undefined
Memory (System) 15.41GB (5.67GB free)
Process Argv --folder-uri vscode-remote://wsl%2Bubuntu/home/johnio/src/pos/snarl-proof-of-storage --crash-reporter-id cf5aa43a-260d-4000-ac8c-44c35a376e15
Screen Reader no
VM 44%
Item Value
Remote WSL: Ubuntu
OS Linux x64 5.15.57.1-microsoft-standard-WSL2
CPUs AMD Ryzen 9 5900HS with Radeon Graphics (16 x 3293)
Memory (System) 7.47GB (6.44GB free)
VM 0%
Extensions (34)
Extension Author (truncated) Version
language-gas-x86 bas 0.0.2
vscode-drawio hed 1.6.4
discord-vscode icr 5.8.0
better-cpp-syntax jef 1.15.19
remote-containers ms- 0.251.0
remote-ssh ms- 0.84.0
remote-ssh-edit ms- 0.80.0
remote-wsl ms- 0.66.3
rewrap stk 1.16.3
vim vsc 1.23.2
vscode-markdownlint Dav 0.48.1
vscode-new-file dku 4.0.2
gitlens eam 12.2.1
copilot Git 1.43.6621
vscode-pull-request-github Git 0.50.0
go gol 0.35.2
todo-tree Gru 0.0.215
latex-workshop Jam 8.29.0
plantuml jeb 2.17.3
better-cpp-syntax jef 1.15.19
serenity-dsl-syntaxhighlight kle 0.2.1
cpptools ms- 1.12.4
wordcount ms- 0.1.0
rust-analyzer rus 0.3.1186
crates ser 0.5.10
comment-divider sta 0.4.0
even-better-toml tam 0.18.1
latex-utilities tec 0.4.6
shellcheck tim 0.21.4
cmake twx 0.0.17
vscode-lldb vad 1.7.4
markdown-all-in-one yzh 3.4.3
grammarly znc 0.22.1
vscode-proto3 zxh 0.5.5

(4 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonvspyt551:30345470
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30557514
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
pylanb8912:30545647
vsclangdf:30486550
c4g48928:30535728
hb751961:30553087
dsvsc012:30540252
azure-dev_surveyone:30548225
2144e591:30553903

@tdjastrzebski
Copy link

tdjastrzebski commented Sep 6, 2022

I have the same problem on Windows 11.

@rzhao271 rzhao271 added windows 11 VS Code on Windows 11 issues and removed windows VS Code on Windows issues labels Sep 6, 2022
@rzhao271
Copy link
Contributor

rzhao271 commented Sep 6, 2022

I'm unable to reproduce the issue on Windows 10 + Ubuntu WSL. Added Windows 11 label.

@rzhao271
Copy link
Contributor

rzhao271 commented Sep 7, 2022

It turns out that win_caption_button_container.cc in electron/electron has some code that disables the maximize/restore button when touch mode is enabled. is_touch is determined by touch_ui in Chromium, which is determined partially by IsWindows10OrGreaterTabletMode in Chromium. There's also a comment in the last link about the Surface 4 always returning tablet mode.

I'm curious whether you are using a tablet, or whether Chromium thinks you are using a tablet (or in tablet mode) when you're not actually using one?

@rzhao271 rzhao271 added this to the September 2022 milestone Sep 7, 2022
@johningve
Copy link
Author

I'm curious whether you are using a tablet, or whether Chromium thinks you are using a tablet (or in tablet mode) when you're not actually using one?

That appears to be the issue! My laptop (Asus Flow X13) has a touch screen with a 360 degree hinge (like the Lenovo Yoga laptops). I typically have it standing on my desk in "tent mode" where the screen is folded almost all the way to the back, like this: ∧

When I folded it back and used it as a normal laptop, the maximize/restore button functions as expected.

@deepak1556
Copy link
Contributor

Thanks for confirming the issue, this is same as https://bugs.chromium.org/p/chromium/issues/detail?id=1338572. Electron should allow the window to be maximized if the window is not already maximized when changing to tablet mode.

@deepak1556 deepak1556 added upstream Issue identified as 'upstream' component related (exists outside of VS Code) electron Issues and items related to Electron titlebar VS Code main title bar issues confirmed Issue has been confirmed by VS Code Team member and removed confirmation-pending labels Sep 8, 2022
@joaomoreno joaomoreno added this to the Backlog milestone Oct 3, 2022
@deepak1556 deepak1556 modified the milestones: Backlog, November 2022 Oct 28, 2022
@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Oct 28, 2022
@rzhao271 rzhao271 added the author-verification-requested Issues potentially verifiable by issue author label Nov 29, 2022
@VSCodeTriageBot
Copy link
Collaborator

This bug has been fixed in the latest release of VS Code Insiders!

@johningve, you can help us out by commenting /verified if things are now working as expected.

If things still don't seem right, please ensure you're on version 8b98917 of Insiders (today's or later - you can use Help: About in the command palette to check), and leave a comment letting us know what isn't working as expected.

Happy Coding!

@andreamah
Copy link
Contributor

I'm on the newest version of insiders on Windows 11 and I'm still getting this error

Recording 2022-11-30 at 15 48 15

I'm trying to click, but the window isn't changing.

@andreamah andreamah reopened this Nov 30, 2022
@andreamah andreamah added the verification-found Issue verification failed label Nov 30, 2022
@VSCodeTriageBot VSCodeTriageBot removed the insiders-released Patch has been released in VS Code Insiders label Nov 30, 2022
@rzhao271 rzhao271 modified the milestones: November 2022, December 2022 Dec 1, 2022
@rzhao271 rzhao271 removed author-verification-requested Issues potentially verifiable by issue author verification-found Issue verification failed labels Dec 1, 2022
@rzhao271 rzhao271 modified the milestones: December 2022, January 2023 Dec 6, 2022
@deepak1556
Copy link
Contributor

@andreamah were you testing on a touch device ?

@rzhao271
Copy link
Contributor

rzhao271 commented Dec 8, 2022

I can also repro the issue on Windows 11 while in tablet mode.

@andreamah
Copy link
Contributor

@andreamah were you testing on a touch device ?

Yeah! Interesting, I tested on a surface laptop studio in "stage mode", so I guess that counts as a tablet mode?

@rzhao271
Copy link
Contributor

I just tested this issue again.
The issue is not fixed with the exploration build, but it is potentially as-designed.
When restored (unmaximized), one is able to maximize the window. After the window has been maximized, one cannot restore it. This behaviour actually lines up with Chrome, because Chrome completely disables the restore button while in touch mode after the user maximizes it. The minimize and close buttons are still available.
On Edge, one can maximize and restore the window while in touch mode. I find this behaviour more intuitive.

@deepak1556
Copy link
Contributor

@rzhao271 the original issue is about maximize button not working when entering touch mode which has been addressed. As for aligning the restore behavior either with edge or chrome should be a separate issue, also this needs discussion in upstream electron.

@rzhao271
Copy link
Contributor

In that case, closing this issue as verified

@rzhao271 rzhao271 added the verified Verification succeeded label Feb 21, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member electron Issues and items related to Electron titlebar VS Code main title bar issues upstream Issue identified as 'upstream' component related (exists outside of VS Code) verified Verification succeeded windows 11 VS Code on Windows 11 issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants