Manipulating the font size results in the script_cache going stale. From MSDN[1]
`The application should never pass the same handle for different fonts or different sizes.`
This is however exactly what happens when the font size changes as a result of zooming(both in and out). ScriptShape and relative functions will only inspect the hardware device context only if the required data is not cached[2] and hence the data from a previous call to these functions is retrieved even though the font size has changed hence the bug where text both doesn't wrap and doesn't paint as it should.
In patch one, I have tried to keep track of the script_cache objects alongside the relevant font.
Patch two fixes an issue where the cursor doesn't scale after zooming until after one interacts with the editor.
Signed-off-by: David Kahurani <k.kahurani(a)gmail.com>
1. https://docs.microsoft.com/en-us/windows/win32/intl/caching
2. https://docs.microsoft.com/en-us/windows/win32/intl/script-cache
--
v2: riched20: update caret on zooming
riched20: Cache script_cache alongside font cache
https://gitlab.winehq.org/wine/wine/-/merge_requests/626
Fix Battle Realms: Zen Edition failing to start. The game expects to find a device without
D3DDEVCAPS_HWTRANSFORMANDLIGHT.
--
v2: ddraw: Don't report unsupported device capabilities in d3d3_EnumDevices().
ddraw: Don't report unsupported device capabilities in d3d7_EnumDevices().
ddraw/tests: Add more capability tests for enumerated devices.
ddraw/tests: Move the capability tests for enumerated devices.
ddraw/tests: Add a comment to note that tests in d3d.c are deprecated.
https://gitlab.winehq.org/wine/wine/-/merge_requests/670
On Tue Aug 23 01:19:06 2022 +0000, Davide Beatrici wrote:
> The example at https://docs.microsoft.com/en-us/windows/win32/learnwin32/example--the-open…:
> ```
> x86_64-w64-mingw32-g++ open_dialog_box.cpp -municode -lole32 -luuid -o open_dialog_box
> ```
> 
> 
> I confirm pressing Enter when the address bar is focused does not change
> the location.
Thanks @davidebeatrici, I'll try to fix that, for my next commit.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/672#note_6705
On Tue Aug 23 00:10:52 2022 +0000, Davide Beatrici wrote:
> 
Would you like me to perform specific tests?
The screenshots I sent are of `explorer`.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/672#note_6702
Made changes to comdlg32/itemdlg.c to add missing controls, which are the address bar and the up button.
Updated bitmaps in comctl32 and SVG files for history icons.
My changes help to resolve this bug: https://bugs.winehq.org/show_bug.cgi?id=50338.
--
v8: comdlg32: Add missing controls to the common item dialog, only affecting the implementation
https://gitlab.winehq.org/wine/wine/-/merge_requests/672
--
v2: user32: Pass resource ID as a string in DIALOG_CreateControls32.
user32: Support passing bitmap and icon resource ID as a string when creating static conctrol.
user32: Support resource ID strings in CREATESTRUCT Unicode conversion.
https://gitlab.winehq.org/wine/wine/-/merge_requests/693
The objective of this patch series is to converge to the correct argument count checks and offset parameter dimensions when parsing the Load, Sample, SampleLevel, Gather (and variants) methods, for the different texture types.
I made the following table to summarize the expected arguments and their dimensions:

Getting these required some extensive trial-and-error, because:
- Official documentation about the methods is spread in different pages and in a somewhat inconsistent manner.
- Automatic vector truncation, scalar broadcasting, and type conversion, make shaders that pass inexact types compile.
- clamp and status arguments (for tiled resources) are not present in fxc 9, and yet, they are part of ps_5_0 and vs_5_0.
- Some methods (Load() in particular) require the mipmap level as part of the location parameter (except for Multi-Sampled textures), while other don't.
For implementing new methods I recommend passing an invalid parameter count to them in fxc 10, so that it lists available overloads.
And to do this for each texture type.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/9
foobar2000.exe's UPnP Media Renderer component (foo_out_upnp.dll)
expects that, if a select() call completes successfully with a non-empty
writefds set, any immediately following send() call on a socket in the
writefds set never fails with WSAEWOULDBLOCK.
On Wine, the Winsock select() and send() implementations both call the
Unix poll(2) under the hood to test if I/O is possible on the socket.
As it turns out, it's entirely possible that Unix poll() may yield
POLLOUT on the first call (for select) but *not* the second (for send),
even if no send() call has been made in the meanwhile.
On Linux (as of v5.19), a connected (ESTABLISHED) TCP socket that has
not been shut down indicates the (E)POLLOUT condition only if the ratio
of sk_wmem_queued (the amount of bytes queued in the send buffer) to
sk_sndbuf (the size of send buffer size itself, which can be retrieved
via SO_SNDBUF) is below a certain threshold. Therefore, a falling edge
in POLLOUT can be triggered due to a number of reasons:
1. TCP retransmission and control packets (e.g. MTU probing). Such
packets share the same buffer with application-initiated packets,
and thus counted in sk_wmem_queued_add just like application data.
See also: sk_wmem_queued_add() callers (Linux 5.19).
2. Memory pressure. This causes sk_sndbuf to shrink.
See also: sk_stream_moderate_sndbuf() callers (Linux 5.19).
Fix this by always attempting synchronous I/O first if the nonblocking
flag is set.
Note: for diagnosis, `getsockopt(fd, SOL_SOCKET, SO_MEMINFO, ...)` can be
used to retrieve both sk_wmem_queued (the amount of bytes queued in the
send buffer) and sk_sndbuf (the size of the send buffer itself, which
can also be retrieved via SO_SNDBUF).
--
v4: server: Always prefer synchronous I/O in nonblocking mode.
https://gitlab.winehq.org/wine/wine/-/merge_requests/617
On Mon Aug 22 05:42:07 2022 +0000, Davide Beatrici wrote:
> I replaced `button[2].iBitmap = HIST_UP` with `button[2].iBitmap =
> HIST_VIEWTREE + 1`, this is the result:
> 
Is that running on your machine? I'm testing in a Docker container.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/672#note_6657
Split from https://gitlab.winehq.org/wine/wine/-/merge_requests/576, for which I'll then add modes sorting, and move support for stretched / interlaced modes from winemac to win32u.
--
v3: win32u: Only read/write valid mode fields from/to the registry.
win32u: Use current mode position if desired mode doesn't specify it.
win32u: Always copy devmode in validate_display_settings.
win32u: Read registry or current mode when validation needs it.
win32u: Do not keep display modes driver extra in the registry.
https://gitlab.winehq.org/wine/wine/-/merge_requests/665
On Sun Aug 21 23:11:44 2022 +0000, Ben Cottrell wrote:
> After making the changes, the icons for explorer and the common item
> dialog are missing, possibly due to out of bounds memory reads, but I
> don't know the cause, especially as adding trace+comctl32 to the
> WINEDEBUG environment variable doesn't produce useful messages.
> 
> 
I replaced `button[2].iBitmap = HIST_UP` with `button[2].iBitmap = HIST_VIEWTREE + 1`, this is the result:

--
https://gitlab.winehq.org/wine/wine/-/merge_requests/672#note_6644
On Sun Aug 21 21:20:05 2022 +0000, Ben Cottrell wrote:
> OK, I'll remove the define and change the position of the image, so that
> it's HIST_VIEWTREE + 1 in my next commit. I'm sorry for making a basic error.
After making the changes, the icons for explorer and the common item dialog are missing, possibly due to out of bounds memory reads, but I don't know the cause, especially as adding trace+comctl32 to the WINEDEBUG environment variable doesn't produce useful messages.


--
https://gitlab.winehq.org/wine/wine/-/merge_requests/672#note_6639
On Sun Aug 21 19:31:58 2022 +0000, Alexandre Julliard wrote:
> These are Windows API defines, you can't change them.
OK, I'll remove the define and change the position of the image, so that it's HIST_VIEWTREE + 1 in my next commit. I'm sorry for making a basic error.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/672#note_6637
Split from https://gitlab.winehq.org/wine/wine/-/merge_requests/576, for which I'll then add modes sorting, and move support for stretched / interlaced modes from winemac to win32u.
--
v2: win32u: Only read/write valid mode fields from/to the registry.
win32u: Use current mode position if desired mode doesn't specify it.
win32u: Always copy devmode in validate_display_settings.
win32u: Read registry or current mode when validation needs it.
win32u: Do not keep display modes driver extra in the registry.
https://gitlab.winehq.org/wine/wine/-/merge_requests/665
Bug introduced in !600.
```
00dc:trace:alsa:AudioClient_GetService (00A53680)->({cd63314f-3fba-4a1b-812c-ef96358728e7}, 0022FCB0)
00dc:trace:alsa:AudioClient_AddRef (00A53680) Refcount now 2
00dc:trace:alsa:AudioClock_GetFrequency (00A53680)->(0022FCC8)
render.c:1056: Clock Frequency 384000
00dc:trace:alsa:AudioClock_GetPosition (00A53680)->(00000000, 00000000)
00dc:trace:alsa:AudioClock_GetPosition (00A53680)->(0022FCD0, 0022FCD8)
00dc:trace:alsa:alsa_get_position frames written: 0, held: 0, state: 0x2, position: 0
render.c:1071: Test failed: GetPosition failed: 00423930
render.c:1072: Test failed: GetPosition returned non-zero pos before being started
render.c:1073: Test failed: GetPosition returned zero pcpos
00dc:trace:alsa:AudioClient_GetService (00A53680)->({f294acfc-3146-4483-a7bf-addca7c260e2}, 0022FCB4)
00dc:trace:alsa:AudioClient_AddRef (00A53680) Refcount now 3
00dc:trace:alsa:AudioRenderClient_GetBuffer (00A53680)->(24001, 0022FCC0)
```
And the test hangs.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/687
foobar2000.exe's UPnP Media Renderer component (foo_out_upnp.dll)
expects that, if a select() call completes successfully with a non-empty
writefds set, any immediately following send() call on a socket in the
writefds set never fails with WSAEWOULDBLOCK.
On Wine, the Winsock select() and send() implementations both call the
Unix poll(2) under the hood to test if I/O is possible on the socket.
As it turns out, it's entirely possible that Unix poll() may yield
POLLOUT on the first call (for select) but *not* the second (for send),
even if no send() call has been made in the meanwhile.
On Linux (as of v5.19), a connected (ESTABLISHED) TCP socket that has
not been shut down indicates the (E)POLLOUT condition only if the ratio
of sk_wmem_queued (the amount of bytes queued in the send buffer) to
sk_sndbuf (the size of send buffer size itself, which can be retrieved
via SO_SNDBUF) is below a certain threshold. Therefore, a falling edge
in POLLOUT can be triggered due to a number of reasons:
1. TCP retransmission and control packets (e.g. MTU probing). Such
packets share the same buffer with application-initiated packets,
and thus counted in sk_wmem_queued_add just like application data.
See also: sk_wmem_queued_add() callers (Linux 5.19).
2. Memory pressure. This causes sk_sndbuf to shrink.
See also: sk_stream_moderate_sndbuf() callers (Linux 5.19).
Fix this by always attempting synchronous I/O first if the nonblocking
flag is set.
Note: for diagnosis, `getsockopt(fd, SOL_SOCKET, SO_MEMINFO, ...)` can be
used to retrieve both sk_wmem_queued (the amount of bytes queued in the
send buffer) and sk_sndbuf (the size of the send buffer itself, which
can also be retrieved via SO_SNDBUF).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/617
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
--
v2: evr/tests: Add a test to show that IMFVideoDisplayControl is accessible.
evr: Implement lazy initialization with mixer and presenter instances.
evr: Add IMFVideoRenderer stub to the filter.
evr: Add IMFGetService stub.
https://gitlab.winehq.org/wine/wine/-/merge_requests/681
> Yeah, ID2D1DrawTransform can be implemented for \*Impl object, that's true. But we still need transfrom graph. Implementing ID2D1DrawTransform for \*Impl doesn't means that it will be used automatically without doing anything else. We still need to regard it as a transform node, and add it to transfrom graph. And latter, runtime will call SetDrawInfo for it because it is in transform graph.
Yes, you're right, I missed that it's in a chain of draw transform -> transform -> transformnode. MSDN is broken there, it says interface> Nikolay, do you think I can submit first 3 patches in another MR to make you have a full reviewing in order to upstream them? inherits from IUnknown. That's why I thought it's something special.
I think there are options still, effect can use SetSingleTransformNode to add it explicitly, but I believe I saw examples somewhere that don't do it, so maybe it's handled by d2d itself. I could be wrong of course.
> Nikolay, do you think I can submit first 3 patches in another MR to make you have a full reviewing in order to upstream them?
Please do. We should start with single node graph first to get something render first, and have inputs/outputs behaving correctly. I think doing multiple nodes processing in naive way, by drawing each intermediate step, is likely to be a performance problem.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/635#note_6556
When first parsed to names in english and other non-native languages,
after parsing to names in native languages, this will result in second_name
not corresponding to names in english.
Signed-off-by: Jiajin Cui <cuijiajin(a)uniontech.com>
--
v7: win32u: Don't allow a replaced font to be a replacement.
win32u: Ensure that either the primary or secondary name is in English.
https://gitlab.winehq.org/wine/wine/-/merge_requests/628
On Fri Aug 19 08:54:40 2022 +0000, Hans Leidekker wrote:
> In the patch title please replace one occurrence of
> kerberos_SpAcceptLsaModeContext with kerberos_SpInitLsaModeContext.
> Otherwise the patch looks good.
Pushed. Sorry, I did not notice a repetition in title.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/677#note_6535
On Fri Aug 19 08:46:28 2022 +0000, Konstantin wrote:
> Pushed
In the patch title please replace one occurrence of kerberos_SpAcceptLsaModeContext with kerberos_SpInitLsaModeContext. Otherwise the patch looks good.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/677#note_6533
On Fri Aug 19 08:32:04 2022 +0000, Konstantin wrote:
> Do you mean this?
> ```
> if ( status == SEC_E_OK || status == SEC_I_CONTINUE_NEEDED )
> *new_context = create_context_handle( context_handle,
> new_context_handle );
> if (!status)
> {
> *mapped_context = TRUE;
> ```
Yes.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/677#note_6529
On Fri Aug 19 08:20:50 2022 +0000, Hans Leidekker wrote:
> The change should be minimal, so only change the condition for the
> new_context update. Please put spaces around operators like in the rest
> of the file.
> Please also fix the patch title while you're at it :)
Do you mean this?
```
if ( status == SEC_E_OK || status == SEC_I_CONTINUE_NEEDED )
*new_context = create_context_handle( context_handle, new_context_handle );
if (!status)
{
*mapped_context = TRUE;
```
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/677#note_6528
On Fri Aug 19 07:54:25 2022 +0000, Konstantin wrote:
> Tested the changes, kerberos auth in our client application work fine.
The change should be minimal, so only change the condition for the new_context update. Please put spaces around operators like in the rest of the file.
Please also fix the patch title while you're at it :)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/677#note_6527
On Fri Aug 19 07:19:10 2022 +0000, Konstantin wrote:
> @hans, thank you for comment. If I understand correct you are author of
> original logic.
> I am not sure about changes, your suggestion change existing logic.
> Originaly `*mapped_context` and `expiry_to_timestamp( exptime, expiry
> );` executed only when status is SEC_E_OK, and `new_context`
> modification (independant) internaly in `create_context_handle`.
> I try change condition to ` if
> (status==SEC_E_OK||status==SEC_I_CONTINUE_NEEDED) ` and test it in our network.
Tested the changes, kerberos auth in our client application work fine.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/677#note_6526
On Thu Aug 18 07:09:33 2022 +0000, Zhiyi Zhang wrote:
> Do not remove the id property. There should be a id="bitmap:width-depth"
> property for the wine's build system to generate the bitmaps from SVGs.
> Also, the commit subject is way too long.
> And, for the WineHQ bugzilla link. We use the Wine-Bug: tag.
OK, id properties have been kept, and have shortened the commit message.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/672#note_6523
On Fri Aug 19 06:54:19 2022 +0000, Konstantin wrote:
> @hans, thank you for comment. If I understand correct you are author of
> original logic.
> I am not sure. You sugesstion change existing logic. Originaly
> `*mapped_context` and `expiry_to_timestamp( exptime, expiry );` executed
> only when status is SEC_E_OK, and `new_context` modification
> (independant) internaly in `create_context_handle`.
> I can't check side effect of the proposed change.
> If you sure that it correct I change condition to ` if
> (status==SEC_E_OK||status==SEC_I_CONTINUE_NEEDED) `
What about SEC_I_COMPLETE_NEEDED and SEC_I_COMPLETE_AND_CONTINUE we need also put it to condition?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/677#note_6521
On Thu Aug 18 14:47:05 2022 +0000, Hans Leidekker wrote:
> As I mentioned in the bug report, the new context is updated when
> initialize_context() returns SEC_E_OK or SEC_I_CONTINUE_NEEDED. That
> should be reflected here.
@hans, thank you for comment. If I understand correct you are author of original logic.
I am not sure. You sugesstion change existing logic. Originaly `*mapped_context` and `expiry_to_timestamp( exptime, expiry );` executed only when status is SEC_E_OK, and `new_context` modification (independant) internaly in `create_context_handle`.
I can't check side effect of the proposed change.
If you sure that it correct I change condition to ` if (status==SEC_E_OK||status==SEC_I_CONTINUE_NEEDED) `
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/677#note_6520
Made changes to comdlg32/itemdlg.c to add missing controls, which are the address bar and the up button.
Updated bitmaps in comctl32 and SVG files for history icons.
My changes help to resolve this bug: https://bugs.winehq.org/show_bug.cgi?id=50338.
--
v5: comdlg32: Add missing controls and their functionality to IFileDialog, or the common item dialog.
https://gitlab.winehq.org/wine/wine/-/merge_requests/672
When first parsed to names in english and other non-native languages,
after parsing to names in native languages, this will result in second_name
not corresponding to names in english.
Signed-off-by: Jiajin Cui <cuijiajin(a)uniontech.com>
--
v6: win32u: Make the replacement font not the replaced font.
https://gitlab.winehq.org/wine/wine/-/merge_requests/628
Made changes to comdlg32/itemdlg.c to add missing controls, which are the address bar and the up button.
Updated bitmaps in comctl32 and SVG files for history icons.
My changes help to resolve this bug: https://bugs.winehq.org/show_bug.cgi?id=50338.
--
v4: comdlg32: Add missing controls and their functionality to IFileDialog, or the common item dialog.
https://gitlab.winehq.org/wine/wine/-/merge_requests/672
When first parsed to names in english and other non-native languages,
after parsing to names in native languages, this will result in second_name
not corresponding to names in english.
Signed-off-by: Jiajin Cui <cuijiajin(a)uniontech.com>
--
v3: win32u: Fix that the replaced font replaces other fonts.
win32u: Fix the second_name parsed wrong.
https://gitlab.winehq.org/wine/wine/-/merge_requests/628
On Wed Aug 17 06:20:22 2022 +0000, Yeshun Ye wrote:
> I built the demo by vs2003/vs2005/vs2008, and it printed 'read: ok' for
> vs2003 building, but printed 'open file failed!' for vs2005/vs2008
> buildings.
> I think "\_MSVCP_VER >= 71" can change to "\_MSVCP_VER >= 80" at least.
> And I think it's a bug on vs2005/vs2008, do we have to be exactly the
> same as windows? Why do we keep this bug?
I've created MR !673 to fix msvcp71. I've made a mistake while testing it earlier.
The idea is to implement the function as closely to native as possible. Applications may depend on bugs in libraries (and taking into account _Fiopen is an internal function it's not necessarily a bug).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/606#note_6472
Made changes to comdlg32/itemdlg.c to add missing controls, which are the address bar and the up button.
Updated bitmaps in comctl32 and SVG files for history icons.
My changes help to resolve this bug: https://bugs.winehq.org/show_bug.cgi?id=50338.
--
v3: comdlg32: Add missing controls and their functionality to IFileDialog, or the common item dialog.
https://gitlab.winehq.org/wine/wine/-/merge_requests/672
Zhiyi Zhang (@zhiyi) commented about dlls/comctl32/idb_hist_large.svg:
> -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
> +<?xml version="1.0" encoding="UTF-8"?>
> <!-- Created with Inkscape (http://www.inkscape.org/) -->
> -<svg id="bitmap:120-32" xmlns="http://www.w3.org/2000/svg" height="24" width="120" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink">
Do not remove the id property. There should be a id="bitmap:width-depth" property for the wine's build system to generate the bitmaps from SVGs.
Also, the commit subject is way too long.
And, for the WineHQ bugzilla link. We use the Wine-Bug: tag.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/672#note_6461
Copy propagation is translated to index paths, invalidation of variable components is made more precise.
This, together with checking for non-static object references (which are not allowed in HLSL) allows to set object register sizes back to zero without overlapping registers.
I also included implicit array initialization, since, if I remember correctly, what was holding it back was that structs/arrays with object components couldn't be represented with the correct register offsets.
After this, we have to decide if (and how to) move register allocation and register offset calculation to each shader model.
--
v2: vkd3d-shader/hlsl: Support initialization of implicit size arrays.
vkd3d-shader/hlsl: Set objects' register size back to 0.
vkd3d-shader/hlsl: Check for non-static object references.
vkd3d-shader/hlsl: Invalidate components more precisely in copy
vkd3d-shader/hlsl: Replace register offsets with index paths in copy
vkd3d-shader/hlsl: Print halfs in dump_ir_constant().
vkd3d-shader/hlsl: Skip implicit conversion if types are equal.
vkd3d-shader/hlsl: Set component count for objects to 1.
tests: Test object references.
vkd3d-shader/hlsl: Emit a fixme on complex resource load object derefs.
vkd3d-shader/hlsl: Rename 'inner_type' to 'element_type' in function
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/7
Copy propagation is translated to index paths, invalidation of variable components is made more precise.
This, together with checking for non-static object references (which are not allowed in HLSL) allows to set object register sizes back to zero without overlapping registers.
I also included implicit array initialization, since, if I remember correctly, what was holding it back was that structs/arrays with object components couldn't be represented with the correct register offsets.
After this, we have to decide if (and how to) move register allocation and register offset calculation to each shader model.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/7