Skip to content
  • Peter Hutterer's avatar
    dix: always copy grabs, don't reference them · 395124bd
    Peter Hutterer authored
    Introduced in xorg-server-1.13.99.901-2-g9ad0fdb1
    
    . Storing the grab pointer
    in the listener turns out to be a bad idea. If the grab is not an active
    grab or an implicit grab, the pointer stored is the one to the grab attached
    on the window. This grab may be removed if the client calls UngrabButton or
    similar while the touch is still active, leaving a dangling pointer.
    
    To avoid this, copy the grab wherever we need to reference it later. This
    is also what we do for pointer/keyboard grabs, where we copy the grab as
    soon as it becomes active.
    
    Reported-by: default avatarMaarten Lankhorst <maarten.lankhorst@canonical.com>
    Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
    395124bd