https://bugs.winehq.org/show_bug.cgi?id=29582
--- Comment #17 from Daniel Santos daniel.santos@pobox.com --- (In reply to Daniel Santos from comment #16)
Created attachment 52285 [details] GetForegroundWindow hack plus hybrid (wineserver/native) semaphores
One thing to be aware of is that this patch suffers from a bug caused by glibc's NPTL implementation of of semaphores not being ABI friendly, so this will only work if you build the 32-bit only version of wine (if you have a normal wow 64/32 build, it will fail).
Anyway, it looks like the hack portion of this will not be necessary any longer as a proper fix is now in wine-staging: https://www.winehq.org/pipermail/wine-bugs/2015-March/410444.html
The best way to apply this is to clone the wine-staging repository and apply the patches using this command:
.../path/to/patches/patchinstall.sh --backend=git server-Shared_Memory