https://bugs.winehq.org/show_bug.cgi?id=43030
--- Comment #16 from Zachary Murray dremelofdeath@gmail.com --- I dug into this bug and figured out a hack to make it render correctly. I'm pretty sure I can turn this into a real patch once I understand the implications of Wine's managed window mode but further investigation is required.
The problem lies in how Wine's X11 driver handles override redirection. LINE creates a separate window exclusively for the border whose X window is of type Dialog and has override redirection enabled. The main window with the actual contents (such as login, QR code, etc.) is in a separate window whose type is Window and has override redirection disabled. Both X windows are root windows with no children. X override redirection causes the border-only window to be drawn over all other windows here.
By forcing the override redirection to always be disabled (attr->override_redirect = False) in the X11 driver -- in get_window_attributes() -- LINE starts rendering correctly and hiding properly when minimized.
That said, I'm not convinced that the problem lies in the X11 driver itself. Typically Wine enables override redirection on an X window that is not a managed window (data->managed is false). It is possible that Wine is improperly setting the border's X window to be unmanaged when it should not be.
I believe changing the window mode from managed to desktop will make LINE work correctly as well, but I haven't tested it yet.
I looked into the history of this code and found that prior to commit dc4fe7735bf60c2bb6981b7c6c7012d276691126, Wine disabled override redirection for all topmost children. That change introduced the managed window check for enabling override redirection. I am planning to investigate if reintroducing similar behavior also fixes the issue.
I noticed one other curious thing about this bug while testing, which is that if you allow the login QR code to expire (which generates a popup dialog saying the QR code is no longer valid) and then minimize LINE, the parent border window is NOT minimized and continues drawing over other windows, even though its contents are transparent. I suspect this is a separate bug and that Wine's handling of LINE's strange drawing behavior is not minimizing all its X windows correctly. However, fixing this bug (improper override redirection) will probably hide that issue.