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

Double-clicking on the title bar to zoom the window does not work on macOS #150511

Closed
liby opened this issue May 27, 2022 · 32 comments
Closed

Double-clicking on the title bar to zoom the window does not work on macOS #150511

liby opened this issue May 27, 2022 · 32 comments
Assignees
Labels
electron Issues and items related to Electron info-needed Issue requires more information from poster macos Issues with VS Code on MAC/OS X upstream Issue identified as 'upstream' component related (exists outside of VS Code) workbench-window Window management

Comments

@liby
Copy link
Contributor

liby commented May 27, 2022

Issue Type: Bug

In macOS, double click on the title bar of the application, unable to zoom window.

Similar issue: #57318, #55421

Setting window.titleBarStyle to custom will quickly solve the issue.

VS Code version: Code 1.67.2 (c3511e6, 2022-05-17T18:20:57.384Z)
OS version: Darwin x64 21.5.0
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz (16 x 2300)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 3, 3, 3
Memory (System) 32.00GB (15.58GB free)
Process Argv --crash-reporter-id 0d1fe5f2-6adf-4e8c-a682-7a457856aa1c --crash-reporter-id 0d1fe5f2-6adf-4e8c-a682-7a457856aa1c --crash-reporter-id 0d1fe5f2-6adf-4e8c-a682-7a457856aa1c
Screen Reader yes
VM 0%
Extensions (14)
Extension Author (truncated) Version
gitlens eam 12.0.7
copilot-nightly Git 1.23.6018
ts-error-translator mat 0.5.1
git-graph mhu 1.30.0
remote-containers ms- 0.236.1
indent-rainbow ode 8.3.1
material-icon-theme PKi 4.17.0
vscode-fileutils sle 3.5.0
guides spy 0.9.3
code-spell-checker str 2.2.0
errorlens use 3.5.1
vim vsc 1.22.2
fig wit 0.0.6
material-theme zhu 3.13.29
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30443607
pythontb:30283811
pythonptprofiler:30281270
vsdfh931cf:30280410
vshan820:30294714
vstes263cf:30335440
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
cppdebug:30492333
vsclangdf:30486550

@sbatten
Copy link
Member

sbatten commented May 27, 2022

steps imply native titlebar is failing

@liby
Copy link
Contributor Author

liby commented May 27, 2022

imply

Yes, only with "window.titleBarStyle": "custom".

@bpasero
Copy link
Member

bpasero commented May 28, 2022

This is a setting in macOS to control:
image

Did you change it?

@bpasero bpasero added the info-needed Issue requires more information from poster label May 28, 2022
@liby
Copy link
Contributor Author

liby commented May 28, 2022

This is a setting in macOS to control: image

Did you change it?

Kapture.2022-05-28.at.12.57.51.mp4

@bpasero
Copy link
Member

bpasero commented May 28, 2022

I do not see a bug in your case, the window seems to zoom just fine?

@liby
Copy link
Contributor Author

liby commented May 28, 2022

I do not see a bug in your case, the window seems to zoom just fine?

In previous versions, double-clicking on the title bar would maximize or restore the window depending on the size of the current window(This is also the behavior of other applications on mac.). The current behavior of window.titleBarStyle: native is normal, but custom will only maximize.

Kapture.2022-05-28.at.13.11.44.mp4

@bpasero
Copy link
Member

bpasero commented May 28, 2022

Oh yes you are right, other apps maximize and restore, but maybe this depends on how macOS thinks what the right bounds are for the window to show all contents? Maybe for the VS Code window the optimal size is always the maximized?

Can you pin point a version where this used to work?

@liby
Copy link
Contributor Author

liby commented May 28, 2022

@bpasero

Maybe for the VS Code window the optimal size is always the maximized?

I don't think so. Even in the current version, "window.titleBarStyle": "custom" has the chance to work as usual for a period of time. Sometimes it may be when I just restart the computer, sometimes it may be when I switch from "window.titleBarStyle": "native" to "window.titleBarStyle": "custom", but there is no guarantee that it will work every time.
And also only works normally for a period of time, after a period of time you can only maximize, can not restore the window.

Can you pin point a version where this used to work?

It occasionally works fine for the reasons mentioned above, so I didn't notice the issue until recently. I'm sorry I can't give an exact version that works normal.

@liby
Copy link
Contributor Author

liby commented Jun 12, 2022

