Commit 01d34a06 authored by Sam Lantinga's avatar Sam Lantinga

*** empty log message ***

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40191
parent e21a23a6
...@@ -17,5 +17,6 @@ PH_SRCS = \ ...@@ -17,5 +17,6 @@ PH_SRCS = \
SDL_ph_video.c \ SDL_ph_video.c \
SDL_ph_video.h \ SDL_ph_video.h \
SDL_ph_wm.c \ SDL_ph_wm.c \
SDL_ph_wm_c.h \
SDL_phyuv.c \ SDL_phyuv.c \
SDL_phyuv_c.h SDL_phyuv_c.h
...@@ -233,6 +233,20 @@ void ph_SetCaption(_THIS, const char *title, const char *icon) ...@@ -233,6 +233,20 @@ void ph_SetCaption(_THIS, const char *title, const char *icon)
/* Iconify the window (stolen from PhHotKey sources by phearbear ;-) */ /* Iconify the window (stolen from PhHotKey sources by phearbear ;-) */
int ph_IconifyWindow(_THIS) 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 result=0;
int myerr; int myerr;
int num; int num;
...@@ -268,6 +282,7 @@ int ph_IconifyWindow(_THIS) ...@@ -268,6 +282,7 @@ int ph_IconifyWindow(_THIS)
SDL_Unlock_EventThread(); SDL_Unlock_EventThread();
return(result); return(result);
#endif /* 1 */
} }
SDL_GrabMode ph_GrabInputNoLock(_THIS, SDL_GrabMode mode) SDL_GrabMode ph_GrabInputNoLock(_THIS, SDL_GrabMode mode)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment