mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 805767 part.2 Implement nsIWidget::GetIMEUpdatePreference() on Windows for TSF r=emk
This commit is contained in:
parent
c2ec08b400
commit
0fa32a3173
@ -2564,6 +2564,19 @@ nsTextStore::OnFocusChange(bool aFocus,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// static
|
||||
nsIMEUpdatePreference
|
||||
nsTextStore::GetIMEUpdatePreference()
|
||||
{
|
||||
bool hasFocus = false;
|
||||
if (sTsfThreadMgr && sTsfTextStore && sTsfTextStore->mDocumentMgr) {
|
||||
nsRefPtr<ITfDocumentMgr> docMgr;
|
||||
sTsfThreadMgr->GetFocus(getter_AddRefs(docMgr));
|
||||
hasFocus = (docMgr == sTsfTextStore->mDocumentMgr);
|
||||
}
|
||||
return nsIMEUpdatePreference(hasFocus, false);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsTextStore::OnTextChangeInternal(uint32_t aStart,
|
||||
uint32_t aOldEnd,
|
||||
|
@ -124,6 +124,8 @@ public:
|
||||
return sTsfTextStore->OnSelectionChangeInternal();
|
||||
}
|
||||
|
||||
static nsIMEUpdatePreference GetIMEUpdatePreference();
|
||||
|
||||
static void CompositionTimerCallbackFunc(nsITimer *aTimer, void *aClosure)
|
||||
{
|
||||
nsTextStore *ts = static_cast<nsTextStore*>(aClosure);
|
||||
|
@ -7421,6 +7421,13 @@ nsWindow::OnIMESelectionChange(void)
|
||||
{
|
||||
return nsTextStore::OnSelectionChange();
|
||||
}
|
||||
|
||||
nsIMEUpdatePreference
|
||||
nsWindow::GetIMEUpdatePreference()
|
||||
{
|
||||
return nsTextStore::GetIMEUpdatePreference();
|
||||
}
|
||||
|
||||
#endif //NS_ENABLE_TSF
|
||||
|
||||
bool nsWindow::AssociateDefaultIMC(bool aAssociate)
|
||||
|
@ -176,6 +176,7 @@ public:
|
||||
NS_IMETHOD OnIMEFocusChange(bool aFocus);
|
||||
NS_IMETHOD OnIMETextChange(uint32_t aStart, uint32_t aOldEnd, uint32_t aNewEnd);
|
||||
NS_IMETHOD OnIMESelectionChange(void);
|
||||
virtual nsIMEUpdatePreference GetIMEUpdatePreference();
|
||||
#endif // NS_ENABLE_TSF
|
||||
NS_IMETHOD GetNonClientMargins(nsIntMargin &margins);
|
||||
NS_IMETHOD SetNonClientMargins(nsIntMargin &margins);
|
||||
|
Loading…
Reference in New Issue
Block a user