Currently only used to keep rawinput devices updated without iterating the entire list on every change.
This thread will then let us solve several problems:
* Solve issues with input not being polled if/when applications aren't checking their messages. This removes the need for polling messages in DInput, which is known to confuse and break DOSBOX.
* Solve some issues with ll-hook deadlocks between hooking threads and the thread that is currently polling for inputs.
* Useful to process internal messages and implement some user driver mechanisms. It can for instance already process WM_WINE_CLIPCURSOR messages, instead of relying on the foreground thread.
* Similarly, for cursor icon changes, wineserver can notify it on cursor window changes and request the cursor icon to be updated from the user driver, instead of having to check the window the cursor is located in to change its icon on every mouse move.
* Ultimately make it possible to drop the __wine_send_input PE export, the thread can read HID reports from devices that a process has registered for, and send WM_INPUT messages accordingly. This has some drawbacks though, as reading NT devices currently involves much more wineserver roundtrips than `__wine_send_input`.
There's evidence that Windows uses a similar thread to process hardware events (as described in https://devblogs.microsoft.com/oldnewthing/20140213-00/?p=1773), although it's probably a system-wide kernel thread. I considered reading X11 input from a per-prefix dedicated thread (for instance in explorer.exe) or dedicated process, but having one thread per-process has several advantages.
The rawinput device registration state is done per-process and according to https://gitlab.winehq.org/wine/wine/-/merge_requests/2120 it also needs to post notifications that are process specific.
It also keeps the guarantee that each process will read the inputs from the window it has created, and not from some other windows, although the message dispatch may decide to send the message to another process later, it avoids having to listen to input on other processes windows.
It can then be seen as an intermediate step towards having a per-prefix thread, if that's something we end up needing. Moving from a per-process thread to a per-prefix thread should be easier.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3024
If read_identity returns FALSE, it has already called clear_identity.
This is the same problem as in merge request !2970. Unfortunately I did not notice at first that the problem was present in two places.
--
v2: wusa: Fix double free on error path in read_components (scan-build).
https://gitlab.winehq.org/wine/wine/-/merge_requests/3013
This allows access to the in-process cached monitor list and reduces the number of registry calls issued for QueryDisplayConfig (in case of no change) from `4 x monitors` to `1`.
--
v3: win32u: Move QueryDisplayConfig from user32.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2957
Some of these fixes are subtle (like the first patch) and very annoying to debug. Although the first patch looks like a hack, surprisingly, it's how the spec itself says it is! It's not even an IE quirk, but a special case in the spec.
For example, the variable name (which holds the builtin eval func) **does** matter: if it's called something other than 'eval', it gets treated differently (as if indirect), and this is verified by the tests + the spec's wording (so Microsoft's implementation follows it).
Most of the patches other than the first 2 are pretty small so they're in same MR.
--
v3: jscript: Store ref to the function code instead of the function instance
jscript: Don't allocate arguments buffer separately from the arguments obj.
jscript: Properly implement duplicated argument names in functions.
jscript: Don't use iface_to_jsdisp where it's not necessary to grab it.
jscript: Get rid of jsobj in scope_chain_t.
jscript: Move arguments_obj from the frame to the base scope.
jscript: Fix addressing invalid memory if ref is an argument.
jscript: Correctly implement context for indirect eval calls in ES5+ modes.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2942
Allowing the job to fail to avoid failing the pipeline. Some new tests
are failing with it, and some are succeeding todo_wine.
--
v5: gitlab: Run user32 32-bit tests with nulldrv driver.
user32/tests: Update todos specific to the X11 display driver.
user32/tests: Check graphics driver and add todos for nulldrv.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1259
lower_narrowing_casts() currently creates a new cast calling
hlsl_new_cast(). This cast may be redudant, but it is not folded, which
is making SM1 emit an unnecessary fixme in some shaders:
Aborting due to not yet implemented feature: SM1 "cast" expression.
Other passes that call hlsl_new_cast() are lower_int_division() and
lower_int_modulus(), so the new fold_redudant_casts() pass is called
after these as well.
This is the only thing left required for the HLSL compiler to properly compile the SONIC CD shaders.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/226
BORING
--
v3: vkd3d-shader/hlsl: Return an hlsl_ir_node pointer from hlsl_new_constant().
vkd3d-shader/hlsl: Pass a hlsl_constant_value pointer to hlsl_new_constant().
vkd3d-shader/hlsl: Pass hlsl_constant_value and hlsl_type pointers to fold_bit_or().
vkd3d-shader/hlsl: Pass hlsl_constant_value and hlsl_type pointers to fold_bit_and().
vkd3d-shader/hlsl: Pass hlsl_constant_value and hlsl_type pointers to fold_bit_xor().
vkd3d-shader/hlsl: Only read used coordinates in encode_texel_offset_as_aoffimmi().
vkd3d-shader/hlsl: Use the writemask to map the coords swizzle for load instructions.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/223
On my Nvidia GeForce GTX 1050 Ti `ddxddy.shader_test` doesn't pass because of considerably different numeric results.
As Giovanni pointed out, this is because my GPU uses the fine derivate and not the coarse derivate to implement ddx() and ddy().
For this reason, the result for ddx|ddy() is quantized so that the test passes if the GPU uses either coarse or fine derivates.
Additionally, tests for both ddx_coarse|ddy_coarse() and ddx_fine|ddy_fine() are added, that expect a more precise result.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/224
--
v6: vkd3d-shader/hlsl: Handle 'texkill' jump type.
vkd3d-shader/hlsl: Parse clip() function.
tests: Add some tests for clip().
vkd3d-shader: Make some helpers available from hlsl.c.
vkd3d-shader/hlsl: Add a parameter for jump nodes and use it for 'discard'.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/211
--
v5: vkd3d-shader/tpf: Add support for writing 'resinfo' instruction.
vkd3d-shader/tpf: Add support for writing 'sampleinfo' instruction.
vkd3d-shader/hlsl: Parse GetDimensions() method.
tests: Add some tests for GetDimensions().
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/218
On Thu Jun 8 10:01:18 2023 +0000, Santino Mazza wrote:
> In this API the callbacks are the `Tx` functions from `ITextHost`, right?
Yes. See the existing tests in `dlls/riched20/tests/txtsrv.c`. We don't currently do much testing on which `ITextHost` members get called, but at least there's already an implementation there to get you started.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2941#note_35115
On Thu Jun 8 09:55:30 2023 +0000, Huw Davies wrote:
> > I couldn't debug it too much, because the crash happens only in the
> ITextHost implementation from a microsoft forms dll.
> Ah, so it may be related to which host callbacks get called. I think
> we're going to need some tests that look at that.
In this API the callbacks are the `Tx` functions from `ITextHost`, right?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2941#note_35114
> I couldn't debug it too much, because the crash happens only in the ITextHost implementation from a microsoft forms dll.
Ah, so it may be related to which host callbacks get called. I think we're going to need some tests that look at that.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2941#note_35113
On Thu Jun 8 09:52:58 2023 +0000, Huw Davies wrote:
> That'll mean that the host's `TxViewChange` method would get called -
> we'd need a test to see if that's the case. It still seems like we're
> hiding the problem. What crash did you see when using `ME_WrapMarkedParagraphs()`?
I couldn't debug it too much, because the crash happens only in the ITextHost implementation from a microsoft forms dll.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2941#note_35112
queue_task cannot free the struct because it doesn't know whether the
struct contains pointers to other dynamically allocated memory that also
needs to be freed (as is the case with struct send_request).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3015
If read_identity returns FALSE, it has already called clear_identity.
This is the same problem as in merge request !2970. Unfortunately I did not notice at first that the problem was present in two places.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3013
That'll mean that the host's `TxViewChange` method would get called - we'd need a test to see if that's the case. It still seems like we're hiding the problem. What crash did you see when using `ME_WrapMarkedParagraphs()`?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2941#note_35104
I wasn't completely sure what to do with the registry key. Keeping "Wine/X11 Driver" is a bit odd, but it also makes sure we stay backward compatible. Changing it would require more changes elsewhere and maybe it could be done later, if / when more options are moved.
--
v2: win32u: Move fullscreen window cursor clipping from winex11.
winex11: Move clip_fullscreen_window foreground check inside it.
win32u: Add a clipping_cursor member to user_thread_info.
win32u: Add a clipping_reset member to user_thread_info.
win32u: Move grab_pointer registry option from winex11.
winex11: Remove now unnecessary WM_X11DRV_CLIP_CURSOR_NOTIFY.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3021
I wasn't completely sure what to do with the registry key. Keeping "Wine/X11 Driver" is a bit odd, but it also makes sure we stay backward compatible. Changing it would require more changes elsewhere and maybe it could be done later, if / when more options are moved.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3021
Huw Davies (@huw) commented about dlls/sapi/uuid.c:
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
> + */
> +
> +#include "initguid.h"
> +
> +DEFINE_GUID(SPDFID_Text, 0x7ceef9f9, 0x3d13, 0x11d2, 0x9e, 0xe7, 0x00, 0xc0, 0x4f, 0x79, 0x73, 0x96);
> +DEFINE_GUID(SPDFID_WaveFormatEx, 0xc31adbae, 0x527f, 0x4ff5, 0xa2, 0x30, 0xf6, 0x2b, 0xb6, 0x1f, 0xf7, 0x0c);
Adding a new source file just for the guids seems a bit of an overkill. Can't we just add these to another file?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2992#note_35072
I expect this is going to be tricky to get in. I ran into the following issues:
* test_ShowWindow behaves very strangely on Windows. It seems this isn't typical behavior, and is caused by an interaction with test_SetFocus, but I'm not sure exactly what it does to the thread state that causes this.
* Many of the SetWindowPos flag combinations tested don't actually show the window on Windows, therefore they don't send EVENT_SYSTEM_FOREGROUND. I was able to reproduce this with a stand-alone test, so it seems to be normal behavior.
* Windows can show a window without activating it, and Wine on X11 can't do that reliably for managed windows.
* There are a couple of cases where Windows sends an event and Wine doesn't. I figure it's OK to not cover every case, but I can go back and investigate those if needed.
This interacts with https://gitlab.winehq.org/wine/wine/-/merge_requests/2314, in that the tests don't really test much without it. I applied that MR for my own testing.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2853
--
v4: vkd3d-shader/tpf: Add support for writing 'resinfo' instruction.
vkd3d-shader/tpf: Add support for writing 'sampleinfo' instruction.
vkd3d-shader/hlsl: Parse GetDimensions() method.
tests: Add some tests for GetDimensions().
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/218
Required for !1857 to not break when comctl32 version 6 isn't requested by application (in particular, found this in [qapitrace](https://github.com/apitrace/apitrace)).
Manifest resource id and assembly identity name match with Windows.
For isolation purposes, activation context is disabled while emitting events.
--
v4: comdlg32: Enable visual styles when showing IFileDialog.
comdlg32: Return E_UNEXPECTED if IFileDialog is already shown
https://gitlab.winehq.org/wine/wine/-/merge_requests/2068
Indexing with non-constants offsets requires relative addressing in SM4. In assembly, this is written like in the following example:
```
x1[r1.x + 3]
```
The first part of this patch series only includes support for indexing vectors with non-constant indexes.
Following patches in https://gitlab.winehq.org/fcasas/vkd3d/-/commits/nonconst-offsets-3.
---
Non-constant indexing of vectors cannot be implemented with relative addressing in SM4 because this
indexation cannot be performed at the level of register-components, only whole registers.
Mathematical operations must be used instead.
For floats, the native compiler seems to index an identity matrix, to
get the i-th column, and then proceedes to compute the dot product
between that column and the vector. For ints, bit operations seem to be
performed.
While probably less efficient, this implementation complies with the
type-checking at the IR level and when writing bytecode.
--
v5: vkd3d-shader/hlsl: Support non-constant vector indexing.
vkd3d-shader/hlsl: Lower dot for non-float types.
vkd3d-shader/hlsl: Introduce transform_derefs().
tests: Test indexing temps.
tests: Test non-constant vector indexing.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/207
BORING
--
v2: vkd3d-shader/hlsl: Return an hlsl_ir_node pointer from hlsl_new_constant().
vkd3d-shader/hlsl: Pass a hlsl_constant_value pointer to hlsl_new_constant().
vkd3d-shader/hlsl: Pass hlsl_constant_value and hlsl_type pointers to fold_bit_or().
vkd3d-shader/hlsl: Pass hlsl_constant_value and hlsl_type pointers to fold_bit_and().
vkd3d-shader/hlsl: Pass hlsl_constant_value and hlsl_type pointers to fold_bit_xor().
vkd3d-shader/hlsl: Only read used coordinates in encode_texel_offset_as_aoffimmi().
vkd3d-shader/hlsl: Use the writemask to map the coords swizzle for load instructions.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/223
This will be required for MFT decoder transforms to work. They don't usually produce an output sample on every pushed input sample, and the session may need to request more sample from upstream and push them into the transform or it will not get any output and get stuck.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3004
I don't know why the pipeline fails. The author name and email are set on all eight commits:
```
$ git clone https://gitlab.winehq.org/dropbear/wine.git && cd wine
...
$ git checkout afunix
Branch 'afunix' set up to track remote branch 'afunix' from 'origin'.
Switched to a new branch 'afunix'
$ git log --oneline --author="dropbear.sh(a)gmail.com" --pretty=format:"%h %an <%ae> %s"
c0fdbf09008 Ally Sommers <dropbear.sh(a)gmail.com> Merge branch wine:master into afunix
44e2032ce58 Ally Sommers <dropbear.sh(a)gmail.com> ws2_32/tests: Add test for AF_UNIX sockets.
668d655c7a6 Ally Sommers <dropbear.sh(a)gmail.com> server: Fix getsockname() and accept() on AF_UNIX sockets.
418bd0cb66f Ally Sommers <dropbear.sh(a)gmail.com> server: Introduce error when attempting to connect() to abstract AF_UNIX sockets.
50985b2b9bf Ally Sommers <dropbear.sh(a)gmail.com> server: Allow for deletion of socket files.
a12834a6a76 Ally Sommers <dropbear.sh(a)gmail.com> ws2_32: Add support for AF_UNIX sockets.
85b6afe3e2b Ally Sommers <dropbear.sh(a)gmail.com> ntdll/unix: Add support for AF_UNIX sockets to multiple functions.
ab6e1c5d48d Ally Sommers <dropbear.sh(a)gmail.com> ws2_32: Add afunix.h header.
```
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2786#note_34940
This uses a new hardware message with Wine internal WM_WINE_CLIPCURSOR message, to notify the foreground window of ClipCursor calls, or resets. It could possibly have used posted messages, like is done to request the desktop to release the clipping rectangle but I figured that a hardware message could be appropriate and is possibly the preferred mechanism to notify the foreground window.
We use QS_RAWINPUT for convenience here, as to automatically release the hardware message, and because this message is somewhat low-level. It could be anything, and maybe QS_MOUSEMOVE, but we'd have to then manually call accept_hardware_message from win32u.
The desktop posted message is kept, as there's no guarantee that the foreground window will be processing its hardware messages when we need, and/or that the desktop window is foreground.
--
v3: winex11: Remove now unnecessary ClipCursor forwarding to foreground thread.
win32u: Asynchronously apply or reset ClipCursor from the hardware message.
server: Queue a hardware WM_WINE_CLIPCURSOR message to the foreground thread.
server: Use a separate helper to merge WM_MOUSEMOVE messages.
server: Use the helper to reset the clip rect when the desktop size changes.
win32u: Add a reset parameter to WM_WINE_CLIPCURSOR and driver ClipCursor.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2981
Windows 10 [received support](https://devblogs.microsoft.com/commandline/af_unix-comes-to-window… for AF_UNIX sockets in Insider Build 17063. This merge request adds basic support for AF_UNIX sockets to ws2_32 and wineserver.
Of particular note is the difficulty in handling `sun_path`. Most of the functions that allow for translating Windows paths to Unix paths are not accessible from ws2_32. I considered the following options:
* Pass the Windows path to wineserver and do the conversion there.
* This is, as far as I can tell, not possible without major rearchitecting. wineserver does not have functions to translate Windows paths to Unix paths, for obvious reasons.
* Obtain the current working directory of the requesting process and temporarily change directories to there.
* This only handles relative paths and fails for absolute paths, UNC paths, etc.
* Conditionally change directories based on whether the path is relative or not.
* This is error-prone and wineserver does not have the requisite functions to do this cleanly.
I ultimately decided to pass the translated Unix path to wineserver, which changes directories to `dirname(path)`. It then provides `bind` and `connect` with `basename(path)`. This is not threadsafe, but wineserver is not (currently) multithreaded.
Abstract sockets are supported by this patch.
--
v15: ws2_32/tests: Add test for AF_UNIX sockets.
server: Fix getsockname() and accept() on AF_UNIX sockets.
server: Introduce error when attempting to connect() to abstract AF_UNIX sockets.
server: Allow for deletion of socket files.
ws2_32: Add support for AF_UNIX sockets.
ntdll/unix: Add support for AF_UNIX sockets to multiple functions.
ws2_32: Add afunix.h header.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2786
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)
--
v13: comdlg32: Add Ctrl+Backspace delete word to IFileDialog address edit.
comdlg32: Use path word break in IFileDialog address edit.
comctl32: Fix PathWordBreakProc.
comdlg32: Keep IExplorerBrowser in IFileDialog focused after Backspace.
fixup: comdlg32: Add address edit to IFileDialog navigation bar.
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.
comdlg32: Enable visual styles when showing IFileDialog.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1857
The test has a little inspiration from the SDK samples.
--
v2: mfmediaengine: Add support for inserting video effects.
mfmediaengine/tests: Add tests for video effects.
mf: Don't make stream sink shutdown dependent on IMFActivate presence in node.
mf: Don't leak sink in session_get_renderer_node_service().
mf: Clear queued topologies on session shutdown.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2778