Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!kth.se!cyklop.nada.kth.se!news From: d88-jwa@dront.nada.kth.se (Jon W{tte) Newsgroups: comp.sys.mac.programmer Subject: Re: Window Flickering Message-ID: <1991Jan20.110645.17487@nada.kth.se> Date: 20 Jan 91 11:06:45 GMT References: <1991Jan20.055545.7162@wpi.WPI.EDU> Organization: Royal Institute of Technology, Stockholm, Sweden Lines: 32 In article <1991Jan20.055545.7162@wpi.WPI.EDU> nuk@wpi.WPI.EDU (Jacob W Anderson) writes: >I assume that the flicker is from the activation event going on, but is there >a way to supress the activation event from the event qeue? aka:the equivalent >of the command key along with drag. >BEGIN > if FrontWindow <> MenuWindow then > BEGIN > BehindWindow:=FrontWindow; > SendBehind(BehindWindow,MenuWindow); > HiliteWindow(BehindWindow); > END; >END; >This code is ran constantly through my event loop, thus checking for any >dragging that the user may do. This last sentence is the problem : if you DragWindow() it will automagically bring your window to the front. Try implementing your own DragWindow ( using DragGrayRgn ) and have it SendBehind the window being dragged unless the cmd key is down. Generally, these kinds of things are better handled once (i.e. at dragging time) than in the event loop (like, looking for errors and correcting them afterwards) h+ Jon W{tte, Stockholm, Sweden, h+@nada.kth.se :: This article is fake. If you take it for real, the _REAL_ :: Jon W{tte will sue you for slander. So there ! Nyah ! :-)