Windows-Apps-Hub / UnitedSets

Bringing back Sets and Browser
https://www.microsoft.com/store/apps/9N7CWZ3L5RWL
MIT License
232 stars 10 forks source link

[Bug] does not fully work with WSLg #24

Open UmashankarTriforce opened 1 year ago

UmashankarTriforce commented 1 year ago

Hi Dev/Team

Thank you for developing this app. This has been super helpful in my day-to-day productivity! As I'm a developer, I tend to use WSL a lot. With Windows 11, WSL comes with WSLg (GUI support for WSL), and apps opened with WSLg does not cooperate with UnitedSets. Adding support for WSLg would be extremely useful, and I'm sure many devs using this app can appreciate the addition!

GetGet99 commented 1 year ago

Hi, Thank you for the feature request. However, this seems like it has been an issue on WSLg side. To the best of my knowledge, if the window is moved by win32 API, it breaks. We need https://github.com/microsoft/wslg/issues/324 to be fixed/implemented in order to allow this to happen. Seems like the issue is one year old and it is still not fixed.

I'll put this issue on low priority since I cannot fix this myself. It requires the WSLg team to fix the issue. I'm sorry.

GetGet99 commented 1 year ago

Actually, I can implement one solution that might help: Hide and show the WSLg window on tab change. However, the window will not automatically move when the window of the set is moved. So, you have to move and resize the window yourself, but if you switch tabs, the window will automatically show/hide for you.

Note that I did not test this and do not guarantee if hiding and showing the window only will still break WSLg or not but it is unlikely that it will break.

Would you like me to attempt to implement this workaround first?

UmashankarTriforce commented 1 year ago

Thanks for your response! For the sake of clarity, I would like to explain the problem I'm facing. Any GUI app I run on the WSL environment, once I add it to the UnitedSets tab, the app fails to resize and refresh the window content. I'm unable to interact with that particular tab. I have to pull it out of the UnitedSets tab to begin interacting with the window again. I'm not sure if that's the issue you are talking about and referred in the previous comment.

Regarding your workaround solution, it works for me. I run multi-screen setup, and I have multiple UnitedSets window for each screen (based on the snapping zones and size of the screen) to which I attach apps based on my convenience. So, I would not be moving apps around, once they are positioned to their respective UnitedSets window. However, I would prefer if UnitedSets automatically moved and resized the WSLg window that's being attached (which you mentioned would not be possible with your workaround solution).

Maybe as a PoC, we can get the workaround solution working first, then look into the resizing/moving problem. How does that work for you?

GetGet99 commented 1 year ago

Thank you for the response!

I'm not sure if that's the issue you are talking about and referred in the previous comment.

Yes, that is correct, according to what I experienced adding WSLg application as a test.

Maybe as a PoC, we can get the workaround solution working first, then look into the resizing/moving problem. How does that work for you?

I can implement the workaround. However, I cannot do anything with resizing/moving problem. This needs to be fixed or implemented by WSLg team themselves at https://github.com/microsoft/wslg/issues/324. I have no control over resizing or moving if they do not fix this. You can try to follow that issue with them in the link above.

GetGet99 commented 1 year ago

The workaround is implemented and pushed to the repository. (Not available in the store yet)

GetGet99 commented 1 year ago

For full support moving and resizing, please follow up on the issue with WSLg repository. I cannot do anything right now.

GetGet99 commented 1 year ago

The workaround is not yet available for Experimental InDev Version but should be within 1-2 days.

You can find Experimental InDev Version link on Readme

GetGet99 commented 1 month ago

I've changed this to be a bug. However, as the issue on WSLg does not really have any updates, I can't really fix this now.