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

Issue with Window Placement for Wine Applications on Dual Monitor Setup #2350

Open
joaberg opened this issue May 23, 2023 · 9 comments
Open
Labels
bug Something isn't working

Comments

@joaberg
Copy link

joaberg commented May 23, 2023

Steps to reproduce:

  1. Set up a dual monitor configuration in Hyprland with the following settings:

    monitor=eDP-1,1920x1080@60,860x1440,1
    monitor=desc:Samsung Electric Company C34J79x HTRMA00910,3440x1440@100,0x0,1
    

I have a laptop monitor below, and a bigger monitor above. (Notice the location 860x1440)

  1. I have experimented with the following window rules for terminal.exe running through Wine:
    terminal.exe is the MetaTrader4 application, used for forex trading.

    windowrulev2 = float,class:^(terminal.exe)$
    windowrulev2 = nomaxsize,class:^(terminal.exe)$
    windowrulev2 = center,class:^(terminal.exe)$
    
  2. Disconnect the external monitor.

  3. Start terminal.exe through Wine.

Expected outcome:

The terminal.exe window should open in the center of the screen and stay there, as specified by the center window rule.

Noted outcome:

The terminal.exe window initially opens in the center of the screen, but then suddenly moves to position 0,19. The output from hyprctl clients:

Window c50d6170 -> 225008: IG-LIVE - IG Group Limited - [EURUSD,M1]:
	at: 0,19
	size: 1896,1023
	workspace: 5 (5)
	floating: 1
	monitor: 0
	class: terminal.exe
	title: 225008: IG-LIVE - IG Group Limited - [EURUSD,M1]
	pid: 95351
	xwayland: 1
	pinned: 0
	fullscreen: 0
	fullscreenmode: 0
	fakefullscreen: 0
	grouped: 0
	swallowing: 0

Additional information:

If i change monitor setting from:
monitor=eDP-1,1920x1080@60,860x1440,1
to:
monitor=eDP-1,1920x1080@60,0x0,1
Then i will see the window that is located at 0,19, and i can move it around etc as normal.

Suspect the issue here is in the interaction between hyprland and some wine setting.

My OS is Garuda Sway edition (Arch based)

@joaberg joaberg added the bug Something isn't working label May 23, 2023
@burein-ita
Copy link

This also happens with Ableton's Live dialogs.

In general, Xwayland and especially wine window management sucks under Hyprland.

If you really need to use wine I would suggest you enable Emulate a virtual desktop in wine. That is the only way I got around Hyprland's quirkyness with wine windows.

@zakk4223
Copy link
Contributor

Do any of the issues resolve themselves if you use xrandr to set a primary X11 display? (xrandr --output DP-1 --primary as an example)

@joaberg
Copy link
Author

joaberg commented May 24, 2023

Do any of the issues resolve themselves if you use xrandr to set a primary X11 display? (xrandr --output DP-1 --primary as an example)

Yes that helps. (xrandr --output eDP-1 --primary)
Now wine will send the window to whatever I define as primary, and disregard the active window I am starting it from.

@ThomChroma
Copy link

It's not a Hyprland bug, I had the same problem on Sway. The xrandr trick is the way to go to handle XWayland as long as Wine doesn't support Wayland. But it's quickly on the way 👍

@joaberg
Copy link
Author

joaberg commented Jun 1, 2023

For me this is only a problem in Hyprland, Sway works just fine.

@CipherJay
Copy link

Has anyone figured out how to make this tile in like other applications?

@marco-zan
Copy link

Same / similar to my problem #2856 (comment)

@justinvson-pd
Copy link

Having the same issue with allegro free physical viewer, but not with dual monitor setup, as it happens on just my laptop screen and no other monitors connected.

I can recover by changing focus to the out of screen wine window by using my keybind for "movefocus u" and then togglefloating with another keybind, after which it will tile normally, and behaves normally.

@kaibagley
Copy link

I'm having a probably related issue: Using FL Studio under Wine, the windows aren't aligned with the cursor position. Unless FL is full screen, or aligned with the top of the monitor, it is difficult to align the cursor with any fields in the window.

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

No branches or pull requests

8 participants