This series tries to fix WM_PASTE tests error on edit control (both user32 & comctl32).
The test failures where systematic on a local Win10 for comctl32 (yet very rare on
user32, perhaps one in 20 runs).
Since the failures are not systematic, it ought to be a synchronisation / timing
issue.
Flushing the msg queue before starting the paste test cycle seems to fix the issue.
- 0 occurence on comctl32 and user32 in 50 run (local VM)
- 0 occurence on Testbot (comctl32) in 1 run.
It's hard to be fully conclusive about bug resolution, but it's at least a step into
the right direction.
--
v3: comctl32/tests: Fix failing WM_PASTE tests for edit control on Win10+.
comctl32/tests: Retry when opening the clipboard.
user32/tests: Fix failing WM_PASTE tests for edit control on Win10+.
user32/tests: Retry when opening the clipboard.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1886
Implements navigation bar featuring:
- back/forward buttons
- go up button
- address crumbs
- hides crumbs when there's not enough space to display all of them
- always shows at least 2 crumbs
- truncating them if needed
- first crumb is at least 56px
- aligns label to the left if truncated
- right clicking on the crumb, or free space, opens a menu with `Copy address as text` and `Edit address` options
- reuses existing crumbs to avoid some flickering
- overflow menu
- ~~first crumb is always moved here~~
- removes the split, if there are no items in the menu
- hidden crumbs are moved here
- left ~~or right~~ click on the button starts address editing
- address edit
- accepts an existing path
- expands environment variables, e.g. `%APPDATA%\Microsoft` -> `C:\users\%USERNAME%\AppData\Roaming\Microsoft`
- errors with a `MessageBox` on nonexistent paths
- refresh button
- changes into go to button when editing address
- DPI scaling
Screenshots:






