hammerspoon icon indicating copy to clipboard operation
hammerspoon copied to clipboard

hs.grid.set functions randomly using wrong grid

Open garymh opened this issue 2 years ago • 5 comments

Hi - I think a few Hammerspoon versions ago (or macOS versions, potentially?) my keybindings have gotten a little inconsistent for grids.

For instance: I have a binding to set the current window to the maximum size of the screen (hs.grid.set(0, 0, grid_max_width, grid_max_height))

Trying it in Safari right now works, but if I do some ⌘-Tabbing and land on another application and use the same binding, it will stretch to only one half of the screen even when passed the same parameters.

I'd be happy to include some logs or maybe an example - I just wanted to get an issue made before I forget :)

garymh avatar May 26 '22 22:05 garymh

In fact, it seems to be most of the window moving functions... something underlying with macOS might have changed?

Curiously it only seems to affect certain windows too. Kitty terminal works fine but Firefox and Safari have trouble.

garymh avatar May 27 '22 21:05 garymh

Not quite sure whether my issue shares the same root cause: https://github.com/Hammerspoon/hammerspoon/issues/3224

liancheng avatar May 31 '22 05:05 liancheng

@liancheng I think you're right! That sounds exactly like what's happening to me 🤔

garymh avatar Jun 01 '22 18:06 garymh

@garymh I have been experiencing this same thing for at least a couple of months now so wanted to add a +1. None of my relevant window management code has changed in that time frame, but macOS has been updated.

macOS 12.4, M1 Pro

rsefer avatar Jul 02 '22 13:07 rsefer

@garymh I have been experiencing this same thing for at least a couple of months now so wanted to add a +1. None of relevant my window management code has changed in that time frame, but macOS has been updated.

macOS 12.4, M1 Pro

Same! It doesn’t look like any of the grid functionality has changed in Hammerspoon itself, either. I agree macOS looks like the culprit…

I wonder if HS has to be changed to work with whatever the macOS change was, or is this a bug?

garymh avatar Jul 02 '22 14:07 garymh