WSL2/WSLg: How to bring back windows which open out of screen
In this post will fix the issue that windows open with their title bar out of screen
Many Windows users have WSL installed for their AWS development. With the advent of WSLg - the official support for running Linux GUI apps in Windows - it has become convenient to run the IDE in WSL as well.
Unfortunately WSLg still has some teething problems. One of the most annoying issues is that windows open with their title bar out of screen and the window therefor cannot be moved back onto the screen. This seems to be happening very frequently with Jetbrains IntelliJ based IDEs, where widgets often open with some portion of the UI invisible or out of the screen.
A quick and simple workaround1 to get your Linux windows back on screen is to make the window active with a left mouse click and then press the keyboard buttons
win + shift + left
This should bring back the whole window onto your screen.
Command line alternatives:
Install
|
|
Use
|
|
to position the active window back onto the screen.
Or you can run this short script that will position all the windows top left:2
|
|
-
Solution suggested by wiewiurdp in Windows open out of screen and no way to bring them back #332 ↩︎
-
Solution suggested by tyingq in Ability to move windows when the title bar is off screen #529 ↩︎