Remaining issues:
- crumbs not lighting up when hovered sometimes
- can be observed in current file dialog, hovering over dropdown arrow of a file type fixes it for a moment
- crumbs flickering on address change sometimes
- mostly when there's not enough space to display all of them
- `DeferWindowPos` doesn't seem to be atomic in Wine, presumably is in native Windows?
- unexpected address conversion for some PIDLs
- e.g. `Desktop` -> `C:\users\%USERNAME%\Desktop`, which is an entirely different location
- or `My Computer` into an empty string
- known folders are not handled by address edit, e.g. `Desktop`, `My Computer`
- icons are not DPI scaled
- while writing this:
```
0024:fixme:bitmap:NtGdiCreateBitmap planes = 0
0024:err:system:user_check_not_lock BUG: holding USER lock
wine/dlls/win32u/sysparams.c:396: user_check_not_lock: Assertion `0' failed.
wine: Assertion failed at address F7FF8549 (thread 0024), starting debugger...
```
- can't reproduce, happened when clicking on an item in overflow menu
- race condition? cosmic ray?
Addresses following bugs:
- https://bugs.winehq.org/show_bug.cgi?id=29912
- https://bugs.winehq.org/show_bug.cgi?id=50338
- https://bugs.winehq.org/show_bug.cgi?id=51855 (partially? no search box)
--
v10: comdlg32: Add refresh/go to button to IFileDialog navigation bar.
comdlg32: Add address edit to IFileDialog navigation bar.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1857
Call MoveFileWithProgress from MoveFileTransacted such that the stub functions.
This enables saving for Affinity Photo.
--
v3: kernel32: Unstub MoveFileTransactedW, Use MoveFileWithProgressW
https://gitlab.winehq.org/wine/wine/-/merge_requests/1444
The streaming threads and GST_Seeking_SetPositions() contend for the same flushing locks.
GST_Seeking_SetPositions() needs to acquire all the flushing locks before doing the actual
stream seeking, having the streaming threads fighting for the same locks will make
GST_Seeking_SetPositions() wait for a unusually long time.
This reduces PowerPoint 2016 video seeking time from ~5s to almost an instant and fixes a regression
for Fallout 3.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53403
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1239
stdarg.h is usually shipped with the compiler itself and that's what we currently use for non-mingw builds (including clang MSVC builds). This mostly works fine for us, but (in addition to GCC/clang), mingw-w64 also ships this header. This may be problematic in some cases, because it pulls _mingw.h, which may define things like _UCRT.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54263
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1921
Implements navigation bar featuring:
- back/forward buttons
- go up button
- address crumbs
- hides crumbs when there's not enough space to display all of them
- always shows at least 2 crumbs
- truncating them if needed
- first crumb is at least 56px
- aligns label to the left if truncated
- right clicking on the crumb, or free space, opens a menu with `Copy address as text` and `Edit address` options
- reuses existing crumbs to avoid some flickering
- overflow menu
- ~~first crumb is always moved here~~
- removes the split, if there are no items in the menu
- hidden crumbs are moved here
- left ~~or right~~ click on the button starts address editing
- address edit
- accepts an existing path
- expands environment variables, e.g. `%APPDATA%\Microsoft` -> `C:\users\%USERNAME%\AppData\Roaming\Microsoft`
- errors with a `MessageBox` on nonexistent paths
- refresh button
- changes into go to button when editing address
- DPI scaling
Screenshots:






Remaining issues:
- crumbs not lighting up when hovered sometimes
- can be observed in current file dialog, hovering over dropdown arrow of a file type fixes it for a moment
- crumbs flickering on address change sometimes
- mostly when there's not enough space to display all of them
- `DeferWindowPos` doesn't seem to be atomic in Wine, presumably is in native Windows?
- unexpected address conversion for some PIDLs
- e.g. `Desktop` -> `C:\users\%USERNAME%\Desktop`, which is an entirely different location
- or `My Computer` into an empty string
- known folders are not handled by address edit, e.g. `Desktop`, `My Computer`
- icons are not DPI scaled
- while writing this:
```
0024:fixme:bitmap:NtGdiCreateBitmap planes = 0
0024:err:system:user_check_not_lock BUG: holding USER lock
wine/dlls/win32u/sysparams.c:396: user_check_not_lock: Assertion `0' failed.
wine: Assertion failed at address F7FF8549 (thread 0024), starting debugger...
```
- can't reproduce, happened when clicking on an item in overflow menu
- race condition? cosmic ray?
Addresses following bugs:
- https://bugs.winehq.org/show_bug.cgi?id=29912
- https://bugs.winehq.org/show_bug.cgi?id=50338
- https://bugs.winehq.org/show_bug.cgi?id=51855 (partially? no search box)
--
v9: comdlg32: Add refresh/go to button to IFileDialog navigation bar.
comdlg32: Add address edit to IFileDialog navigation bar.
comdlg32: Add breadcrumb overflow menu to IFileDialog navigation bar.
comdlg32: Add address breadcrumbs to IFileDialog navigation bar.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1857
copy_propagation_transform_object_load() currently retrieves true, which
indicates that there was progress, even if the input dereference remains
the same.
This can happen repeatedly if an uninitialized object is copied onto
itself, as in the tests added in this patch. This results on the
compilation getting stuck on an endless loop.
This patch checks if the deref didn't change, to retrieve false in that
case.
--
v2: vkd3d-shader/hlsl: Avoid infinite loop in copy propagation.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/59
Mathematically, ((a && b) || b) == b. Moreover, test_sharelists in
dlls/opengl32/tests/opengl.c checks that wglShareLists can share lists
from a source context that has been current.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1914
Implements navigation bar featuring:
- back/forward buttons
- go up button
- address crumbs
- hides crumbs when there's not enough space to display all of them
- always shows at least 2 crumbs
- truncating them if needed
- first crumb is at least 56px
- aligns label to the left if truncated
- right clicking on the crumb, or free space, opens a menu with `Copy address as text` and `Edit address` options
- reuses existing crumbs to avoid some flickering
- overflow menu
- ~~first crumb is always moved here~~
- removes the split, if there are no items in the menu
- hidden crumbs are moved here
- left ~~or right~~ click on the button starts address editing
- address edit
- accepts an existing path
- expands environment variables, e.g. `%APPDATA%\Microsoft` -> `C:\users\%USERNAME%\AppData\Roaming\Microsoft`
- errors with a `MessageBox` on nonexistent paths
- refresh button
- changes into go to button when editing address
- DPI scaling
Screenshots:






