Mac OS X 10.5 (Leopard): Focus problem with iCal alarm window

Posted by Pierre Igot in: Macintosh
October 22nd, 2008 • 4:22 pm

In Mac OS X, when you use iCal to display an alarm for a particular event in one of your calendars, at the appropriate time Mac OS X displays a special alarm window that looks like this:

iCal Alarm window

This window is special in that it does not have a visible parent application: clicking on it does not bring the iCal application to the foreground. So the window’s parent application is not iCal, even though it is patently an iCal alarm window. The reason for this is fairly obvious: Mac OS X needs to display alarm messages even when the iCal application itself is not running.

So the iCal alarm window actually belongs to an invisible process called “iCal Helper,” which runs in the background at all times. Since this process does not have a visible front (a user interface), clicking on the iCal alarm window does not cause Mac OS X to switch to an application called “iCal Helper.” Instead, bringing this iCal alarm window to the foreground simply moves the current foreground window to the background, even though the window’s parent application remains in the foreground.

It is a bit of a strange situation, because, when you click on the iCal alarm window, the current application stays in the foreground—you can still see its name in the menu heading next to the Apple menu—but the application is actually in some kind of “foreground limbo”: all its windows are relegated to the background, all its palettes/inspectors disappear, and all its menu items become greyed out. But somehow it is still in the foreground.

It is not a particularly elegant situation, but it is a fairly familiar situation in Mac OS X. There have been a number of similar “orphan” windows in the Mac OS X over the years, the most notorious one being the Spotlight search results window in Mac OS X 10.4 (Tiger). Thankfully Apple got rid of that interface for Spotlight in Mac OS X 10.5, and the Spotlight search results window is now a window whose parent application is the Finder—although it still isn’t a “normal” Finder window and does not behave like other Finder windows. (It suffers from a number of limitations and bugs that don’t affect other Finder windows.)

The iCal alarm window is also special in that, even when you switch to another window and relegate it to the background (without closing it), it still stays in front of all other windows, including the foreground window. Until you close it, it stays in front of everything else as a “background foreground” window.

Now, while I don’t find these quirks particularly elegant, I don’t really have a huge problem with them. After all, they serve a purpose by helping to make sure that the user sees the alarm and that it does not get buried under a pile of other windows. Anything that helps the user avoid missing important events/appointments cannot be all bad, even if it’s not very elegant.

What I do have a problem with, however, is what happens when I decide to leave the iCal alarm window open for a while. This happens to me regularly because my events are reminders of things that I need to do but I don’t have to do them right away.

So when I don’t have time to do the thing that I am reminded of right away but I don’t want to forget that I have to do it soon, I leave the iCal alarm window with the reminder open in that “background foreground” mentioned above. This means what, whatever else I do on my computer, the iCal alarm window will remain visible on my screen until I actually close it. It effectively acts as some kind of “persistent reminder”—not too nagging and too obtrusive, but still noticeable and therefore quietly serving its purpose.

The problem is that, when I do this and leave the iCal alarm window open in the “background foreground,” inevitably, after a while, for absolutely no reason, Mac OS X brings the “background foreground” window back to the foreground, thereby causing the current foreground application’s windows—including the one that I am currently working on—to be relegated to the background.

I have absolutely no idea why it does that. It seems to happen randomly, at times that don’t have anything to do with the original timing of the event or the reminder. Nothing else happens. Mac OS X does not play the alarm sound again, and I certainly never asked it to repeat the alarm or anything.

It is quite irritating, because this typically happens right when I am in the middle of typing some text, and so of course I continue typing while the iCal alarm moves to the foreground and this causes Mac OS X to play the system alert sound repeatedly because of my “invalid” keystrokes.

This is not something that happens only occasionally. If I leave an iCal alarm window open, it will inevitably happen, after half an hour, an hour or more. And it will happen again and again, at seemingly random intervals, until I finally close the alarm window.

This is definitely not a desirable behaviour, because it interferes with my typing. I am OK with the iCal alarm window interfering with what I am doing when it first pops up, because that what iCal alarms are for. But I am not OK with this on-going buggy behaviour after the initial appearance of the window.

It looks as if my way of using these iCal alarm windows as “persistent background reminders” has actually never been tested by Apple’s own engineers and they haven’t noticed this problem. It is going to be a bit hard to report the problem—because there is no apparent cause for the behaviour, no steps that can be used to reproduce it, except by leaving the alarm window open and waiting patiently for the problem to occur—and it’s probably going to be even harder to get Apple to do something about it, because it’s a rather minor problem.

But it’s irritating nonetheless and it confirms that iCal is a Mac OS X feature that still suffers from a continuing lack of polish. (The multiple bugs in the new “information bubble” for editing events are positively atrocious, but that’s for another post.)


3 Responses to “Mac OS X 10.5 (Leopard): Focus problem with iCal alarm window”

  1. ssp says:

    Very true, but I think it’s just a sign of the general trend that window management (and focus issues!) pretty much got out of control recently.

    Situations where the system and its framework mess up things like focus and keyboard focus are pretty much ‘normal’ by now. Which is a shame. I blame it on sloppy and Unixy programming practices which don’t see the system and user experience as whole but rather treat all processes independently while giving each process too much power in pushing its windows in front of the others without the user’s interaction.

    A _very_ common example of this for me is the following. Launch an application like iPhoto whose launch time is pretty much eternal with 20K photos and a bit of swapping. It’s so long that I usually try to benefit from the system’s multitasking abilities and just read a few items in my RSS reader in the meantime. This could be nice. But it isn’t because iPhoto switches its window to the foreground several times while launching even though I explicitly clicked into another application and make iPhoto a background application before.

    That’s always driving me nuts as it keeps me from actually benefiting from the theoretical technical underpinnings of the system that let me do something else while a lengthy task is completed.

    I suppose the cynical question would be whether it’s less likely that Apple fix the window ordering and focusing behaviour or that they create a version of iPhoto that has a reasonable launch time on systems other than the ones they use for keynotes…

  2. Pierre Igot says:

    Yes, one of my pet peeves too. I have a number of applications that take too long to load for my taste, so I frequently switch to something else while they are loading. And I experience the exact same thing you describe, sometimes with the additional annoyance of having the loaded application’s Dock icon bouncing until I bring it to the foreground!

    As well, in Safari, if you switch to another window/tab while a page is loading, quite frequently Safari brings the original page to the foreground without your consent. It’s the same problem, but within Safari. And it’s even more inexcusable because there is no way you can make the assumption that pages load instantly.

    It’s all very frustrating. The user should be in control at all times and be allowed to use his machine to its fullest capacity without undue interference. But of course the majority of Mac users do not multitask like we do (they have more patience or are more resigned to letting their machine dictate how it is to be used), so Apple will always treat this as a “minor” issue only affecting a smaller number of users.

  3. sol says:

    Same here. I find it quite insulting when the computer tells me how I should work. Sometimes, it seems that it has a mind of it’s own.

    Although not a permanent nor an ideal solution, I leave the applications that I use the most running all the time. As long as they run without crashing, they take much less time to become active once I need them. I typically only restart them when I restart the entire system, about once every six weeks. These applications include Microsoft Office and most of Adobe Creative Suite.

Leave a Reply

Comments are closed.