mjolnirapp / mjolnir

Lightweight automation and productivity app for OS X
5.2k stars 128 forks source link

Application windows can't be moved between screens in 10.12 Sierra #568

Closed dljsjr closed 4 years ago

dljsjr commented 7 years ago

For a while now, I've had a functions defined for moving windows between monitors (either left or right) but it stopped working in 10.12 Sierra.

For example, to move to the screen to the left:

  local win = window.focusedwindow()
  if win then
    local leftWin = win:screen():towest()
    if leftWin then
      local left_screen_frame = leftWin:frame()
      local this_screen_frame = win:frame()
      local offset = this_screen_frame.x - win:screen():frame().x
      this_screen_frame.x = left_screen_frame.x + offset
      win:setframe(this_screen_frame)
    end
  end

This worked fine for a while, but as of 10.12 Sierra this no longer works. Not sure if this is a limitation in macOS or a bug that's fixable.

github-actions[bot] commented 4 years ago

Stale issue message