Thanks Ken, I'll make those changes.<br><br>On Sunday, January 31, 2016, Ken Thomases <<a href="mailto:ken@codeweavers.com">ken@codeweavers.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Jan 31, 2016, at 7:18 PM, Christopher Thielen <<a href="javascript:;" onclick="_e(event, 'cvml', 'cthielen@gmail.com')">cthielen@gmail.com</a>> wrote:<br>
><br>
> A window may be notified with WM_CAPTURECHANGED about itself<br>
> gaining mouse capture if it calls SetCapture() twice.<br>
><br>
> Tested on Windows XP and Fedora Workstation 22.<br>
><br>
> Revised to simplify based on wine-devel feedback.<br>
> Revised to address any side-effects of new WM_CAPTURECHANGED<br>
> messages.<br>
<br>
The changes to comctl32 should be in a separate patch. In general, changes to different DLLs should be in separate patches unless it can't be avoided. The comctl32 patch should come before the change to when WM_CAPTURECHANGED is sent so that things aren't broken part-way through the patch series. You might also put the button.c changes in a separate patch, too.<br>
<br>
> case WM_CAPTURECHANGED:<br>
> - return TOOLBAR_CaptureChanged(infoPtr);<br>
> + if(hwnd != lParam)<br>
> + {<br>
> + return TOOLBAR_CaptureChanged(infoPtr);<br>
> + }<br>
> + else<br>
> + {<br>
> + return 0;<br>
> + }<br>
<br>
The second return can be hoisted out of the else since the true branch can't fall through. Also, you can reverse the logic, so the code can look like:<br>
<br>
case WM_CAPTURECHANGED:<br>
if(hwnd == lParam)<br>
return 0;<br>
return TOOLBAR_CaptureChanged(infoPtr);<br>
<br>
I think that's clearer and also a smaller diff. Same for the other files.<br>
<br>
Cheers,<br>
Ken<br>
<br>
</blockquote>