mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1229967 - Handle onKeyDown() for the menu key in GeckoMenu. r=sebastian, a=lizzard
This restores the functionality to close the menu by pressing the hardware menu key. MozReview-Commit-ID: EKCeALPvFoB
This commit is contained in:
parent
8359c21464
commit
d2a8b69f5b
@ -461,6 +461,17 @@ public class GeckoMenu extends ListView
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
// Close the menu if it is open and the hardware menu key is pressed.
|
||||
if (keyCode == KeyEvent.KEYCODE_MENU && isShown()) {
|
||||
close();
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.onKeyDown(keyCode, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isShortcutKey(int keyCode, KeyEvent event) {
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user