@bpasero
I think I should have located the issue, when exiting VSCode with the window maximized, this issue is triggered after reopening VSCode.

Kapture.2022-06-12.at.15.38.39.mp4

@bpasero
Copy link
Member

bpasero commented Jun 12, 2022

Can you try to reproduce with our nightly insider builds? You can give our preview releases a try from: https://code.visualstudio.com/insiders/

@liby
Copy link
Contributor Author

liby commented Jun 12, 2022

Can you try to reproduce with our nightly insider builds? You can give our preview releases a try from: code.visualstudio.com/insiders

The problem still exists., and there is crashing issue: When I exit VSCode from the maximized window, if the VSCode is not restored to the maximum window when I reopen it, but initialized to a small window, it causes a crash(
Start with the 22s of the video).

Kapture.2022-06-12.at.17.09.46.mp4

@bpasero
Copy link
Member

bpasero commented Jun 12, 2022

Can you please follow the steps in https://github.com/Microsoft/vscode/wiki/Native-Crash-Issues to get at more details around the crash and attach the result here? Thanks!

@liby
Copy link
Contributor Author

liby commented Jun 12, 2022

Can you please follow the steps in Microsoft/vscode/wiki/Native-Crash-Issues to get at more details around the crash and attach the result here? Thanks!

At the 13s of the video, the program crashed and exited, not me manually.
Tried many times, but did not find any *.dmp files.

Kapture.2022-06-12.at.21.54.52.mp4

@liby
Copy link
Contributor Author

liby commented Jun 12, 2022

When the stable version of the VSCode crashes(at 16~17s), again, no *.dmp files are output.

Kapture.2022-06-12.at.22.01.24.mp4

@bpasero
Copy link
Member

bpasero commented Jun 13, 2022

Can you try to run code --disable-extensions --user-data-dir <directory> where <directory> is an empty folder? This will ensure Code is starting with a fresh data directory, e.g. no specific settings and without any extensions running.

@liby
Copy link
Contributor Author

liby commented Jun 13, 2022

Can you try to run code --disable-extensions --user-data-dir <directory> where <directory> is an empty folder? This will ensure Code is starting with a fresh data directory, e.g. no specific settings and without any extensions running.

After several attempts, neither code nor code-insiders crashed.

@bpasero
Copy link
Member

bpasero commented Jun 13, 2022

Ok then can you find the setting you have set that causes this? Running from the separate user data dir, all settings are default, so add them back 1 by 1.

@liby
Copy link
Contributor Author

liby commented Jun 14, 2022

Ok then can you find the setting you have set that causes this? Running from the separate user data dir, all settings are default, so add them back 1 by 1.

I tried. It's kind of hard.

Also, this seems to off topic, the topic of this issue is that double-clicking the title does not zoom properly.

The "needs more info" label is no longer applicable here.

@bpasero
Copy link
Member

bpasero commented Jun 14, 2022

Can you then maybe create a new issue for the crash specifically?

As for this issue, I can reproduce, and wonder if electron/electron#34473 is related.

@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug upstream Issue identified as 'upstream' component related (exists outside of VS Code) macos Issues with VS Code on MAC/OS X electron Issues and items related to Electron workbench-window Window management and removed info-needed Issue requires more information from poster labels Jun 14, 2022
@bpasero bpasero added the confirmed Issue has been confirmed by VS Code Team member label Jun 14, 2022
@liby
Copy link
Contributor Author

liby commented Jun 14, 2022

Can you then maybe create a new issue for the crash specifically?

No problem, I'll create a new issue for this when I find out what settings are causing the crash.

As for this issue, I can reproduce, and wonder if electron/electron#34473 is related.

From the description, it seems somewhat related? But I'm not sure yet, the context gives too little information.

@bpasero
Copy link
Member

bpasero commented Jun 14, 2022

Hm, now I am having a hard time to reproduce, got it once. I cannot really distill exact steps.

Tried a lot of things, all with native title.

Does it even crash for you when you double click title when no editor is opened?

@liby
Copy link
Contributor Author

liby commented Jun 14, 2022

Hm, now I am having a hard time to reproduce, got it once. I cannot really distill exact steps.

I've only been able to reproduce the issue with the stable version, provided that the expansions and configurations used on a daily basis are enabled.

The issue cannot be reproduced by starting with the code --disable-extensions --user-data-dir <directory> command. Copying all the configuration over didn't cause a crash.

