Shifting the rest of the variables by one towards indices of lesser value
overwrites the variable being cleared and effectively leaks it.
Signed-off-by: David Kahurani <k.kahurani@gmail.com>
The data is the path is invalid and therefore caution has to be
taken when adding data to this path to avoid lengthening it
unnecessarily. Also, don't assume there's a head node on the list
while counting number of nodes.
Signed-off-by: David Kahurani <k.kahurani@gmail.com>
This avoids a situation where the lengthening code, assuming the
data in the path is valid proceeds to lengthen the path further
while transforming data from a path_list into a path.
Signed-off-by: David Kahurani <k.kahurani@gmail.com>
Keep track of the window cursor set for each surface and apply it when
the pointer enters the corresponding surface. This fixes a problem where
due to transient disagreements between win32 pointer focus and Wayland
pointer focus a cursor update may be lost. For example:
1. Assume existing cursor C1.
2. Window is created beneath cursor.
3. The SetCursor(hwnd, C2) driver callback is called, but because the
wl_pointer hasn't entered the Wayland surface yet we don't update
the wl_pointer cursor.
4. wl_pointer enters the surface, we apply the latest cursor we know
about, which is C1.
5. Since no change in cursor window occurs, we don't get any
further SetCursor(hwnd, C2) callbacks, so we get stuck with C1.
This commit fixes the problem by tracking the per-surface HCURSOR in
step 3, regardless of whether the cursor is actually applied. So, in
step 4 we can use that HCURSOR for the surface.
This change also fixes some cases of our mouselook heuristics not
kicking in properly due to missing a SetCursor(hwnd, NULL) in the
manner described above.
This check was introduced in 4640be8dc8. At that point the only way for that
condition to be false was for a cube map texture.
It's not clear why cube maps are relevant here; we have no tests for this, but
it seems most expedient to just preserve the intent of the check.
While armv7 generally tolerates unaligned loads/stores in most
cases, the compiler is free to use the ldrd/strd instructions,
for loading/storing two consecutive 32 bit registers, and this
requires the destination to be aligned to a 4 byte boundary.
When packing a number of variable length structures, make sure
that each actual struct gets aligned at the right address
boundary.
This fixes crashes in DllMain of wineps.drv, when built for
armv7, since 351e58dc2d.
Signed-off-by: Martin Storsjö <martin@martin.st>