How to fix some wine application issues when hotplugging monitors?
I encountered the same issues with Awesome WM so I'm pretty sure now it's something to do with how Wine works things. Perhaps you can give me some initial pointers.
Issues below are not limited to just my sample application, KeePass 2. Picasa also behaves similarly so I'm pretty sure this is a wine-wide issue.
How to reproduce
- Start with single monitor
- Install Windows version of KeePass 2 in wine
- Run KeePass, minimize into system tray (all is fine for now)
- plug in another monitor, do something like > xrandr --output LVDS1 --auto --output HDMI1 --auto --above LVDS1 --primary
Observe "Wine System Tray" becoming an unpainted ghost window into window manager control and the KeePass system tray icon disappearing with no way to return it.
Observe there is no way to maximize the Wine app window on the bigger monitor.
Observe various broken drawing behavior when you send the workspace from one output to another.
Any clues about how to attack this?
First of all, make sure you have for_window [class="Wine"] floating enable. This improves many window painting issues. It doesn't solve them, but improves.