The insider version can't be reproduced now either, no matter how it operates it doesn't cause a crash, there is no updated version, and no expansions or configurations are installed.

Does it even crash for you when you double click title when no editor is opened?

Sorry, I didn't understand your point here.

@bpasero
Copy link
Member

bpasero commented Jun 14, 2022

So the issue is resolved in insiders with the same settings as stable?

@bpasero bpasero added info-needed Issue requires more information from poster and removed bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member labels Jun 14, 2022
@liby
Copy link
Contributor Author

liby commented Jun 14, 2022

So the issue is resolved in insiders with the same settings as stable?

No.

Can you please follow the steps in Microsoft/vscode/wiki/Native-Crash-Issues to get at more details around the crash and attach the result here? Thanks!

I installed the Insiders version according to your reply. From the time I installed it to the time I noticed the crash, I don't have any additional configuration or any extensions installed.

In the previous reply, I also posted the video which shows how it crashes. Today, I didn't update it or do any other configuration, but found that I couldn't get it to crash as I did yesterday.

I don't think it's been solved, we haven't done anything, it remains to be seen.

@bpasero
Copy link
Member

bpasero commented Jun 14, 2022

Ok sorry, I have no clue or know how to help further 🤷

@liby
Copy link
Contributor Author

liby commented Jun 14, 2022

Ok sorry, I have no clue or know how to help further 🤷

Summary.

Version Have Custom Settings Installed Additional Extensions Does it crash
Insiders None None Occasional
Stable None None No
Stable None Yes No
Stable Yes No Occasional
Stable Yes Yes Yes

@deepak1556
Copy link
Contributor

@liby in the recording provided #150511 (comment) and #150511 (comment), you would need to adjust the way application is launched to get crash logs,

  1. Path provided to --crash-reporter-directory should be absolute, ex: code --crash-reporter-directory /tmp/vscode-crash

  2. The flag --crash-reporter-directory is not persistent, (i-e) you cannot launch application from spotlight when recording crash logs, every instance launched should contain the flag. ex:
    (i) From terminal launching the first instance, code --crash-reporter-directory /tmp/vscode-crash
    (ii) Perform window resize operations and quit Cmd + Q
    (iii) New instance should also be launched from terminal, code --crash-reporter-directory /tmp/vscode-crash

Can you try with these steps corrected and see if the crash logs are created. Thanks!

As for the original issue, I am little confused based on the thread above, #150511 (comment) suggests that zoom does not work with window.titleBarStyle": "native" but #150511 (comment) and #150511 (comment) shows that zoom in/out flow works fine with native titlebar but with custom titlebar zoom works fine but restore does not occasionally. Can you please clarify the issue.

@liby
Copy link
Contributor Author

liby commented Jun 14, 2022

Can you try with these steps corrected and see if the crash logs are created. Thanks!

About the crash. I've tried this many times over the last six or seven hours, but now I can't reproduce issue. Both the stable and internal versions have been tried, whether it is launch from spotlight or launched from terminal.

It's so weird. I haven't updated the version or changed any configuration since the crash was discovered. But just can't reproduce the issue, but I'll follow up on this and create a ticket as soon as I have a log entry.

Can you please clarify the issue.

When VSCode is first installed and started, the zoom in/out is normal.

In the future, if you exit VSCode in a non-maximized window state, the zoom in/out will also work normal the next time you start VSCode.

So, I'd say it works fine occasionally.

@deepak1556
Copy link
Contributor

When VSCode is first installed and started, the zoom in/out is normal.

In the future, if you exit VSCode in a non-maximized window state, the zoom in/out will also work normal the next time you start VSCode.

So, I'd say it works fine occasionally.

All of this observation is for custom titlebar and not native titlebar, is that correct ?

@liby
Copy link
Contributor Author

liby commented Jun 15, 2022

All of this observation is for custom titlebar and not native titlebar, is that correct ?

Yep

@VSCodeTriageBot
Copy link
Collaborator

Hey @deepak1556, this issue might need further attention.

@liby, you can help us out by closing this issue if the problem no longer exists, or adding more information.

@VSCodeTriageBot
Copy link
Collaborator

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@VSCodeTriageBot VSCodeTriageBot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 11, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Oct 26, 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 info-needed Issue requires more information from poster macos Issues with VS Code on MAC/OS X upstream Issue identified as 'upstream' component related (exists outside of VS Code) workbench-window Window management
Projects
None yet
Development

No branches or pull requests

5 participants