The behavior is based on Safari where last visible tab is swapped with the selected tab, if selected tab itself would not be visible.
Commit edited by Allan Odgaard, original version used document icons in overflow menu and would make the effective last tab sticky.
Closes#1060
We now load the image via NSImage and creates a CGImageRef from that (based on the current graphics context). This ensures we get the @2px version when on a HiDPI display.