The direction of "next display" changes randomly when use two external monitors #101

yilei opened this Issue Mar 1, 2013 · 4 comments


None yet
5 participants

yilei commented Mar 1, 2013

I use two external monitors with my MPB Retina, say following numbers representes my three monitors:
1 2 3
After I re-plugin my monitors, sometimes the "Next Display" will follow 1->2->3->1, but sometimes it will follow 1->3->2->1...

P.S. 1 is my mac, and I always plug the monitor 2 at the same thunderbolt port, 3 too.

mrbfrank commented Jan 6, 2014

+1 I have this same issue, & thank you dev's I love Spectacle!

I've got this issue too on OSX Mavericks.

From some quick testing, it looks as if it's got something to do with the order that the screens are plugged in.

liam-m commented Jun 18, 2014

+1 I'm having the same issue. Looks like #82 is going to fix this but needs testing first


eczarny commented Jun 22, 2014

I have a new change on master that I hope should help. By relying on a stable sorting algorithm Spectacle will arrange all screens in descending order on the Y axis, then again on the X axis. The primary screen will always be the screen at index 0 (as defined in the NSScreen documentation).

This means that when moving windows to more than one external display Spectacle should always use the same arrangement. Windows will no longer move to different external displays after restarts, or when external displays are added/removed. There is, however, no guarantee that the arrangement will be optimal, but it should be consistent.

If folks interested in the fix could try building Spectacle from master and test this change out that would be amazing.

@eczarny eczarny added the pending label Jun 22, 2014

@eczarny eczarny closed this Oct 21, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment