22

I am using OS X Lion and I have a very annoying problem with windows not showing up when I click on Dock icons.

It happens when I have some windows opened in one space but I am viewing another space at the moment.

For example, I have Mail and Skype on space #2 but I am on space #1. Note that all windows are not minimized.

I want to quickly switch to Mail. So I click on Mail icon in Dock, it switches the space to #2, menubar shows that active window is Mail but Mail window is actually below Skype window.

The strangest thing is that sometimes it works as expected showing the Mail on top. I can't see any logic here, it's absolutely unpredictable, thus annoying.

Does anyone experienced such problems? I wonder if it's a bug or correct behaviour. Is there any way to fix that?

6 Answers 6

18

This same problem happened to me. What I did was:

  1. Go in to the launchpad, there should be a folder called "Other"

  2. Click on Terminal, a window will pop up and will say

    Last login: Fri Apr 28 12:35:22 on ttys000
    Computer-Name:~ username$ 
    
  3. Type in

    Killall Dock
    

Now that should fix it.

2
  • thank you for solution
    – Akash Negi
    Jul 21, 2022 at 16:27
  • Works even for macOS Monterey v12.x for Apple M1 Silicon Sep 8, 2022 at 15:12
5

It could be your plist is corrupted. I believe the Spaces preferences are under com.apple.dock.plist. Back it up and delete it, then logoff. See if that helps.

edit:

  1. Click on your user account in Finder (the little house icon).
  2. Click Home/Library/Preferences.
  3. There should be a file named com.apple.dock.plist. Drag to your desktop.
  4. OSX should create a new plist file.
  5. Logoff just in case, since this seems to be a weird troubleshooting issue I've never seen before.
  6. If that didn't help, keep the old plist handy.
2
  • What does plist mean? How am I supposed to backup and delete it? Nov 23, 2011 at 6:50
  • I updated the answer.
    – surfasb
    Nov 23, 2011 at 7:00
3

Obviously Mountain Lion is not so clever with the use of multiple displays on a temporal basis: I got my mail main window back by plugging the external display back and deselecting the "mirror displays" check box from display properties! There it was all the time, the mail window, somewhere outside the reach of screen.

I had had the same problem with Mail. No matter what, I could't get the main mail window to open and show my mailboxes, even though the dock icon showed the number of new mails and task bar was showing for Mail. I could only open new message screen. I had then noticed I had similar problems with other applications as well (e.g. Microsoft Office).

1
  • This is closest to addressing the source of my problem. Killing the Dock didn't help. I moved the dock so it was positioned at the bottom of the screen, and now clicking brings that application to the foreground.
    – beroe
    Jan 18, 2023 at 17:37
0

You can control this somewhat by right-clicking on the dock icon and selecting options for which space the app is assigned to. To the best of my understanding,

With "None", the default:

  • If the app has no open windows, it will open a window in the current space
  • If the app has windows open in another space, it can't be brought to the front until you switch to the other space.

When the app is assigned to a specific space:

  • If the app has no open windows then it will open a new window on that space.
  • If the app has open windows on that other space, the app is brought forward but the window is not visible because it's on another space. (I assume the system preference to "switch to a space with open windows for the application" should take you there. However, in my case it doesn't.)

The last option, "All spaces" just defeats the purpose of having things on separate spaces to begin with.

I personally find the window management behaviour with spaces strange and inconsistent. IMHO, this part of Mac OS X needs work.

4
  • With "None", the second bullet point should read "If you hit the dock icon, it will activate the application. If you hit the dock icon again, it will switch spaces to where that window resides." If you check "switch to space" and the application has no window, it will switch to the space. It will not move the app to your current space.
    – surfasb
    Nov 23, 2011 at 5:59
  • "All Spaces" forces the said application to appear on your active space as long as it is running. Sort of like an essential application that you need all the time.
    – surfasb
    Nov 23, 2011 at 6:10
  • @surfasb I tested this myself before posting, and again just now. If I switch to a space without any Safari windows, then it switches to another app on that space (TextEdit). When I click the Safari icon in the dock, I lose focus of the frontmost TextEdit window, but the menu bar remains "TextEdit". Further clicks don't do anything else. My system preferences has the "switch spaces" option turned on, but that doesn't seem to do anything either way...
    – Andrew Vit
    Nov 23, 2011 at 7:53
  • That's the official functionality. On my system, it functions as expected. I think your system isn't running with the default functionality.
    – surfasb
    Nov 23, 2011 at 22:18
0

The problem is Skype I think. On my system when switching from a full screen app to a windowed app on the Desktop screen Skype briefly pops up and sometimes stays in front.

Very annoying, but probably Skype's fault by handling events inappropriately.

I use HazeOver, and that means that any window in the background will be shaded. It shows that input focus is on the Skype window... Wow. it isn't. Just tried it and the Finder window closes, but Skype has 'focus'.

1
  • It affects not only Skype but other apps too. Things vs. iCal for example. Nov 22, 2011 at 9:14
0

I was facing the same problem and the solution was very simple.

On the Settings I went to Mission Control and there were 4 options on the top. The second one is related to switch to the Space where the app is open.

And the third one is related to group the app windows by space.

Just marked them all and it fixed my problem!

1

You must log in to answer this question.

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