On Saturday 25 June 2005 00:28, Paul Vriens wrote:
> IMHO the bug is caused by a patch of Vitaly
Lipatov [1],
> which by itself showed up a bug, caused by a combined patch
> from you, Paul, and Justin Chevrier [2].
...
| @@ -1023,7 +1023,7 @@ static void
| test_SPI_SETMOUSEBUTTONSWAP(
|
| rc=SystemParametersInfoA( SPI_SETMOUSEBUTTONSWAP,
| old_b, 0, SPIF_UPDATEINIFILE ); -
| ok(rc!=0,"***warning*** failed to restore the original
| value: rc=%d err=%ld\n",rc,GetLastError()); +
| ok(!rc,"***warning*** failed to restore the original
| value: rc=%d err=%ld\n",rc,GetLastError());
Such checks doesn't work on winME. I have reverted them and
tests is doing fine. Further, following [2]:
I agree these changes don't make sense. Although Vitaly says
in his patch:
/* MSDN says it returns previous state of swapbutton always */
it doesn't seem to be the case for at least win98/winME/NT/W2K
and XP (which is almost all versions !)
Some strange thing. I am surprised.
Reverting the above fixes, it for me as well.
Please fix the test to be WinXX conformed.
> | @@ -955,9 +1007,12 @@ static void
> | test_SPI_SETMOUSEBUTTONSWAP(
> |
> | for (i=0;i<sizeof(vals)/sizeof(*vals);i++)
> | {
> | + SetLastError(0xdeadbeef);
> | rc=SystemParametersInfoA( SPI_SETMOUSEBUTTONSWAP,
> | vals[i], 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); -
> | ok(rc!=0,"%d: rc=%d err=%ld\n",i,rc,GetLastError()); +
> | if
> | (!test_error_msg(rc,"SPI_{GET,SET}MOUSEBUTTONSWAP")) +
> | return;
>
> This wrong, IMHO, as the "return" statement eliminates a
> possibility to restore SM_SWAPBUTTON metrics after the
> for-loop ends. I would use "break" or "continue" here.
Break will be fine here.
I agree that this can be done nicer, but I'd like
to have some
comments from Vitaly about his patch before changing anything
1. I believed (and
tested) its returns previous state. But
"errare humanum est".
2. The present behavior is needed for MS Office 97 runs correctly
in WINE.
3. I see there is some problems with test
4. I do not think MSDN lies about _this_ message
Sorry, I will come back in 10 days only. Feel free make any
changes. I will tested it anyway.
Sorry for inconvenience.
--
Lav
Vitaly Lipatov
Saint-Petersburg
GNU! ALT Linux Team! WINE! LaTeX! LyX!