• Alexandros Frantzis's avatar
    winewayland.drv: Track and apply latest window cursor on pointer enter. · fe1f3e27
    Alexandros Frantzis authored
    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.
    fe1f3e27
Name
Last commit
Last update
dlls Loading commit data...
documentation Loading commit data...
fonts Loading commit data...
include Loading commit data...
libs Loading commit data...
loader Loading commit data...
nls Loading commit data...
po Loading commit data...
programs Loading commit data...
server Loading commit data...
tools Loading commit data...
.editorconfig Loading commit data...
.gitlab-ci.yml Loading commit data...
.mailmap Loading commit data...
ANNOUNCE.md Loading commit data...
AUTHORS Loading commit data...
COPYING.LIB Loading commit data...
LICENSE Loading commit data...
LICENSE.OLD Loading commit data...
MAINTAINERS Loading commit data...
README.md Loading commit data...
VERSION Loading commit data...
aclocal.m4 Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...