src/video/photon/SDL_ph_wm.c
changeset 190 e4af2c852c09
parent 19 8cc4dbfab9ab
child 252 e8157fcb3114
     1.1 --- a/src/video/photon/SDL_ph_wm.c	Sun Sep 23 18:10:59 2001 +0000
     1.2 +++ b/src/video/photon/SDL_ph_wm.c	Sun Sep 23 18:19:44 2001 +0000
     1.3 @@ -233,6 +233,20 @@
     1.4  /* Iconify the window (stolen from PhHotKey sources by phearbear ;-) */
     1.5  int ph_IconifyWindow(_THIS)
     1.6  {
     1.7 +#if 1 /* Code submitted by Luca <barbato_luca@yahoo.com> */
     1.8 +	WmApiContext_t context=WmCreateContext();
     1.9 +	WmWindowDefinition_t
    1.10 +**wininfo=malloc(sizeof(WmWindowDefinition_t)*2);
    1.11 +	int num;									
    1.12 +	SDL_Lock_EventThread();
    1.13 +	WmGetFocusList(context,2,&num,wininfo);
    1.14 +	WmPerformFrameAction(context, wininfo[0]->rid,Pt_ACTION_MIN);
    1.15 +
    1.16 +	WmDestroyContext (context);   
    1.17 +	SDL_Unlock_EventThread();	 
    1.18 +	free(wininfo);		   
    1.19 +	return (0);   
    1.20 +#else
    1.21  	int result=0;
    1.22          int myerr;
    1.23          int num;
    1.24 @@ -268,6 +282,7 @@
    1.25  	SDL_Unlock_EventThread();
    1.26  
    1.27  	return(result);
    1.28 +#endif /* 1 */
    1.29  }
    1.30  
    1.31  SDL_GrabMode ph_GrabInputNoLock(_THIS, SDL_GrabMode mode)