[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Window server and System UI Process (Was: Re: Notification once a mi
Re: Window server and System UI Process (Was: Re: Notification once a minute - for a clock...)
Sun, 27 Nov 2005 15:42:20 +0100
On 27.11.2005, at 15:32, Stefan Urbanek wrote:
On 26.11.2005, at 23:06, Jiva DeVoe wrote:
So I'm sorta hacking on WildMenus this weekend, and have
implemented a primitive clock in the menubar... I'm wondering
what's the best way to get my clock to redraw once a minute?
Obviously the menu code itself gets linked into each application,
so having 20 applications all launching their own little
background timers to update the menubar clock sounds kinda
cruddy. What would be the best way to do this? I imagine some
kind of NSNotification but that also seems cruddy.
(ps: For those who want said functionality - I have been sending
patches to Michael Hanni, the WildMenus maintainer, so look for a
release from him eventually.)
Just for inspiration, how it looks on OS X. Here is a screenshot
from Quartz debug - an application that can show all windows and
Main menu (horizontal) is window number WID=5 owned by process
called WindowsServer. That means that the menu is not drawn nor
owned by any application, applications just provide menu contents
that is passed to the menu owner - window server.
The status bar is owned by damon/process called system UI server.
WID 3a is the status bar (see NSStatusItem class) and WID 39 is the
Spotlight magnifier icon.
Having those two processes separated from applications can simplify
lots of things, including custom menu orientation, addition of
shared menu entries across applications (like apple has apple menu,
or menu with debug or scripting actions)...
I forgot to add few other facts:
- desktop is WID=1, owned by Window Server
- all desktop icons are regular windows owned by application Finder (*)
- dock is separate process
- each dock icon is a window
- each dragged object (for example a button in IB) is a "window" -
you can see it nicely in the Quartz debug how location changes as you
- interface builder connector is composed of 3 to 4 "windows" as
-- horizontal line with line width (=window height) 2
-- vertical line with line width (=window width) = 2
-- connector origin box (small semi-transparent rectangular window on
top of source object)
-- target box (semi-transparent, selection-like window on top of
Looks like "window" on OS X is reused term to new concpet that I
would call "screen object", so window server can be renamed to
"display object server" or "screen object server".
Old term: window, window server
New term: screen object, screen object server
(*)See following link for more information: http://
First they ignore you, then they laugh at you, then they fight you,
then you win.
- Mahatma Gandhi