http://bugs.winehq.org/show_bug.cgi?id=26736
--- Comment #4 from ray@pobox.co.uk 2011-04-12 10:23:12 CDT --- (In reply to comment #3)
You should handle WM_WINDOWPOSCHANGED. We can't send enter/exit notifications when the change is done by the window manager.
Thank you. I will look into changing this. It looks like he same also the case for WM_SIZING? Looking at http://bugs.winehq.org/show_bug.cgi?id=5941 this seems to have been the case for a long time. WIll it ever get fixed?
There seems to be a problem with AdjustWindowRect(). When I try and process WM_WINDOWPOSCHANGED on Wine the values returned look to be off-by-one and to make it work at all I had to change the code to be as below.
ar->top = 0; ar->left = 0; ar->bottom = 0; ar->right = 0;
if( AdjustWindowRect( ar, svb->style, FALSE ) ) { if( mode & MODE_WINE ) { dr->top -= ar->top + 1; // Client Area positions dr->left -= ar->left + 1; // dr->bottom -= ar->bottom + 1; // dr->right -= ar->right + 1; // } else { dr->top -= ar->top; // Client Area positions dr->left -= ar->left; // dr->bottom -= ar->bottom; // dr->right -= ar->right; // }