[PATCH] user32: Update exstyle when setting style in SetWindowLong.
Piotr Caban
piotr.caban at gmail.com
Tue Oct 5 07:33:48 CDT 2021
Hi Alexandre,
On 10/4/21 8:06 PM, Alexandre Julliard wrote:
> Piotr Caban <piotr at codeweavers.com> writes:
>
>> Rockstar Games Launcher checks extended window style and exits if it
>> is incorrect.
>>
>> Signed-off-by: Piotr Caban <piotr at codeweavers.com>
>> ---
>> dlls/user32/tests/win.c | 18 +++++++++++++++++-
>> dlls/user32/win.c | 15 ++++++++++++---
>> 2 files changed, 29 insertions(+), 4 deletions(-)
>
> Do we need to store that flag at all? Could it be synthesized from the
> other ones instead?
>
No, it can't be synthesized while preserving (what I believe is) a bug
in native. The same pair of style/exstyle produces different
WS_EX_WINDOWEDGE depending on the context.
We currently have different conditions for setting WS_EX_WINDOWEDGE in
SetWindowLong and in CreateWindow. We also have tests covering the
difference. I've played a little more with this tests and current code
is not fully correct (e.g. styles passed to CBT_CREATEWND are different
than on Windows 10, changing style in hook also sometimes produces
different results).
I think the code may be more readable if we introduce a helper for
setting exstyle. I will prepare a patch that does it. Hopefully it will
also make the CreateWindow special case more visible.
Thanks,
Piotr
More information about the wine-devel
mailing list