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

Handle X410 windows #52

Closed
pigmej opened this issue Oct 21, 2021 · 9 comments
Closed

Handle X410 windows #52

pigmej opened this issue Oct 21, 2021 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@pigmej
Copy link

pigmej commented Oct 21, 2021

Let's say that you use WSL2 & x410 combo in windowed apps mode. Then window will be created in a form of:

Untitled File 1 - gedit
ahk_class X410_XAppWin
ahk_exe X410.exe
ahk_pid 1456

Currently, that window seems to be completely unmanaged by komorebi. I was wondering if it's possible to manage it.
It works with "normal" window snap to XYZ thingy. x410 docu about it states: https://x410.dev/news/want-to-snap-gnome-apps-to-your-screen-edges-like-windows-apps-get-the-new-x410-version-2-9-3/

Afair it was working fine in actual virtual desktops by actualtools.

@LGUG2Z
Copy link
Owner

LGUG2Z commented Oct 21, 2021

Can you run the AHK script below and share the WindowStyle and WindowExStyle output for a x410 app? This will help me narrow down why it is being excluded by the current window management logic.

https://www.computoredge.com/AutoHotkey/Downloads/CheckStyles.ahk

@LGUG2Z LGUG2Z self-assigned this Oct 21, 2021
@LGUG2Z LGUG2Z added the enhancement New feature or request label Oct 21, 2021
@pigmej
Copy link
Author

pigmej commented Oct 21, 2021

Do you still want them after I shared the stuff in #53 ?

@LGUG2Z
Copy link
Owner

LGUG2Z commented Oct 21, 2021

Yes please, just curious to know if this behaviour is the same across all of the WSL UI solutions. 🤔

@pigmej
Copy link
Author

pigmej commented Oct 21, 2021

Both from X410 included.
2021-10-21_21-24
2021-10-21_21-24_1

@pigmej
Copy link
Author

pigmej commented Oct 21, 2021

The diff with x410 and wslg is that x410 "can snap" to standard windows snap thingy (also fancy zones), while wslg cannot. Not sure how big diff that makes for komorebi though.

@LGUG2Z LGUG2Z closed this as completed in 3f3c281 Oct 21, 2021
LGUG2Z added a commit that referenced this issue Oct 21, 2021
This commit introduces an allow_wsl2_gui override in
Window.should_manage() which ensures that Linux GUI apps being run
through WSLg, VcXsrv or X410 will be automatically tiled.

For now the exes that trigger this override are kept in a static Vec in
the codebase, but this could be made configurable in the future if there
is a specific feature request.

resolve #52, resolve #53
@pigmej
Copy link
Author

pigmej commented Oct 22, 2021

Works good! :)

@pigmej
Copy link
Author

pigmej commented Oct 29, 2021

Hey @LGUG2Z,

Something changed in the behavior, My X410 windows now have following properties:

2021-10-29_09-08_1

2021-10-29_09-08

check the last two from the second screen.

@LGUG2Z
Copy link
Owner

LGUG2Z commented Oct 29, 2021

In this case I think instead of trying to play catch up with X410 the best approach will be to add a managed override for windows spawned by that exe:

komorebic manage-rule exe X410.exe

@pigmej
Copy link
Author

pigmej commented Oct 30, 2021

@LGUG2Z I think there is sth fishy going on. I just noticed that these windows are "unmanaged" when they're first spawned, but all that I have to do is minimize and bring it back again then it's fine.

Does that happen to you too?

I haven't found any diffs for window style what so ever after minimize action. It seems that it's some W11 awkwardness or sth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants