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

Wine windows render as invisible or still frames with borders #53

Open
ghost opened this issue Apr 4, 2022 · 12 comments
Open

Wine windows render as invisible or still frames with borders #53

ghost opened this issue Apr 4, 2022 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Apr 4, 2022

Please describe the bug
Certain Wine windows do not render their content, and instead show a still frame of other content visible on the workspace. Window borders are still rendered. Can also disappear entirely at times; whilst still being visible as running processes.

Steps to reproduce:
I don't expect you to install League of Legends, but as I do not run other Wine applications I don't know how widespread this is, but these issues do not exist in dwm, Gnome or Openbox for me, on the same system, and should therefore be Hypr-related rather than a problem with the Wine installation. Regardless, to reproduce:

For Windows rendering a still frame with a border

  1. Install League of Legends, for example via Lutris or this repository.
  2. Open the client. During this process you should see 1-2 wine-related windows render as a still frame showing what's behind it with a border around it (make sure to have borders enabled in Hypr).

For Windows disappearing entirely
After following the previous steps queue up for a match and swap to a different workspace (leaving the client where it was).
When the queue pops the client will disappear if you're not on the same workspace. If you are on the same workspace as the client it will work as expected.
The client will also disappear after a match is complete, rather than showing the post-game lobby. The process is still running, but it is either not rendered at all or hidden somewhere, requiring killing the wine process for it to reappear (will of course happen next match and so on).

Expected behavior
Windows rendering their content.

Screenshots
This is a screenshot showing the desktop wallpaper behind a Wine window rather than its content. Notice the window borders are still rendered.
2022-04-04-183102_2558x1419_scrot

This is what it should look like:
2022-04-04-192443_1098x646_scrot

Anything else?
Different states like floating or tiled or specified size/position rules do not make a difference.

Possibly useful xprop of the window pictured above:

WM_STATE(WM_STATE):
		window state: Normal
		icon window: 0x0
_NET_WM_DESKTOP(CARDINAL) = 2
_NET_FRAME_EXTENTS(CARDINAL) = 6, 6, 6, 6
_NET_WM_BYPASS_COMPOSITOR(CARDINAL) = 0
_NET_WM_STATE(ATOM) = _NET_WM_STATE_SKIP_PAGER, _NET_WM_STATE_SKIP_TASKBAR
_NET_WM_NAME(UTF8_STRING) = 
WM_ICON_NAME(STRING) = 
WM_NAME(STRING) = "hypr"
_NET_WM_ICON(CARDINAL) = 	Icon (32 x 32):

WM_HINTS(WM_HINTS):
		Client accepts input or input focus: True
		Initial state is Normal State.
		bitmap id # to use for icon: 0x3200017
		bitmap id # of mask for icon: 0x3200019
		window id # of group leader: 0x3400004
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x24, 0x0, 0x0, 0x0
WM_NORMAL_HINTS(WM_SIZE_HINTS):
		program specified location: 1024, 612
		program specified minimum size: 512 by 216
		program specified maximum size: 512 by 216
		window gravity: Static
_NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0x320000c
XdndAware(ATOM) = BITMAP
_NET_WM_PID(CARDINAL) = 17989
WM_LOCALE_NAME(STRING) = "en_GB.UTF-8"
WM_CLIENT_MACHINE(STRING) = "void"
WM_CLASS(STRING) = "leagueclient.exe", "leagueclient.exe"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, _NET_WM_PING

Log:
log.txt It was too long to post on pastebin.

@ghost ghost added the bug Something isn't working label Apr 4, 2022
@ghost ghost assigned vaxerski Apr 4, 2022
@vaxerski
Copy link
Member

vaxerski commented Apr 4, 2022

That's weird, as I've used many wine apps with no issues, havent used league though... Will test.

@vaxerski
Copy link
Member

vaxerski commented Apr 6, 2022

Can't reproduce, all of my wine games and programs (tested: photoshop, homm5, civ4, civ5, terraria, hyperdimension neptunia) work properly. Have you tried changing the window's size when it goes blank?

@ghost
Copy link
Author

ghost commented Apr 9, 2022

Blank window resizing:
1

As for the 'invisible' ones I've discovered that if I can locate it and move/drag the window, it will become visible again. Does not work with the blank ones though.

@vaxerski
Copy link
Member

vaxerski commented Apr 9, 2022

As for the 'invisible' ones I've discovered that if I can locate it and move/drag the window, it will become visible again. Does not work with the blank ones though.

Yeah this one makes sense, some windows do that and I've yet to find out why (my example is always ario)

