[PATCH 1/2] Properly un/rewrap CreateWindow

Eamon Walsh ewalsh at tycho.nsa.gov
Tue Nov 17 18:42:59 PST 2009


On 11/17/2009 07:58 PM, Daniel Stone wrote:
> On Tue, Nov 17, 2009 at 01:59:42PM -0500, Adam Jackson wrote:
>   
>>  static Bool
>>  DUMMYCreateWindow(WindowPtr pWin)
>>  {
>>      DUMMYPtr dPtr = DUMMYPTR(DUMMYScrn);
>>      WindowPtr pWinRoot;
>>      int ret;
>> -	
>> +
>> +    pScreen->CreateWindow = dPtr->CreateWindow;
>>      ret = dPtr->CreateWindow(pWin);
>> +    pScreen->CreateWindow = DUMMYCreateWindow;
>> +
>>      if(ret != TRUE)
>>  	return(ret);
>>     
> Hm, is this canon? I thought the generally-accepted way to wrap would've
> been also to set dPtr->CreateWindow = pScreen->CreateWindow after
> calling the saved function, but I could be wrong.
>
> Cheers,
>   


Also of note here:

dummy_driver.c: In function ‘DUMMYCreateWindow’:
dummy_driver.c:772: error: ‘pScreen’ undeclared (first use in this function)
dummy_driver.c:772: error: (Each undeclared identifier is reported only once
dummy_driver.c:772: error: for each function it appears in.)







-- 

Eamon Walsh 
National Security Agency



More information about the xorg-devel mailing list