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

[BUG] Window focus does not follow on command line code invocation #149067

Closed
jnooree opened this issue May 9, 2022 · 12 comments
Closed

[BUG] Window focus does not follow on command line code invocation #149067

jnooree opened this issue May 9, 2022 · 12 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) workbench-window Window management
Milestone

Comments

@jnooree
Copy link

jnooree commented May 9, 2022

Issue Type: Bug

Steps to reproduce

  1. Open a workspace (let this A).
  2. Open another workspace or directory (let this B) via code command line executable. For example, run as following command:
code --folder-uri /foo/bar
  1. Visual studio code is focused as expected, but at the first workspace (A). It should instead "follow" focus and display workspace B, the newly opened one.

Additional context

  • This bug still exists on Insiders build.
  • This bug introduced in April 2022 version.

System information

VS Code version: Code 1.67.0 (57fd6d0, 2022-05-04T12:10:15.217Z)
OS version: Darwin arm64 21.4.0
Restricted Mode: No

System Info
Item Value
CPUs Apple M1 (8 x 24)
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) 5, 4, 3
Memory (System) 16.00GB (0.08GB free)
Process Argv --crash-reporter-id 178a0318-7573-4c12-a505-f83a27d91f0f
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30443607
pythontb:30283811
pythonvspyt551:30345470
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
cppdebug:30475216

@jnooree jnooree changed the title [BUG] Window focus does not follow on command line code invocation without tty [BUG] Window focus does not follow on command line code invocation May 9, 2022
@dbaeumer dbaeumer assigned sbatten and unassigned dbaeumer May 9, 2022
@sbatten sbatten assigned bpasero and deepak1556 and unassigned sbatten May 9, 2022
@bpasero
Copy link
Member

bpasero commented May 27, 2022

@jnooree are you possibly having the one window in fullscreen? Does it reproduce always?

@bpasero bpasero added this to the May 2022 milestone May 27, 2022
@bpasero bpasero added workbench-window Window management info-needed Issue requires more information from poster labels May 27, 2022
@jnooree
Copy link
Author

jnooree commented May 27, 2022

are you possibly having the one window in fullscreen?

No windows were in fullscreen mode.

Does it reproduce always?

Yes, it is not a transient (nor random) problem and still exists in v1.67.2.

@bpasero
Copy link
Member

bpasero commented May 27, 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/

@jnooree
Copy link
Author

jnooree commented May 27, 2022

I've found two points after some experiments:

  • Both versions do not have problems in a freshly installed state, or even after extensions were installed.
  • After updating my user settings, both versions reproduced the bug.

(Sorry for my mistake, this was edited.)

@bpasero
Copy link
Member

bpasero commented May 27, 2022

Are you able to share your settings then with me?

@jnooree
Copy link
Author

jnooree commented May 27, 2022

I'll figure out which setting is problematic and share it here in an hour.

@bpasero
Copy link
Member

bpasero commented May 27, 2022

Cool thanks for doing that!

@jnooree
Copy link
Author

jnooree commented May 27, 2022

Found it! It is related to this setting:

{
    "window.newWindowDimensions": "maximized"
}

It looks like vscode is trying to maximize the existing view again, after a new view is opened.

@jnooree
Copy link
Author

jnooree commented May 27, 2022

FYI, I'm sure this bug is introduced between v1.66.2 - v1.67.0.

@bpasero
Copy link
Member

bpasero commented May 27, 2022

Thanks, I believe I know what this is.

@bpasero bpasero removed the info-needed Issue requires more information from poster label May 27, 2022
@bpasero
Copy link
Member

bpasero commented May 27, 2022

/duplicate #149394

@VSCodeTriageBot VSCodeTriageBot added the *duplicate Issue identified as a duplicate of another issue(s) label May 27, 2022
@VSCodeTriageBot
Copy link
Collaborator

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.

Happy Coding!

@github-actions github-actions bot locked and limited conversation to collaborators Jul 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) workbench-window Window management
Projects
None yet
Development

No branches or pull requests

7 participants
@bpasero @deepak1556 @dbaeumer @sbatten @jnooree @VSCodeTriageBot and others