Re: Re: MacOS X [was: how to write snappy benchmark]
Torrey Lyons <[email protected]>
| Newsgroups | gmane.comp.xfree86.forum |
|---|---|
| Message-ID | <p06001802bb3341cfa817@[65.104.119.194]> |
At 10:10 AM +0100 7/10/03, Torgeir Veimo wrote: >On Thu, 2003-07-10 at 02:13, Torrey Lyons wrote: > >> The front application switches the cursor in response to mousing over >> an area by receiving an mouse moved event and telling the window >> server to change the cursor. CoreGraphics does not provide a way to >> set a cursor image to use for a particular region of a window. >> However, higher level API's can and do. For example Cocoa NSView's >> can be set to use a certain cursor image whenever the cursor is over >> them. The developer does not need to worry about switching >> explicitly, but there is still a round trip communication with the >> window server involved. > >So this means that the window server only provides the topmost window >for each application, unlike X11, which nest windows inside windows >inside windows? An application can have any number of windows, but from the X11 way of thinking of things they are all top-level windows. Typically an application like Terminal (like xterm) will only be run as one process, but it can have many separate terminal windows open at one time. Of all the windows on the screen, one is the active window that is receiving events. The application that owns this window is the foreground application and gets the special privileges mentioned before. You are correct that within a top level window Mac OS X does not use child windows for things such as buttons. These GUI widgets have no special meaning to the window server, they are just window content. Only the higher level toolkits assign special meaning to regions of the window. So, to be strictly correct your statement should be, "the window server only provides the top level windows for each application". --Torrey