(For after the code freeze.)
I think we want to have this DLL living in Wine for easier development, and probably dynamically load our custom Chromium fork from here. (just like MSHTML and wine-Gecko)
The code for that fork could then be created in its own repo.
--
v7: embeddedbrowserwebview: Create CreateWebViewEnvironmentWithOptionsInternal stub.
embeddedbrowserwebview: Add stub dll.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7032
This serie implements the migration of some type into the
new PDB reader.
During the migration phase (this serie and next one), the types (A)
will:
- always be loaded by old PDB reader,
- be migrated accoring to the type's tag (UDT, pointer, enum...),
one commit for each tag by:
+ storing in new PDB reader an offset to that type inside the
PDB file,
+ requesting type details directly from the file.
(A) typedef:s are handled differently than the other types, so
they'll be taken care of later on.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7844
Alexandros Frantzis (@afrantzis) commented about dlls/winewayland.drv/wayland_pointer.c:
>
> if (!(hwnd = wayland_pointer_get_focused_hwnd())) return;
> if (!(data = wayland_win_data_get(hwnd))) return;
> + if (!private) return;
>
> - wayland_surface_coords_to_window(data->wayland_surface,
> + wayland_motion_delta_to_window(data->wayland_surface,
> wl_fixed_to_double(dx),
> wl_fixed_to_double(dy),
> - (int *)&screen.x, (int *)&screen.y);
> -
> + &screen.x, &screen.y);
> wayland_win_data_release(data);
>
> + d_accum->x += screen.x;
> + d_accum->y += screen.y;
The accum x and y are accessed in two contexts: in `wayland_pointer_update_constraint` for the zeroing, and also updated here in relative motion handler. These may be running concurrently in different threads, and since access to doubles may not be atomic we ideally need to protect the variables. Especially with the suggestion below to place them in wayland_pointer instead, it's straightforward to guard these in the relative motion handler with the wayland_pointer mutex.
Note that even with the lock, there are some Wayland event races left that are harder to resolve (e.g., Thread1: relative motion handler starts running, Thread2: zero accum and destroy relative motion, Thread1: handler updates accum), but at least we won't end up with some half-updated `double` value, and the worst case is then only a very small glitch.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7806#note_101267
Alexandros Frantzis (@afrantzis) commented about dlls/winewayland.drv/wayland_pointer.c:
> process_wayland.zwp_relative_pointer_manager_v1,
> pointer->wl_pointer);
> zwp_relative_pointer_v1_add_listener(pointer->zwp_relative_pointer_v1,
> - &relative_pointer_v1_listener, NULL);
> + &relative_pointer_v1_listener, &accum);
> TRACE("Enabling relative motion\n");
> }
> else if (!needs_relative && pointer->zwp_relative_pointer_v1)
> {
> + memset(&accum, 0, sizeof(accum));
I would recommend setting the doubles explicitly with `= 0.0`, as memset(0) of double variables is undefined behavior (from a C standard perspective, although you'd be hard-pressed to find a system where this causes a problem).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7806#note_101266
Alexandros Frantzis (@afrantzis) commented about dlls/winewayland.drv/waylanddrv.h:
> pthread_mutex_t mutex;
> };
>
> +struct wayland_point
> +{
> + double x;
> + double y;
> +};
With the move of accumulated x and y to `wayland_pointer` I don't think there is much benefit in a `struct wayland_point` anymore. A plain `double accum_x, accum_y;` or similar is enough.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7806#note_101265
Alexandros Frantzis (@afrantzis) commented about dlls/winewayland.drv/wayland_pointer.c:
> process_wayland.zwp_relative_pointer_manager_v1,
> pointer->wl_pointer);
> zwp_relative_pointer_v1_add_listener(pointer->zwp_relative_pointer_v1,
> - &relative_pointer_v1_listener, NULL);
> + &relative_pointer_v1_listener, &accum);
Let's place the accumulated x and y values in wayland_pointer, since it's really a per-pointer state (currently per-process since we have a single pointer).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7806#note_101263