mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Merge "Fix forwarding event only when sending view is visible"
This commit is contained in:
commit
fd0d104fa7
@ -202,7 +202,12 @@ public final class InputView extends LinearLayout {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean needsToForward(final int x, final int y) {
|
protected boolean needsToForward(final int x, final int y) {
|
||||||
return isInKeyboardTopPadding(y);
|
// Forwarding an event only when {@link MainKeyboardView} is visible.
|
||||||
|
// Because the visibility of {@link MainKeyboardView} is controlled by its parent
|
||||||
|
// view in {@link KeyboardSwitcher#setMainKeyboardFrame()}, we should check the
|
||||||
|
// visibility of the parent view.
|
||||||
|
final View mainKeyboardFrame = (View)mSenderView.getParent();
|
||||||
|
return mainKeyboardFrame.getVisibility() == View.VISIBLE && isInKeyboardTopPadding(y);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user