Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hs.screen.watcher fires when monitors haven't changed #2041

Closed
evantravers opened this Issue Feb 27, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@evantravers
Copy link

commented Feb 27, 2019

I use hs.screen.watcher to automatically reflow my screens when I plug my laptop into my dock.

https://github.com/evantravers/hammerspoon/blob/0c338b2283f67b2b7a3c02572e791379e3bc5c10/autolayout.lua#L29

However… the watcher seems to fire randomly when I'm just moving my mouse around… I haven't been able to determine what causes it to happen…

current theories:

  • moving the mouse between monitors
  • I hide my dock, maybe when the dock appears? I haven't been able to figure it out.
@cmsj

This comment has been minimized.

Copy link
Member

commented Mar 4, 2019

It's possible it's dock related - the screen watcher fires when screen related parameters change, but since the menubar and dock regions are considered out of bounds for apps, the screen's effective frame size will be changing. Do you explicitly hide the dock, or use auto-hiding?

@evantravers

This comment has been minimized.

Copy link
Author

commented Mar 4, 2019

evantravers added a commit to evantravers/hammerspoon that referenced this issue Mar 4, 2019

@cmsj

This comment has been minimized.

Copy link
Member

commented Mar 28, 2019

I'll close this issue, since I don't think there's anything we can do in Hammerspoon to help identify why the event fired, unfortunately.

@cmsj cmsj closed this Mar 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.