http://bugs.winehq.org/show_bug.cgi?id=26747
Summary: SIV Window Resize and AdjustWindowRect() off-by-one issue Product: Wine Version: 1.3.17 Platform: x86 URL: http://rh-software.com/ OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: user32 AssignedTo: wine-bugs@winehq.org ReportedBy: ray@pobox.co.uk
While trying to work-a-round the lack of WM_EXITSIZEMOVE (http://bugs.winehq.org/show_bug.cgi?id=26736) I found what seems to be an off-by-one error within AdjustWindowRect(). Testing on real Windows then the code worked fine, but to get it to work on Wine 1.3.17-243 I needed to adjust things as in the code below. The svb->style is 0x00C40000 ( WS_CAPTION | WS_THICKFRAME ). The issue is the same for both window managers.
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; // }