Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vscode OpenFile dialog window opens in background

I have found multiple discussions complaining about OpenFile dialog window of VSCode open in background, so you need to use your mouse pointer to bring it up, which is kind of annoying, but did not found a solution. Is this a bug or unpleasant feature? Any solution?

I am using

Version: 1.71.2
Commit: 74b1f979648cc44d385a2286793c226e611f59e7
Date: 2022-09-14T21:12:14.256Z
Electron: 19.0.12
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Linux x64 5.15.0-48-generic
Sandboxed: No

On Ubuntu 20.04.

like image 762
Abolfazl Avatar asked Jan 22 '26 01:01

Abolfazl


2 Answers

The workaround I use is this one. vscode opens the dialog for local file edits but uses a simple menu for remote file edits (which avoids the whole problem). So I just set vscode to use simple menu all the time.

I just set the setting Files -> Simple Dialog = true

enter image description here

like image 80
Peter Moore Avatar answered Jan 24 '26 20:01

Peter Moore


I figured out how to create a workaround using this instruction

I created a file ~/.config/devilspie2/code.lua with the following content:

if (get_application_name() == 'code' and get_window_role() == 'GtkFileChooserDialog') then focus_window() center(); end
like image 45
vladimir ulianitsky Avatar answered Jan 24 '26 19:01

vladimir ulianitsky