Microsoft/vscode

VSCode maximized window shifted right and bottom - on WSL2 Linux

Open

#242,399 创建于 2025年3月1日

在 GitHub 查看
 (7 评论) (8 反应) (1 负责人)TypeScript (10,221 fork)batch import
WSLbugconfirmation-pendinghelp wantedlinux

仓库指标

Star
 (74,848 star)
PR 合并指标
 (平均合并 11小时 43分钟) (30 天内合并 1,000 个 PR)

描述

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

  • VS Code Version:1.97.2
  • OS Version: Debian or OracleLinux_9_1 on wsl2 2.4.11
  • Version: 1.97.2 Commit: e54c774e0add60467559eb0d1e229c6452cf8447 Date: 2025-02-12T23:20:35.343Z Electron: 32.2.7 ElectronBuildId: 10982180 Chromium: 128.0.6613.186 Node.js: 20.18.1 V8: 12.8.374.38-electron.0 OS: Linux x64 5.15.167.4-microsoft-standard-WSL2

Steps to Reproduce:

  1. Install VSCode on any distribution on wsl2 2.4.11 under /home/userid/.local/microsoft
  2. Make sure to have or to install all the necessary libraries required for the vscode gui to run successfully including dbus and enabling systemd.
  3. start vscode: /home/userid/.local/microsoft/VSCode-linux-x64/code
  4. Maximize it and see the window shifted to left and bottom such that the right part of the windows shifted out of the screen; and the mouse cursor's bottom part seems to be the active part of the cursor (not the arrow tip)

I understand we should be using the installation on Windows and connect to the wsl using the wsl extension, but this used to work before I upgraded the WSL. This could be something the the WSL team needs to look at or perhaps someone from the VSCode team needs to look at what changed in WSL and fix this. But I think it is the later because the other gui application maximize as expected.

This is how VSCode looks when maximized on linux running on wsl2 Image

贡献者指南