Remaining issues:
- crumbs not lighting up when hovered sometimes
- can be observed in current file dialog, hovering over dropdown arrow of a file type fixes it for a moment
- crumbs flickering on address change sometimes
- mostly when there's not enough space to display all of them
- `DeferWindowPos` doesn't seem to be atomic in Wine, presumably is in native Windows?
- unexpected address conversion for some PIDLs
- e.g. `Desktop` -> `C:\users\%USERNAME%\Desktop`, which is an entirely different location
- or `My Computer` into an empty string
- known folders are not handled by address edit, e.g. `Desktop`, `My Computer`
- icons are not DPI scaled
- while writing this:
```
0024:fixme:bitmap:NtGdiCreateBitmap planes = 0
0024:err:system:user_check_not_lock BUG: holding USER lock
wine/dlls/win32u/sysparams.c:396: user_check_not_lock: Assertion `0' failed.
wine: Assertion failed at address F7FF8549 (thread 0024), starting debugger...
```
- can't reproduce, happened when clicking on an item in overflow menu
- race condition? cosmic ray?
Addresses following bugs:
- https://bugs.winehq.org/show_bug.cgi?id=29912
- https://bugs.winehq.org/show_bug.cgi?id=50338
- https://bugs.winehq.org/show_bug.cgi?id=51855 (partially? no search box)
--
v8: comdlg32: Add refresh/go to button to IFileDialog navigation bar.
comdlg32: Add address edit to IFileDialog navigation bar.
comdlg32: Add breadcrumb overflow menu to IFileDialog navigation bar.
comdlg32: Add address breadcrumbs to IFileDialog navigation bar.
comdlg32: Add go up button to IFileDialog navigation bar.
comdlg32: Add IFileDialog navigation bar.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1857
On Thu Jan 5 11:45:30 2023 +0000, Philip Karlsson Gisslow wrote:
> Thank you for taking the time Bernhard, I am not sure what I am missing,
> the dot after the first sentence? I really want to get this right as I
> would be happy to help out contributing more going forward.
Maybe something along the lines of: "msi: Initialize WINTRUST_DATA to zero." ?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1908#note_20364
This series solves https://bugs.winehq.org/show_bug.cgi?id=54250
The two first patches address proper loading of modules in dbghelp.
There are cases where the path sent in the dll load debug event isn't
the real path to the loaded module.
The two last patches are to expose the real path of the module for
integration in when winedbg acts as a proxy to gdb.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1913
This works fine with the new struct conversions, and is needed
for HDR with native Vulkan games such as Doom Eternal and games using
HDR with DXVK and VKD3D-Proton.
--
v2: winevulkan: Enable VK_EXT_hdr_metadata.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1912
This field was not unitilized so it got a random value from
the stack causing a later crash when it was dereferenced in Wintrust
(SoftPubloadSignature).
--
v3: Sends the correct pointer to memset
https://gitlab.winehq.org/wine/wine/-/merge_requests/1908
This field was not unitilized so it got a random value from
the stack causing a later crash when it was dereferenced in Wintrust
(SoftPubloadSignature).
--
v2: Memset the struct to avoid exlicit initialization
https://gitlab.winehq.org/wine/wine/-/merge_requests/1908
copy_propagation_transform_object_load() currently retrieves true, which
indicates that there was progress, even if the input dereference remains
the same.
This can happen repeatedly if an uninitialized object is copied onto
itself, as in the tests added in this patch. This results on the
compilation getting stuck on an endless loop.
This patch checks if the deref didn't change, to retrieve false in that
case.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/59
Depending on the theme, if there was a header,
the border ends up painted lower than it should be,
and clipped by the header.
7-Zip file manager, the reason why the offset was added in 5f0dcf79185941c4faff35d1cc9c758160f3a27d in the first place, still renders correctly.
Before:

After:

EDIT1:
Actually compared screenshots of 7-Zip file manager and looks like the headers are now painted consistently after highlighting them.


--
v3: comctl32/listview: Exclude header area in WM_NCPAINT.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1878
For some reason NosTale is checking memory regions preventing it's own logic from calling system memory.
It checks if the code is called under "0x70000000" range, but for some reason "user32.dll" is placed below this region (by Wine) causing mouse bug, graphical glitches and other memory-access related errors.
This pull-request fixes the bug, because I wanted to be sure I tested it on two Linux machines, Steam Deck and one macOS device.
Everything just works fine.
Not sure if we should set only this dll base address or (according to reference image) set it for other dll libraries too.
Also under Windows (I tested it too) it's randomized by ALSR - maybe we should do it the same way (and place library between range "0x70000000" - 0x80000000" for example).
Reference:
https://user-images.githubusercontent.com/21007545/210278824-29f42d90-aca4-…
Resolves these issues:
https://bugs.winehq.org/show_bug.cgi?id=49988https://bugs.winehq.org/show_bug.cgi?id=42999
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1907
I was unable to write tests for this; it seems it doesn't consistently work on
Windows. However, Rayman 3 seems to rely on it; it maps the same buffer twice
immediately after creation, with DISCARD flags on both maps, and expects the
same address to be returned.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53752
--
v3: d3d8: Filter out redundant buffer discards.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1884
--
v6: windows.media.speech: Add pausing to the recognition session worker.
windows.media.speech: Add a worker thread to the recognition session.
windows.media.speech/tests: Test starting, stopping, pausing and resuming the recognition session.
windows.media.speech/tests: Test the recognizer state.
windows.media.speech: Return IAsyncAction from session_PauseAsync.
windows.media.speech: Return IAsyncAction from session_StopAsync.
windows.media.speech: Do not force calling convention on internal callbacks.
windows.media.speech: Move constraints vector to the recognition session.
https://gitlab.winehq.org/wine/wine/-/merge_requests/729
This patch series includes an implementation of the long-pending `transpose` intrinsic and the `smoothstep` intrinsic.
While implementing `smoothstep` I realized that some intrinsics have different rules for the allowed data types than expressions:
- Vectors and matrices at the same time are not allowed, regardless of their dimensions. Even if they have the same number of components.
- Any combination of matrices is always allowed, even those when no matrix fits inside another, e.g.:
`float2x3` is compatible with `float3x2`, resulting in `float2x2`.
The common data type is the min on each dimension.
This is the case for `max`, `pow`, `ldexp`, `clamp` and `smoothstep`; which suggest that it is the case for all intrinsics where the operation is applied element-wise. So this was corrected.
A minor fix in `pow`'s type conversion is also included.
--
v3: vkd3d-shader/hlsl: Use add_unary_arithmetic_expr() in intrinsic_pow().
vkd3d-shader/hlsl: Allow elementwise_intrinsic_convert_args() to also convert args to float.
vkd3d-shader/hlsl: Convert elementwise intrinsics args to the proper common type.
tests: Test for common type conversion for element-wise intrinsics.
vkd3d-shader/hlsl: Support smoothstep() intrinsic.
vkd3d-shader/hlsl: Support transpose() intrinsic.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/53
--
v2: dinput/tests: Test W.G.I condition effect with negative direction.
dinput/tests: Test W.G.I periodic effect with negative direction.
dinput/tests: Test W.G.I constant effect with negative direction.
dinput/tests: Test W.G.I ramp effect with negative directions.
dinput/tests: Reduce tests verbosity.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1901
I was unable to write tests for this; it seems it doesn't consistently work on
Windows. However, Rayman 3 seems to rely on it; it maps the same buffer twice
immediately after creation, with DISCARD flags on both maps, and expects the
same address to be returned.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53752
--
v2: d3d8: Filter out redundant buffer discards.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1884
This series tries to fix WM_PASTE tests error on edit control (both user32 & comctl32).
The test failures where systematic on a local Win10 for comctl32 (yet very rare on
user32, perhaps one in 20 runs).
Since the failures are not systematic, it ought to be a synchronisation / timing
issue.
Flushing the msg queue before starting the paste test cycle seems to fix the issue.
- 0 occurence on comctl32 and user32 in 50 run (local VM)
- 0 occurence on Testbot (comctl32) in 1 run.
It's hard to be fully conclusive about bug resolution, but it's at least a step into
the right direction.
--
v2: comctl32/tests: Fix failing WM_PASTE tests for edit control on Win10+.
user32/tests: Fix failing WM_PASTE tests for edit control on Win10+.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1886
> (The TlsIndex field in the LDR_DATA_TABLE_ENTRY structure appears to be unused except as a flag that the module has TLS (being always set to -1), at least as far back as Windows XP. It is worth mentioning that the WINE implementation of implicit TLS incorrectly uses TlsIndex as the real module TLS index, so it may be unreliable to assume that it is always -1 if you care about working on WINE.)
>
> \- http://www.nynaeve.net/?p=186
and the "links to that article but still doesn't work in wine" award goes to... [the D runtime](https://github.com/dlang/dmd/blob/6bf60ea0eb174631ede0074a77d3898d…! (Admittedly, there aren't too many ways to do what they're trying to do.)
With this, the D runtime will now work in Wine, even if in a dll loaded into an exe with no tls (which gets it the tls index 0)
The changes to the debugger are a bit icky, a possible alternative is to find some other easily-debugger-accessible place to stuff the tls index.
--
v7: TMP: Use module info for tls in winedbg
winedbg: Track loaded modules
https://gitlab.winehq.org/wine/wine/-/merge_requests/1578
There are times when it is useful to test changes on the Windows XP and 2003 VMs, but the direct use of functions not on those platforms makes this impossible.
Once applied, the kernel32 tests will run on the Windows XP and 2003 testbot VMs.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1899
Implements navigation bar featuring:
- back/forward buttons
- go up button
- address crumbs
- hides crumbs when there's not enough space to display all of them
- always shows at least 2 crumbs
- truncating them if needed
- first crumb is at least 56px
- aligns label to the left if truncated
- right clicking on the crumb, or free space, opens a menu with `Copy address as text` and `Edit address` options
- reuses existing crumbs to avoid some flickering
- overflow menu
- first crumb is always moved here
- removes the split, if there are no items in the menu
- hidden crumbs are moved here
- left or right click on the button starts address editing
- address edit
- accepts an existing path
- expands environment variables, e.g. `%APPDATA%\Microsoft` -> `C:\users\%USERNAME%\AppData\Roaming\Microsoft`
- errors with a `MessageBox` on nonexistent paths
- refresh button
- changes into go to button when editing address
- DPI scaling
Screenshots:






Remaining issues:
- crumbs not lighting up when hovered sometimes
- can be observed in current file dialog, hovering over dropdown arrow of a file type fixes it for a moment
- crumbs flickering on address change sometimes
- mostly when there's not enough space to display all of them
- `DeferWindowPos` doesn't seem to be atomic in Wine, presumably is in native Windows?
- unexpected address conversion for some PIDLs
- e.g. `Desktop` -> `C:\users\%USERNAME%\Desktop`, which is an entirely different location
- or `My Computer` into an empty string
- known folders are not handled by address edit, e.g. `Desktop`, `My Computer`
- icons are not DPI scaled
- while writing this:
```
0024:fixme:bitmap:NtGdiCreateBitmap planes = 0
0024:err:system:user_check_not_lock BUG: holding USER lock
wine/dlls/win32u/sysparams.c:396: user_check_not_lock: Assertion `0' failed.
wine: Assertion failed at address F7FF8549 (thread 0024), starting debugger...
```
- can't reproduce, happened when clicking on an item in overflow menu
- race condition? cosmic ray?
Addresses following bugs:
- https://bugs.winehq.org/show_bug.cgi?id=29912
- https://bugs.winehq.org/show_bug.cgi?id=50338
- https://bugs.winehq.org/show_bug.cgi?id=51855 (partially? no search box)
--
v7: comdlg32: Add refresh/go to button to IFileDialog navigation bar.
comdlg32: Add address edit to IFileDialog navigation bar.
comdlg32: Add breadcrumb overflow menu to IFileDialog navigation bar.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1857
While this doesn't fully fix https://bugs.winehq.org/show_bug.cgi?id=50703 as we can read in the code comments ideally the number of devices is "unbound" it does resolve the immediate issue that I've been facing.
Since the total number of ports displayed is both hardware + software it's incredibly easy to go beyond just 16.
The increase to 64 helps a lot, but is still not perfect. We could also set it to 128 or 256, but it's still arbitrary.
I think this would already be enough for the vast majority of cases, but I guess they also thought this with 16 ;)
--
v2: update comment
https://gitlab.winehq.org/wine/wine/-/merge_requests/1893
Implements navigation bar featuring:
- back/forward buttons
- go up button
- address crumbs
- hides crumbs when there's not enough space to display all of them
- always shows at least 2 crumbs
- truncating them if needed
- first crumb is at least 56px
- aligns label to the left if truncated
- right clicking on the crumb, or free space, opens a menu with `Copy address as text` and `Edit address` options
- reuses existing crumbs to avoid some flickering
- overflow menu
- first crumb is always moved here
- removes the split, if there are no items in the menu
- hidden crumbs are moved here
- left or right click on the button starts address editing
- address edit
- accepts an existing path
- expands environment variables, e.g. `%APPDATA%\Microsoft` -> `C:\users\%USERNAME%\AppData\Roaming\Microsoft`
- errors with a `MessageBox` on nonexistent paths
- refresh button
- changes into go to button when editing address
- DPI scaling
Screenshots:






