Visual Studio Code is always on top in Linux

3

1

I've installed VS Code in Ubuntu 14.04 LTS. When using it, it always sits on top of other windows. Not only does it sit on top of other applications like the terminal, it also sits on top of its own dialogs (like for opening a file):

enter image description here

Is there some sort of weird interaction between the API that VS Code is using and the X server that might be causing this? How can it be fixed?

Note that this is not the same as this question, which concerns Visual Studio (not VS Code) on Windows.

Andrew Mao

Posted 2016-05-03T17:53:40.590

Reputation: 961

So if you get rid of X Server, does this behavior, still exhbit itself? – Ramhound – 2016-05-03T18:09:52.770

I tried getting rid of X server but then my window manager stops working. – Andrew Mao – 2016-05-03T18:15:06.457

Is this a virtual machine, or installed directly? I did find this issue with VirtualBox, where OpenGL windows are on top of other windows in Linux guests. But I'm unsure if this applies here.

– Cory Shay – 2016-05-03T18:56:21.717

@CoryShay yes, this is in VirtualBox! So if the problem is that it is using OpenGL, is there any workaround? – Andrew Mao – 2016-05-03T19:05:41.467

@AndrewMao According to the issue it appears for some they were able to get around it by doing export LIBGL_ALWAYS_SOFTWARE=1 which you should be able to place within your ~/.profile. – Cory Shay – 2016-05-03T19:08:06.580

I see...meaning turning off hardware rendering. Makes sense; Chrome seems to have this issue as well. – Andrew Mao – 2016-05-03T19:12:02.220

I just installed vscode on Ubuntu 16 and ran into this problem. I can't even minimize vscode; it only minimize the title bar but the vscode application windows remains open and stuck on top of all other windows.. I wonder if this is Electron bug - not vscode? – SoichiH – 2016-05-08T18:30:40.460

I also have this issue on the physical machine (not VirtualBox), I connect to that machine via x2go though. – Eiver – 2018-03-07T19:25:26.917

Answers

1

It's possibly you have accidentally set it to be "Always on Top", which it appears according to this answer you may be able to get to using "Alt+SPACE"--which will bring up the right click menu-- and then T for "Always on Top". If it is selected it should deselect the option. Otherwise you should be able to right click on the top border and get the same options.

Cory Shay

Posted 2016-05-03T17:53:40.590

Reputation: 113

Thanks for the suggestion. Always on Top is not checked, but it still appears on top. If I check it, the title bar disappears completely. – Andrew Mao – 2016-05-03T18:45:04.273

That's really weird. Haven't ever seen this issue, I will try once on a vm to see if I can replicate. – Cory Shay – 2016-05-03T18:47:04.117

1

I started seeing this issue after I installed Guest Additions updates to the VirtualBox. I tried setting the LIBGL_ALWAYS_SOFTWARE env var but that didn't seem to fix it for me. Finally, I ending up reinstalling the Guest Additions and that ended up fixing it.

Britt G

Posted 2016-05-03T17:53:40.590

Reputation: 11