Smart Mouse Drags outside a Window
bash
If dragged from an Emacs window to outside of Emacs:
ACTION KEY
(1) If depress was on a buffer name in Buffer-menu/ibuffer mode or on
a file/directory in dired mode, display the item in a new frame.
See hmouse-drag-item-mode-forms for how to allow for draggable
items in other modes.
(2) If depress was anywhere else, create a new frame sized to match the
selected window with the same buffer.
ASSIST KEY
Create a new frame sized to match the selected window with the same buffer.
If there is only one window in the source frame or if hycontrol-keep-window-flag
is non-nil, leave the original window and just clone it into the new frame;
otherwise, delete the original window.