mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1053053 part.3 Notify child process's IMEStateManager of menu key event listener being installed r=smaug
This commit is contained in:
parent
52a95fd7ea
commit
0aae336afc
@ -463,7 +463,16 @@ IMEStateManager::OnChangeFocusInternal(nsPresContext* aPresContext,
|
||||
bool setIMEState = true;
|
||||
|
||||
if (newTabParent) {
|
||||
if (focusActuallyChanging) {
|
||||
if (aAction.mFocusChange == InputContextAction::MENU_GOT_PSEUDO_FOCUS ||
|
||||
aAction.mFocusChange == InputContextAction::MENU_LOST_PSEUDO_FOCUS) {
|
||||
// XXX When menu keyboard listener is being uninstalled, IME state needs
|
||||
// to be restored by the child process asynchronously. Therefore,
|
||||
// some key events which are fired immediately after closing menu
|
||||
// may not be handled by IME.
|
||||
unused << newTabParent->
|
||||
SendMenuKeyboardListenerInstalled(sInstalledMenuKeyboardListener);
|
||||
setIMEState = sInstalledMenuKeyboardListener;
|
||||
} else if (focusActuallyChanging) {
|
||||
InputContext context = widget->GetInputContext();
|
||||
if (context.mIMEState.mEnabled == IMEState::DISABLED) {
|
||||
setIMEState = false;
|
||||
|
@ -50,7 +50,14 @@ public:
|
||||
* managed by the focused content (sContent). If the focused content isn't
|
||||
* managing another process, this returns nullptr.
|
||||
*/
|
||||
static TabParent* GetActiveTabParent() { return sActiveTabParent.get(); }
|
||||
static TabParent* GetActiveTabParent()
|
||||
{
|
||||
// If menu has pseudo focus, we should ignore active child process.
|
||||
if (sInstalledMenuKeyboardListener) {
|
||||
return nullptr;
|
||||
}
|
||||
return sActiveTabParent.get();
|
||||
}
|
||||
|
||||
/**
|
||||
* OnTabParentDestroying() is called when aTabParent is being destroyed.
|
||||
|
@ -582,6 +582,12 @@ child:
|
||||
*/
|
||||
StopIMEStateManagement();
|
||||
|
||||
/**
|
||||
* MenuKeyboardListenerInstalled() is called when menu keyboard listener
|
||||
* is installed in the parent process.
|
||||
*/
|
||||
MenuKeyboardListenerInstalled(bool aInstalled);
|
||||
|
||||
/**
|
||||
* @see nsIDOMWindowUtils sendMouseEvent.
|
||||
*/
|
||||
|
@ -2207,6 +2207,13 @@ TabChild::RecvStopIMEStateManagement()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
TabChild::RecvMenuKeyboardListenerInstalled(const bool& aInstalled)
|
||||
{
|
||||
IMEStateManager::OnInstalledMenuKeyboardListener(aInstalled);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
TabChild::RecvMouseEvent(const nsString& aType,
|
||||
const float& aX,
|
||||
|
@ -530,6 +530,8 @@ protected:
|
||||
virtual bool RecvParentActivated(const bool& aActivated) override;
|
||||
|
||||
virtual bool RecvStopIMEStateManagement() override;
|
||||
virtual bool RecvMenuKeyboardListenerInstalled(
|
||||
const bool& aInstalled) override;
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
void MaybeRequestPreinitCamera();
|
||||
|
Loading…
Reference in New Issue
Block a user