[futurebasic] Re: [FB] Exiting Lion Full Screen Mode using Escape Key

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 2011 : Group Archive : Group : All Groups

From: Bernie <fblist.bw@...>
Date: Mon, 19 Sep 2011 16:55:30 +0100
Steve wrote:

> When I drag a window from one monitor to another the background of the window is redrawn.   I cannot capture the event and haven't found it in the documentation.
> 
> What event should I be looking for?

If compositing window, I suppose you could install a control draw handler on its content view.

Bernie

'---------------
include "Tlbx HIView.incl"
include "Util_CE.incl"

local fn MyContentViewDrawHandler( nextHandler as EventHandlerCallRef, theEvent as EventRef, userData as pointer )
'~'1
// do something.....
beep
end fn = _noErr

dim as HIViewRef contentView
appearance window 1,"Drag me", (0,0)-(480,360), _kDocumentWindowClass, _kWindowCompositingAttribute
fn HIViewFindByID( fn HIViewGetRoot( window( _wndRef ) ), kHIViewWindowContentID, @contentView )
fn CEAddEvent( _kEventClassControl, _kEventControlDraw )
fn CEInstallControlEventHandler( contentView, @fn MyContentViewDrawHandler, NULL, NULL )
RunApplicationEventLoop()
'---------------