Skip to content

Commit

Permalink
Allow DnD to override implicit grabs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Rabinoff authored and jwijenbergh committed Jan 11, 2024
1 parent c5e7fc9 commit 6f1986f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libqtile/backend/wayland/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ def _on_request_start_drag(

def _on_start_drag(self, _listener: Listener, wlr_drag: Drag) -> None:
logger.debug("Signal: seat start_drag")
self._release_implicit_grab()
if not wlr_drag.icon:
return
self.live_dnd = wlrq.Dnd(self, wlr_drag)
Expand Down Expand Up @@ -646,7 +647,7 @@ def _on_cursor_button(self, _listener: Listener, event: pointer.PointerButtonEve
handled = self._process_cursor_button(button, pressed)

if not handled:
if self._pressed_button_count == 1 and found:
if self._pressed_button_count == 1 and found and not self.live_dnd:
win, surface, sx, sy = found
if surface:
self._create_implicit_grab(event.time_msec, surface, sx, sy)
Expand Down

0 comments on commit 6f1986f

Please sign in to comment.