fix 3
This commit is contained in:
parent
78cd7929bf
commit
c51e27e216
|
@ -1157,6 +1157,12 @@ _FX HDC Gdi_GetDummyDC(HDC dc, HWND hWnd)
|
|||
if (!dummy)
|
||||
dummy = map_insert(&Gui_DCCache, ret, NULL, sizeof(DUMMY_DC));
|
||||
|
||||
//
|
||||
// Note: GetDC GetDCEx GetWindowDC must use ReleaseDC, while CreateDC must use DeleteDC
|
||||
// We set bDelete = TRUE to make Gdi_OnFreeDC delete the DC and return NULL
|
||||
// then Gui_ReleaseDC will not call __sys_ReleaseDC
|
||||
//
|
||||
|
||||
dummy->bDelete = !!hWnd;
|
||||
dummy->hBmp = bmp;
|
||||
|
||||
|
|
|
@ -106,6 +106,7 @@ static ULONG_PTR Gui_HighestAddress = 0;
|
|||
BOOLEAN Gui_RenameClasses = TRUE;
|
||||
BOOLEAN Gui_OpenAllWinClasses = FALSE;
|
||||
BOOLEAN Gui_UseProtectScreen = FALSE;
|
||||
BOOLEAN Gui_UseBlockCapture = FALSE;
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
|
@ -95,9 +95,8 @@ _FX VOID Handle_SetDeleteOnClose(HANDLE FileHandle, BOOLEAN DeleteOnClose)
|
|||
EnterCriticalSection(&Handle_StatusData_CritSec);
|
||||
|
||||
HANDLE_STATE* state = map_get(&Handle_StatusData, FileHandle);
|
||||
if (!state) {
|
||||
if (!state)
|
||||
state = map_insert(&Handle_StatusData, FileHandle, NULL, sizeof(HANDLE_STATE));
|
||||
}
|
||||
|
||||
state->DeleteOnClose = DeleteOnClose;
|
||||
|
||||
|
@ -170,9 +169,9 @@ _FX VOID Handle_ExecuteCloseHandler(HANDLE FileHandle, BOOLEAN* DeleteOnClose)
|
|||
*DeleteOnClose = state->DeleteOnClose;
|
||||
CloseHandlers = state->CloseHandlers;
|
||||
if (state->RelocationPath) Dll_Free(state->RelocationPath);
|
||||
}
|
||||
|
||||
map_remove(&Handle_StatusData, FileHandle);
|
||||
}
|
||||
|
||||
LeaveCriticalSection(&Handle_StatusData_CritSec);
|
||||
|
||||
|
|
Loading…
Reference in New Issue