mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-28 02:27:41 +00:00
chore(windows): remove ForceFileName RefreshPreservedKeys
This commit is contained in:
parent
c4abc4fadb
commit
9136e57157
5 changed files with 5 additions and 45 deletions
|
|
@ -45,12 +45,6 @@ BOOL GetKeyboardFileName(LPSTR kbname, LPSTR buf, int nbuf)
|
|||
{
|
||||
PKEYMAN64THREADDATA _td = ThreadGlobals();
|
||||
if(!_td) return FALSE;
|
||||
if(_td->ForceFileName[0])
|
||||
{
|
||||
strncpy_s(buf, nbuf, _td->ForceFileName, nbuf - 1);
|
||||
buf[nbuf-1] = 0;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int n = 0;
|
||||
RegistryReadOnly *reg = Reg_GetKeymanInstalledKeyboard(kbname);
|
||||
|
|
|
|||
|
|
@ -595,7 +595,6 @@ BOOL AITIP::QueueDebugInformation(int ItemType, LPGROUP Group, LPKEY Rule, PWSTR
|
|||
{
|
||||
PKEYMAN64THREADDATA _td = ThreadGlobals();
|
||||
if(!_td) return TRUE;
|
||||
if(!_td->ForceFileName[0]) return TRUE;
|
||||
|
||||
SendDebugMessageFormat(0, sdmAIDefault, 0, "AIDebugger::QueueDebugInformation ItemType=%d", ItemType);
|
||||
AIDEBUGINFO di;
|
||||
|
|
@ -620,19 +619,3 @@ BOOL AITIP::QueueDebugInformation(int ItemType, LPGROUP Group, LPKEY Rule, PWSTR
|
|||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
typedef BOOL(WINAPI *PREFRESHPRESERVEDKEYSFUNC)(BOOL Activating);
|
||||
|
||||
void RefreshPreservedKeys(BOOL Activating) {
|
||||
#ifdef _WIN64
|
||||
HMODULE hModule = GetModuleHandle("kmtip64");
|
||||
#else
|
||||
HMODULE hModule = GetModuleHandle("kmtip");
|
||||
#endif
|
||||
if (hModule != NULL) {
|
||||
PREFRESHPRESERVEDKEYSFUNC pRefreshPreservedKeys = (PREFRESHPRESERVEDKEYSFUNC)GetProcAddress(hModule, "RefreshPreservedKeys");
|
||||
if (pRefreshPreservedKeys) {
|
||||
pRefreshPreservedKeys(Activating);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -215,8 +215,6 @@ typedef struct tagKEYMAN64THREADDATA
|
|||
FInitialised,
|
||||
FInitialising;
|
||||
|
||||
char ForceFileName[MAX_PATH];
|
||||
|
||||
DWORD ActiveKeymanID;
|
||||
|
||||
/* TIP Globals */
|
||||
|
|
|
|||
|
|
@ -529,19 +529,6 @@ extern "C" BOOL _declspec(dllexport) WINAPI Keyman_RestartEngine()
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/*******************************************************************************************/
|
||||
/* */
|
||||
/* Keyman Keyboard Override Functions */
|
||||
/* */
|
||||
/*******************************************************************************************/
|
||||
|
||||
|
||||
|
||||
void RefreshPreservedKeys(BOOL Activating);
|
||||
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------
|
||||
//
|
||||
// Utility guff functions
|
||||
|
|
@ -914,7 +901,11 @@ void ReleaseKeyboards(BOOL Lock)
|
|||
if(!_td || !_td->lpKeyboards) return;
|
||||
|
||||
|
||||
if(Lock) if(_td->lpActiveKeyboard && !_td->ForceFileName[0]) DeactivateDLLs(_td->lpActiveKeyboard);
|
||||
if(Lock) {
|
||||
if(_td->lpActiveKeyboard) {
|
||||
DeactivateDLLs(_td->lpActiveKeyboard);
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < _td->nKeyboards; i++)
|
||||
{
|
||||
|
|
@ -928,7 +919,6 @@ void ReleaseKeyboards(BOOL Lock)
|
|||
delete _td->lpKeyboards;
|
||||
|
||||
_td->lpKeyboards = NULL;
|
||||
if(!_td->ForceFileName[0]) _td->lpActiveKeyboard = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -71,11 +71,6 @@ BOOL SelectKeyboard(DWORD KeymanID)
|
|||
|
||||
__try
|
||||
{
|
||||
if (_td->ForceFileName[0])
|
||||
{
|
||||
SendDebugMessageFormat(hwnd, sdmGlobal, 0, "SelectKeyboard: Ignored due to ForceFile");
|
||||
return FALSE; // Keyboard file is force-loaded
|
||||
}
|
||||
|
||||
KMHideIM();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue