Friday, 22 May 2009

Switching 101 or: why that little red x just wont close your application

Here is a re-post of an entry I placed on explaining the differences between window behaviour in OS X and Windows, enjoy!

When you tell people that your are a principle OS X user there are usually three types of reaction. First is the fairly technology ambivalent general member of the public who will say ‘oh really,’ and continue with their daily lives, probably completely unaware of what OS X is. Secondly is the Windows fanatic who will take this statement as a challenge, viciously prompting you to prove why OS X is better than Windows, usually to a slurry of statements about hardware being the same and cost differences. And thirdly is the type of individual who inspired me to write this blog, the curious one who asks you to show them OS X, explain the differences, and highlight the advantages and disadvantages over Windows or Linux.

It is this kind of user with whom I often find myself sitting down and sharing my stories of switching, and showing them the ins and outs of Apple’s OS, calmly answering their questions and demoing the features. However, there are two questions I always get asked, why doesn’t the green plus make a window go full screen, and why doesn’t that red cross close the application. Both these questions concern window behaviour in OS X, and for those who have ever been confused, unsure, or just unaware of the difference I dedicate this entry, because there is a rhyme and a reason why windows behave the way they do in OS X, and if you sit close children I shall explain.

First, let us deal with the easier of the two explanations, the green plus button. Now, as those in the know will often tell you this button is not called ‘maximise’ (or ‘maximize’ if you live over the pond) but ‘zoom’. This difference may seem trivial, however it highlights the important difference between the two behaviours, the same way in which ‘fullscreen’ commands are never called ‘zoom’ commands as this would imply that the resolution remained constant but the image was stretched to fit. When a user presses that green button the window is resized to fit all the necessary content, whether it be a webpage or a Pages document. To put it more simply, the window resizes so that the user has no need for horizontal scrolling. But what about all those apps which seem to go fullscreen when I press the green icon I hear you cry! Well, there will be two reasons for this, firstly the program is a Windows port and the developers did not both to learn about window behaviour in OS X, or, the windows content is not fixed in place, and is relative to the window size, in which case it will resize to the last biggest size set by the user. Simple eh! It all makes sense when you know how.

Now then, let us deal with the Windows switchers number 1 error in OS X, thinking the red button closes an application. To understand why this doesn’t happen a few things must be made clear. Unlike most (if not all) Linux distributions, and Windows, OS X makes a clear distinction between the program itself, the functions of the program, and the contents of the program. This distinction will admittedly seem foreign to users of any other OS, however, it works as follows: the program itself is the dock icon, the functions of the program are the menu bar, and the contents of the program are the windows. Once this distinction is understood then the behaviour of the windows becomes apparent, and makes an awful lot of sense. Closing an application is either a function of the application, or something you do to the program as a whole, and as such this function is provided either via the menu bar or the dock. The red, yellow, and green buttons are on the window, and are therefore a function of the window meaning green zooms the window, yellow minimises the window, and red closes the window. The key difference is that in Windows, despite the fact the minimise and maximise buttons only affect the window in question, the cross closes the entire application. If you do not consider a window to be the whole application, the close button should only close the window, simple!

I hope that all made sense, I was very aware that I was writing ‘window’ and ‘application’ an awful lot. If there is one thing to understand from all this (other than I’m a sad bastard for writing a blog entry about application behaviour) is that in OS X a window is a window, and as such the coloured buttons on the window will only affect the window.

Now there is more to all this, however, I feel I have tortured you all enough. Sufficed to say some apps will close when you press that red x (shock horror!), however, this is to do with the usefulness of having an application like System Preferences open but running in the background, namely none. I am also not going to delve into the murky waters of why this method of using applications is better or worse than the Windows or Linux way, all I will say is that it is what it is, if you wanted to understand why then hopefully by now you do, or else I must apologise for putting you through this geeky exploration of the logic behind OS X.

Until next time, adieu.

No comments:

Post a Comment