Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
*** empty log message ***
  • Loading branch information
slouken committed Sep 23, 2001
1 parent 9415efe commit 12a0be0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/video/photon/Makefile.am
Expand Up @@ -17,5 +17,6 @@ PH_SRCS = \
SDL_ph_video.c \
SDL_ph_video.h \
SDL_ph_wm.c \
SDL_ph_wm_c.h \
SDL_phyuv.c \
SDL_phyuv_c.h
15 changes: 15 additions & 0 deletions src/video/photon/SDL_ph_wm.c
Expand Up @@ -233,6 +233,20 @@ void ph_SetCaption(_THIS, const char *title, const char *icon)
/* Iconify the window (stolen from PhHotKey sources by phearbear ;-) */
int ph_IconifyWindow(_THIS)
{
#if 1 /* Code submitted by Luca <barbato_luca@yahoo.com> */
WmApiContext_t context=WmCreateContext();
WmWindowDefinition_t
**wininfo=malloc(sizeof(WmWindowDefinition_t)*2);
int num;
SDL_Lock_EventThread();
WmGetFocusList(context,2,&num,wininfo);
WmPerformFrameAction(context, wininfo[0]->rid,Pt_ACTION_MIN);

WmDestroyContext (context);
SDL_Unlock_EventThread();
free(wininfo);
return (0);
#else
int result=0;
int myerr;
int num;
Expand Down Expand Up @@ -268,6 +282,7 @@ int ph_IconifyWindow(_THIS)
SDL_Unlock_EventThread();

return(result);
#endif /* 1 */
}

SDL_GrabMode ph_GrabInputNoLock(_THIS, SDL_GrabMode mode)
Expand Down

0 comments on commit 12a0be0

Please sign in to comment.