Skip to content
  • Carlos Garnacho's avatar
    gdkdnd: Add private means to commit the drag status · 2923f69d
    Carlos Garnacho authored
    The way gdk_drag_status() may be called multiple times during the
    processing of drag and drop events throughout the widget hierarchy
    brings some superfluous messaging going in, esp. when it's the last
    request the one we want to honor, yet we emit messaging requests on
    all.
    
    This is barely appreciable in the X11 backend, but due to the design
    of the wayland protocol, quick series of changes like this it have
    some self-amplificating consequences which may end up flooding the
    connection.
    
    We can delegate this to a late "commit" call, performed within GDK
    event management. This way gdk_drag_status() calls may be cached
    and only result in windowing messaging once per ::drag-motion or
    ::drag-data-received event. Emitting the final status will also
    avoid spurious action changes on the compositor and the other peer.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=763298
    2923f69d