0

MacBook Pro (16-inch, 2019) running Monterey (12.1) was working normally.  I closed the lid and went out to do some yard work.

When I came back and opened it, the Dock is goofy.  When the pointer gets close to the dock, the Dock slides off the screen.  If I continue further down, when the cursor gets within a few pixels of the edge, the desktop background begins blinking black, normal, black.

I have never turned on hiding and I have not changed any preferences today or yesterday.  Nor installed any software nor did an update.  All is at the latest available version.

Nothing is in full-screen mode.

Cause? Solution?

2
  • Can we presume that if you log out and in, the dock is not fixed and if you shut down the OS, dock works again?
    – bmike
    Feb 4, 2022 at 2:37
  • Yeah, I closed all apps and re-booted and it's back to normal. Still would like to know how to prevent, and if possible a way to fix without having to shut things down.
    – WGroleau
    Feb 4, 2022 at 3:14

1 Answer 1

1

This may not be a perfect solution for you but it may help. This is what I do when my "Dock" has an attitude and needs a "good old fashioned ass kicking", to get it back on track.

  1. Open Automator.app and create a new "Quick Action" document.
  2. Add a Run AppleScript to the Workflow.
  3. Paste this following AppleScript code into that Run AppleScript command you previously added. This code will quit and restart both "System Events.app" and "Dock.app"

tell application "System Events" to tell process "System Events"
    set thePID to unix id
end tell

do shell script ({"kill -9 ", thePID, "; sleep .1"} as text)

tell application "System Events" to launch
delay 0.1

tell application "System Events" to tell process "Dock"
    set theDock to application file
end tell

do shell script "killall Dock ; sleep .1"

open theDock

tell application "System Events"
    repeat until lists of process "Dock" exists
        delay 0.1
    end repeat
    tell process "Dock" to set theLists to lists
    set focused of item 1 of theLists to true
    delay 0.1
    set focused of item 1 of theLists to false
end tell

enter image description here

  1. Save your new "Quick Action".

Your new Quick Action will now be available in your Services menu in all apps.

Clicking the Services menu in the menu bar of any app and selecting Services Preferences.., will bring you to where you can assign a keyboard shortcut to your new Quick Action.

enter image description here

1
  • Well, this is the first time I've seen the behavior since the Dock was introduced years ago. But if it happens again, I'll certainly consider a shell version of that. Probably two or three lines in zsh.
    – WGroleau
    Feb 4, 2022 at 6:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .