On Sat, 18 Jul 2009 20:14:47 +0800, Wang Lei wrote: > I think [hung is] caused by 'while',
Yes. > I think system should creat a asynchronous process. Isn't it? Not really. Otherwise, it'd be a bit difficult to block it. Yet your assumption is natural. (If you know emacs, you understand that things go serial there, too. I used to commit the same mistake.) Instead, actions can be triggered by "hooks". This is the natural method for window managers. Read manual on 'map-notify-hook' or 'add-window-hook'. In this way, you don't need cpu power consuming 'while' loop. Teika (Teika kazura)
