Skip to content
  • Carlos Garnacho's avatar
    gdk/wayland: Break only implicit grabs on wl_pointer.leave w/ pressed buttons · 8288d9e8
    Carlos Garnacho authored
    The releasing of grabs while a button is pressed (e.g. after starting dnd, or
    dragging the window, or going to overview with a pressed button, etc...) was
    generalized here in GNOME/gtk!1879.
    
    However we shouldn't break all grabs here. In the case of grabbing popups,
    compositors will still emit crossing events between client surfaces (e.g.
    popping up and selecting a menu item via press-drag-release), breaking all
    grabs here means inconsistent client state, that was
    GNOME/gtk#2746.
    
    That was fixed in mutter, by essentially making implicit grabs
    owner_events=FALSE, however that breaks the mentioned use pattern entirely.
    Mutter is changing this behavior back, so GTK should handle these crossing
    events.
    
    The grab that we are interested in breaking here is the implicit pointer
    one. Popups will be dismissed via other means if the compositor says their
    active grab needs breaking. This still leaves dnd/move/resize drags in
    one place, while not allowing #2746 to happen with popups.
    8288d9e8