You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is my monitor layout -- the right one is an odd shaped vertical monitor, but I'm pretty sure I had similar issues with regular vertical monitors in the past (no longer have them to test with).
-- move focused window to next monitorhs.hotkey.bind({"ctrl"}, "Right", function()
localwin=hs.window.focusedWindow()
win:moveOneScreenEast(false, true, 0)
end)
-- move focused window to previous monitorhs.hotkey.bind({"ctrl"}, "Left", function()
localwin=hs.window.focusedWindow()
win:moveOneScreenWest(false, true, 0)
end)
(to use these bindings, you'll need to unbind launch pad shortcuts, so you might want to instead test with different bindings)
When moving a maximized window to the vertical monitor, it will not properly adjust to maximize on the vertical monitor -- it leaves a gap at the bottom. If I move the window back to the horizontal monitor, it retains the gap proportionally (expected).
If I change the layout to align the tops of both monitors, it makes the gap more pronounced (gap size seems to be correlated with how much the vertical monitor extends below the horizontal monitor).
If I change the layout so that the bottoms align, it seems to fix it for maximized windows -- no gap. Not really a solution to the problem though.
Additionally, regardless of layout, windows that are not maximized get slightly shorter each time they move over. If you do it repeatedly you can see the gap getting larger.
Setting ensureInScreenBounds to false doesn't seem to help any.
This is on Hammerspoon 1.0.0 macOS 15.2, though I'm pretty sure this behavior happened, at least sometimes, on older versions of both Hammerspoon and macOS.
The text was updated successfully, but these errors were encountered:
After looking at code and doing some testing, it does affect moveToScreen as well
My best guess is that it's related to the note in geometry.toUnitRect
--- Notes:
--- * The resulting unit rect is always clipped within `frame`'s bounds (via `hs.geometry:intersect()`); if `frame`
--- does not encompass this rect *no error will be thrown*, but the resulting unit rect won't be a direct match with this rect
--- (i.e. calling `:fromUnitRect(frame)` on it will return a different rect)
I'm guessing t=geometry.intersect(frame,t) is clipping it?
This is my monitor layout -- the right one is an odd shaped vertical monitor, but I'm pretty sure I had similar issues with regular vertical monitors in the past (no longer have them to test with).
(to use these bindings, you'll need to unbind launch pad shortcuts, so you might want to instead test with different bindings)
When moving a maximized window to the vertical monitor, it will not properly adjust to maximize on the vertical monitor -- it leaves a gap at the bottom. If I move the window back to the horizontal monitor, it retains the gap proportionally (expected).
If I change the layout to align the tops of both monitors, it makes the gap more pronounced (gap size seems to be correlated with how much the vertical monitor extends below the horizontal monitor).
If I change the layout so that the bottoms align, it seems to fix it for maximized windows -- no gap. Not really a solution to the problem though.
Additionally, regardless of layout, windows that are not maximized get slightly shorter each time they move over. If you do it repeatedly you can see the gap getting larger.
Setting
ensureInScreenBounds
to false doesn't seem to help any.This is on Hammerspoon 1.0.0 macOS 15.2, though I'm pretty sure this behavior happened, at least sometimes, on older versions of both Hammerspoon and macOS.
The text was updated successfully, but these errors were encountered: