[WIN32SS][USER32] Add Ghost codes (retrial of #1100) (#1112)

CORE-11944
This commit is contained in:
Katayama Hirofumi MZ 2018-12-11 12:30:59 +09:00 committed by GitHub
parent 99b055a506
commit f469acacec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 199 additions and 21 deletions

View file

@ -7,12 +7,12 @@
#include <user32.h>
#include <strsafe.h>
#include "ghostwnd.h"
WINE_DEFAULT_DEBUG_CHANNEL(ghost);
#define GHOST_TIMER_ID 0xFACEDEAD
#define GHOST_INTERVAL 1000 // one second
#define GHOST_PROP L"GhostProp"
const struct builtin_class_descr GHOST_builtin_class =
{
@ -105,13 +105,6 @@ IntMakeGhostImage(HBITMAP hbm)
/****************************************************************************/
typedef struct GHOST_DATA
{
HWND hwndTarget;
HBITMAP hbm32bpp;
BOOL bDestroyTarget;
} GHOST_DATA;
static GHOST_DATA *
Ghost_GetData(HWND hwnd)
{
@ -188,9 +181,9 @@ Ghost_OnCreate(HWND hwnd, CREATESTRUCTW *lpcs)
// get the target
hwndTarget = (HWND)lpcs->lpCreateParams;
if (!IsWindowVisible(hwndTarget) || // invisible?
GetParent(hwndTarget) || // child?
!IsHungAppWindow(hwndTarget)) // not hung?
if (!IsWindowVisible(hwndTarget) || // invisible?
(GetWindowLongPtrW(hwndTarget, GWL_STYLE) & WS_CHILD) || // child?
!IsHungAppWindow(hwndTarget)) // not hung?
{
return FALSE;
}