Christopher Thielen cthielen@gmail.com wrote:
+// Not const in order to set lParam during test
Using c++ comment in Wine code is forbidden. Also it should not be needed to test lparam, everything is clear enough, and I'd suggest to make the structure 'const'. Looks good to me otherwise.
Ah, I'll fix the comment style.
The behavior being tested is for a WM_CAPTURECHANGED message which has its lParam set to the first parameter from the SetCapture() calls (the main hWnd in this case).
In order to get the sequence to pass, I need to set lParam as the hWnd's value is unpredictable.
Can you recommend another way to go about this?
Thanks for your help.
On 11/23/2015 08:35 AM, Dmitry Timoshkov wrote:
Christopher Thielen cthielen@gmail.com wrote:
+// Not const in order to set lParam during test
Using c++ comment in Wine code is forbidden. Also it should not be needed to test lparam, everything is clear enough, and I'd suggest to make the structure 'const'. Looks good to me otherwise.
Christopher Thielen cthielen@gmail.com wrote:
The behavior being tested is for a WM_CAPTURECHANGED message which has its lParam set to the first parameter from the SetCapture() calls (the main hWnd in this case).
In order to get the sequence to pass, I need to set lParam as the hWnd's value is unpredictable.
Can you recommend another way to go about this?
Just don't specify '|lparam'.
Hm. If I don't specify '|lparam', won't it avoid checking the lParam entirely?
It's not that I'm working around the lParam check, it's that I specifically _want_ the lParam check to ensure its value equals hWnd. That's the behavior for which I'm hoping to prevent a regression. Without the patch, Wine sets the lParam to the wrong value.
So, should I keep it how it is then minus the comment syntax? Or perhaps move the sequence into being simple variable within the function as setting a value in a potentially shared struct is a bit awkward?
On 11/23/2015 03:10 PM, Dmitry Timoshkov wrote:
Christopher Thielen cthielen@gmail.com wrote:
The behavior being tested is for a WM_CAPTURECHANGED message which has its lParam set to the first parameter from the SetCapture() calls (the main hWnd in this case).
In order to get the sequence to pass, I need to set lParam as the hWnd's value is unpredictable.
Can you recommend another way to go about this?
Just don't specify '|lparam'.
Christopher Thielen cthielen@gmail.com wrote:
Hm. If I don't specify '|lparam', won't it avoid checking the lParam entirely?
It's not that I'm working around the lParam check, it's that I specifically _want_ the lParam check to ensure its value equals hWnd. That's the behavior for which I'm hoping to prevent a regression. Without the patch, Wine sets the lParam to the wrong value.
So, should I keep it how it is then minus the comment syntax? Or perhaps move the sequence into being simple variable within the function as setting a value in a potentially shared struct is a bit awkward?
Isn't the original problem that you are trying to solve about Wine not sending WM_CAPTURECHANGED message at all?