Skip to content
  • Jonas Dreßler's avatar
    compositor: Set priv->current_drag before calling meta_window_drag_begin() · e9866eee
    Jonas Dreßler authored and Marge Bot's avatar Marge Bot committed
    priv->current_drag is the property that
    meta_compositor_get_current_window_drag() and therefore also
    meta_display_is_grabbed() bases its check on. We use
    meta_display_is_grabbed() to select which cursor to use (window cursor
    vs root cursor) when updating the cursor in MetaCursorTracker.
    
    Since meta_window_drag_begin() sets a new cursor, and therefore triggers the
    cursor tracker to update the current visible cursor, we should set
    priv->current_drag before the call to meta_window_drag_begin(). This makes
    sure the cursor tracker sees that there's a window drag and changes the
    cursor right away when the window drag begins (instead of doing so on
    subsequent pointer events).
    
    Fixes: 525ed116 ("wayland/pointer: Unset current surface during window drags")
    Part-of: <!3630>
    e9866eee