Return DRAG_ABORT on UnmapNotify from drag_pointer
Add DRAG_ABORT to enum drag_result_t. DRAG_ABORT will indicate the drag operation cannot be completed. Return DRAG_ABORT on UnmapNotify, or when the keyboard or pointer cannot be grabbed. Add DRAGGING to return value for drag_result_t. DRAGGING is used internally by drag_pointer to indicate the drag is in progress. Change DRAG_CANCEL to DRAG_REVERT to clarify the distinction between "abort" and "revert/cancel" actions. Fixes an issue that caused i3 to crash when a user is dragging or resizing a floating window that becomes destroyed.
This commit is contained in:
committed by
Michael Stapelberg
parent
f691a55923
commit
9ee26a608e
@ -161,7 +161,7 @@ int resize_graphical_handler(Con *first, Con *second, orientation_t orientation,
|
||||
xcb_flush(conn);
|
||||
|
||||
/* User cancelled the drag so no action should be taken. */
|
||||
if (drag_result == DRAG_CANCEL)
|
||||
if (drag_result == DRAG_REVERT)
|
||||
return 0;
|
||||
|
||||
int pixels;
|
||||
|
Reference in New Issue
Block a user