Remaining issues:
- crumbs not lighting up when hovered sometimes
- can be observed in current file dialog, hovering over dropdown arrow of a file type fixes it for a moment
- crumbs flickering on address change sometimes
- mostly when there's not enough space to display all of them
- `DeferWindowPos` doesn't seem to be atomic in Wine, presumably is in native Windows?
- unexpected address conversion for some PIDLs
- e.g. `Desktop` -> `C:\users\%USERNAME%\Desktop`, which is an entirely different location
- or `My Computer` into an empty string
- known folders are not handled by address edit, e.g. `Desktop`, `My Computer`
- icons are not DPI scaled
- while writing this:
```
0024:fixme:bitmap:NtGdiCreateBitmap planes = 0
0024:err:system:user_check_not_lock BUG: holding USER lock
wine/dlls/win32u/sysparams.c:396: user_check_not_lock: Assertion `0' failed.
wine: Assertion failed at address F7FF8549 (thread 0024), starting debugger...
```
- can't reproduce, happened when clicking on an item in overflow menu
- race condition? cosmic ray?
Addresses following bugs:
- https://bugs.winehq.org/show_bug.cgi?id=29912
- https://bugs.winehq.org/show_bug.cgi?id=50338
- https://bugs.winehq.org/show_bug.cgi?id=51855 (partially? no search box)
--
v6: comdlg32: Add refresh/go to button to IFileDialog navigation bar.
comdlg32: Add address edit to IFileDialog navigation bar.
comdlg32: Add breadcrumb overflow menu to IFileDialog navigation bar.
comdlg32: Add address breadcrumbs to IFileDialog navigation bar.
comdlg32: Add go up button to IFileDialog navigation bar.
comdlg32: Add IFileDialog navigation bar.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1857
While this doesn't fully fix https://bugs.winehq.org/show_bug.cgi?id=50703 as we can read in the code comments ideally the number of devices is "unbound" it does resolve the immediate issue that I've been facing.
Since the total number of ports displayed is both hardware + software it's incredibly easy to go beyond just 16.
The increase to 64 helps a lot, but is still not perfect. We could also set it to 128 or 256, but it's still arbitrary.
I think this would already be enough for the vast majority of cases, but I guess they also thought this with 16 ;)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1893
Implements navigation bar featuring:
- back/forward buttons
- go up button
- address crumbs
- hides crumbs when there's not enough space to display all of them
- always shows at least 2 crumbs
- truncating them if needed
- first crumb is at least 56px
- aligns label to the left if truncated
- right clicking on the crumb, or free space, opens a menu with `Copy address as text` and `Edit address` options
- reuses existing crumbs to avoid some flickering
- overflow menu
- first crumb is always moved here
- removes the split, if there are no items in the menu
- hidden crumbs are moved here
- left or right click on the button starts address editing
- address edit
- accepts an existing path
- expands environment variables, e.g. `%APPDATA%\Microsoft` -> `C:\users\%USERNAME%\AppData\Roaming\Microsoft`
- errors with a `MessageBox` on nonexistent paths
- refresh button
- changes into go to button when editing address
- DPI scaling
Screenshots:






Remaining issues:
- crumbs not lighting up when hovered sometimes
- can be observed in current file dialog, hovering over dropdown arrow of a file type fixes it for a moment
- crumbs flickering on address change sometimes
- mostly when there's not enough space to display all of them
- `DeferWindowPos` doesn't seem to be atomic in Wine, presumably is in native Windows?
- unexpected address conversion for some PIDLs
- e.g. `Desktop` -> `C:\users\%USERNAME%\Desktop`, which is an entirely different location
- or `My Computer` into an empty string
- known folders are not handled by address edit, e.g. `Desktop`, `My Computer`
- icons are not DPI scaled
- while writing this:
```
0024:fixme:bitmap:NtGdiCreateBitmap planes = 0
0024:err:system:user_check_not_lock BUG: holding USER lock
wine/dlls/win32u/sysparams.c:396: user_check_not_lock: Assertion `0' failed.
wine: Assertion failed at address F7FF8549 (thread 0024), starting debugger...
```
- can't reproduce, happened when clicking on an item in overflow menu
- race condition? cosmic ray?
Addresses following bugs:
- https://bugs.winehq.org/show_bug.cgi?id=29912
- https://bugs.winehq.org/show_bug.cgi?id=50338
- https://bugs.winehq.org/show_bug.cgi?id=51855 (partially? no search box)
--
v5: comdlg32: Add refresh/go to button to IFileDialog navigation bar.
comdlg32: Add address edit to IFileDialog navigation bar.
comdlg32: Add breadcrumb overflow menu to IFileDialog navigation bar.
comdlg32: Add address breadcrumbs to IFileDialog navigation bar.
comdlg32: Add go up button to IFileDialog navigation bar.
comdlg32: Add IFileDialog navigation bar.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1857
On Wed Dec 28 23:08:08 2022 +0000, Vladislav Timonin wrote:
> Just some padding so that the icon isn't so close to the text. Probably
> could use a comment.
> `dis->rcItem.left, dis->rcItem.top` on the left.
> `dis->rcItem.left - (icon_width / 2), dis->rcItem.top` on the right.
> 
Was pointed out that I shouldn't draw outside `rcItem` and can add padding in `WM_MEASUREITEM` instead. Should've read docs thoroughly enough ,_,

--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1857#note_20183
On Wed Dec 28 19:30:29 2022 +0000, Esme Povirk wrote:
> Drawing outside of rcItem doesn't seem right. Why is this necessary?
Just some padding so that the icon isn't so close to the text. Probably could use a comment.
`dis->rcItem.left, dis->rcItem.top` on the left.
`dis->rcItem.left - (icon_width / 2), dis->rcItem.top` on the right.

--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1857#note_20182
On Wed Dec 28 19:30:28 2022 +0000, Esme Povirk wrote:
> I think you could remove the need for this by drawing the left border
> outside the window.
If you mean extending it to be painted under crumbs, it originally was, static control with `SS_GRAYFRAME` taking up full width. But that had issues with frame being painted over crumbs on initial dialog show. And right border trailing on resize that I was ignoring thinking it was caused by [54137](https://bugs.winehq.org/show_bug.cgi?id=54137).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1857#note_20181