On Thu, May 29, 2008 at 10:21 AM, Dmitry Timoshkov <[EMAIL PROTECTED]> wrote: > "James Hawkins" <[EMAIL PROTECTED]> wrote: > >>> NULL foreground window is already allowed, you just need to fix the >>> callers >>> of check_wnd_state() to pass 0 for foreground. >>> >> >> It's not consistent across platforms. > > Passing 0 for foreground will make the same thing as your patch - prevent > failures when there is no consistent foreground window, i.e. when the test > is useless. >
Passing 0 for the foreground window essentially disables the test, whereas allowing a NULL window is testing another variation of what can happen with the foreground window, just like if a last error is, e.g., ERROR_FILE_NOT_FOUND on one platform instead of ERROR_PATH_NOT_FOUND. Your method disables the test completely. -- James Hawkins