with the blank ones I don't know what's causing this. The app itself should spew errors if that happens though, have you tried launching it from a terminal and seeing the output?

@ghost
Copy link
Author

ghost commented Apr 13, 2022

I had a look at the wine logs but to be honest interpreting them is a bit beyond my scope.

I realize this entire issue is difficult to troubleshoot when there are no direct log entries and you're not able to reproduce it in your wine applications, so if you want to close this that's fine.

Ideally someone else would report their experience with League of Legends and Hypr so we could rule out my setup being the cause.

@ghost
Copy link

ghost commented Apr 24, 2022

I'm experiencing similar issues however I have achieved a somewhat usable setup with the following rules in hypr.conf:

windowrule=float,class:leagueclientux.exe
windowrule=size 1286 726,class:leagueclientux.exe
windowrule=workspace 2,class:leagueclientux.exe
windowrule=move 650 360,class:leagueclientux.exe

windowrule=float,class:explorer.exe
windowrule=size 0 0,class:explorer.exe
windowrule=workspace 2,class:explorer.exe
windowrule=move 650 360,class:explorer.exe

windowrule=float,class:riotclientux.exe
windowrule=size 1286 726,class:riotclientux.exe
windowrule=workspace 2,class:riotclientux.exe
windowrule=move 650 360,class:riotclientux.exe

windowrule=workspace 2,class:league of legends.exe

With this windows will spawn floating and in their correct sizes preventing odd rendering issues when Hypr attempts to tile them. It is not sufficient to set it to floating as this results in a ~20x40px window.

There are still odd problems which do not arise in other WMs.

  1. All in-game video modes (i.e. borderless, fullscreen, windowed) behave poorly.
  • Windowed mode results in the camera being unable to move (you move it by dragging the cursor to the edge of the screen). This is expected as it happens in other WMs too.
  • Borderless (the recommended setting for Linux) allows camera movement. However, switching to a different workspace and back cuts off part of the window. This does not happen on other WMs. Video.
  • Fullscreen mode results in other workspaces being non-interactive and maintaining the League cursor.Video.

Assigning a fullscreen window rule in Hypr's config does not solve these issues. The somewhat workable solution is to use borderless and either continue to switch back and forth between workspaces until it fixes itself or toggle Hypr's full-screen setting on and off. Not ideal but at least you don't have to restart the game.

  1. As OP described the client is still invisible after closing the main game. If you find its space and attempt to move it you can sometimes make it render. Video.

Unfortunately I do not know what is causing these issues to arise in Hyper but not other WMs.

@vaxerski
Copy link
Member

vaxerski commented Apr 24, 2022

videos are broken for me (cant play them), but nevertheless all of this seems to arise from some miscommunication issue between hypr and Xorg (damn it, xorg!), where windows do not get their initial size and pos (state) correctly applied.

I can reproduce the partially visible bug on fullscreen with vlc, although moving the mouse over the invisible area fixes it. It's been annoying me for ages, but I have no idea either on what causes it.

I might try to see if I'm missing something - If you say it works on other WMs, I'll try spectr and bsp

Fullscreen mode results in other workspaces being non-interactive and maintaining the League cursor.

I have suspicions this is partially due to Xorg being Xorg - does this happen on, say, dwm?

@ghost
Copy link

ghost commented Apr 24, 2022

videos are broken for me (cant play them).

Seem to be broken for me too. Opening their links with mpv e.g. mpv https://user-images.githubusercontent.com/102994494/164995159-77de14ea-489a-49ac-8e73-9af7d997c1af.mp4seem to work.

I can reproduce the partially visible bug on fullscreen with vlc, although moving the mouse over the invisible area fixes it. It's been annoying me for ages, but I have no idea either on what causes it.

Does not work with League as moving the cursor to the edge of the screen moves the camera (I do move the cursor there in the video).

I have suspicions this is partially due to Xorg being Xorg - does this happen on, say, dwm?

Yes this is entirely possible. Since borderless is the go-to setting when it works I have not tried fullscreen in other WMs. I will fire up bsp and check.

@ghost
Copy link

ghost commented Apr 24, 2022

I have suspicions this is partially due to Xorg being Xorg - does this happen on, say, dwm?

You are correct. This one occurs on bspwm and leftwm as well. The others do not.

@vaxerski
Copy link
Member

ok. will look into.

@vaxerski
Copy link
Member

vaxerski commented Apr 28, 2022

partially visible fullscreen fixed in 8bad02d

@ghost
Copy link

ghost commented May 1, 2022

partially visible fullscreen fixed in 8bad02d

Can confirm. League no longer cuts off parts of the screen. Thanks!

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

1 participant