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

WSL 2 GUI application is not aware of Windows screen dimensions #584

Open
smuehlst opened this issue Nov 23, 2021 · 12 comments
Open

WSL 2 GUI application is not aware of Windows screen dimensions #584

smuehlst opened this issue Nov 23, 2021 · 12 comments
Labels
bug Something isn't working window-management Window management issue

Comments

@smuehlst
Copy link

smuehlst commented Nov 23, 2021

Version

Microsoft Windows [Version 10.0.22000.318]

WSL Version

WSL 2

Kernel Version

5.10.60.1

Distro Version

Debian GNU/Linux 11 64-bit from Microsoft Store

Other Software

Eclipse 2021-09 Linux 64-bit

Repro Steps

  • Run Eclipse for Linux under WSL 2.
  • Open a C/C++ Editor window.
  • Right-click into the editor window to open the editor popup window.
  • Open the "Team" sub-menu from the popup menu.

Expected Behavior

The "Team" sub-menu should be opened so that it is fully visible on the Windows screen.

This is a screenshot of running the Windows version of Eclipse, after right-clicking into the editor window to open a popup menu and after opening the sub-menu "Team":

Windows GUI Eclipse

Note that the "Team" sub-menu is popped up upwards so it can be fully displayed on the screen. If the sub-menu were popped up downwards it wouldn't fit on the screen

This is a screenshot of the Linux version of the same Eclipse version, when opening the same editor popup menu and "Team" sub-menu:

WSL2 GUI Eclipse

Note that the "Team" sub-menu is opened downwards, and extends beyond the screen so some of the sub-menu entries are invisible and cannot be clicked. This does never happen when running Eclipse under a real Linux graphical desktop.

Actual Behavior

The "Team" sub-menu is opened downwards so that it is not fully visible on the Windows screen, and some of the menu entries can't be clicked.

Apparently the Linux GUI application running under WSL 2 is not aware of the actual screen dimensions.

Diagnostic Logs

No response

@craigloewen-msft
Copy link
Member

Could you please file this as an open item on the WSLg repo? The full team that works on WSLg monitors that repo instead at: microsoft/wslg

You can file the issue here: https://github.com/microsoft/wslg/issues/new?assignees=&labels=bug&template=bug_report.md&title=

And feel free to link back to this issue if you like. I'll close this one for bookkeeping purposes so it can be tracked on the wslg repo instead. Thanks!

@craigloewen-msft craigloewen-msft transferred this issue from microsoft/WSL Nov 23, 2021
@craigloewen-msft
Copy link
Member

I transferred this over for you!

@smuehlst
Copy link
Author

@craigloewen-msft Thank you for moving the issue to the right repository, I was not aware of this.

@smuehlst
Copy link
Author

Adding the missing information about the WSLg version: I have "Windows Subsystem for Linux WSLg Preview" version 1.0.26.

@hideyukn88 hideyukn88 added bug Something isn't working window-management Window management issue labels Jan 5, 2022
@gianmarcoodorizzi
Copy link

@smuehlst did you find a way to work around this?

@smuehlst
Copy link
Author

@gianmarcoodorizzi Unfortunately not, the problem is still bothering me.

@velo
Copy link

velo commented Mar 1, 2022

Any workarounds on this yet?

@salvatore-coppola
Copy link

Any workarounds on this yet?

Same request from my side.

@drivett27
Copy link

I take it there is no resolution for this yet?
I have a requirement for running Eclipse under WSL and it is incredibly awkward and annoying to have to try and choose menu options when they don't realign to fit the "desktop"
So same request from me as well please.

@tmottershead
Copy link

I have a kind of workaround for the pop-up menus disappearing off screen, but then I have issues with the find/replace dialog box disappearing to the back of the Z plane and hiding. The pop-up menus workaround is to set GDK_BACKEND=x11 before running eclipse. I have an alias to do this:

alias eclipse='GDK_BACKEND=x11 ~/eclipse/eclipse &'

To be honest, I think I'm going to disable Wayland and go back to using VcXsrv for the time being.

@Achaad
Copy link

Achaad commented Dec 4, 2023

Is there any solution or at least some progress with it?
Due to corporation policies I have no choice but to run Eclipse via WSLg and this issue is really inconvenient.

@Bocom
Copy link

Bocom commented Jan 12, 2024

It's disappointing that this has still not been fixed.

The only alternative (aside from not using WSLg) being "use X11" (by using the GDK_BACKEND=x11 workaround posted above) is not great, in part because it only makes the situation slightly better for me; I can see most of the menu, but some of it still gets obscured by the taskbar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working window-management Window management issue
Projects
None yet
Development

No branches or pull requests

10 participants