Problem
When the Cinnamon menu is open, it installs a global captured-event handler via PopupMenuManager._grab() (popupMenu.js). Any BUTTON_PRESS event that does not originate from within the menu is treated as a click outside and triggers _closeMenu().
Cinnamon has an escape hatch for this — Main.virtualKeyboardManager.shouldTakeEvent(event) — which is supposed to let virtual keyboard clicks pass through without closing the menu. However, its implementation (virtualKeyboard.js#L818) only recognises Cinnamon's own built-in on-screen keyboard:
shouldTakeEvent(event) {
if (!this._keyboard)
return false;
let actor = event.get_source();
return Main.layoutManager.keyboardBox.contains(actor) ||
!!actor._extendedKeys || !!actor.extendedKey;
}
Onboard is an external X11 window and is never inside keyboardBox, so shouldTakeEvent() returns false for every Onboard key press. The menu then closes immediately.
This happens regardless of Onboard's window mode (normal, force-to-top/override-redirect, docking).
Expected behaviour
Clicking an Onboard key while the Cinnamon menu search box is focused should type into the search box without closing the menu.
Suggested fix
Extend shouldTakeEvent() to also accept events from windows with _NET_WM_WINDOW_TYPE_DOCK or override_redirect set — the standard way external OSKs identify themselves to the WM.
Reference
Reported by a user in onboard-osk/onboard#41
Problem
When the Cinnamon menu is open, it installs a global
captured-eventhandler viaPopupMenuManager._grab()(popupMenu.js). AnyBUTTON_PRESSevent that does not originate from within the menu is treated as a click outside and triggers_closeMenu().Cinnamon has an escape hatch for this —
Main.virtualKeyboardManager.shouldTakeEvent(event)— which is supposed to let virtual keyboard clicks pass through without closing the menu. However, its implementation (virtualKeyboard.js#L818) only recognises Cinnamon's own built-in on-screen keyboard:Onboard is an external X11 window and is never inside
keyboardBox, soshouldTakeEvent()returnsfalsefor every Onboard key press. The menu then closes immediately.This happens regardless of Onboard's window mode (normal, force-to-top/override-redirect, docking).
Expected behaviour
Clicking an Onboard key while the Cinnamon menu search box is focused should type into the search box without closing the menu.
Suggested fix
Extend
shouldTakeEvent()to also accept events from windows with_NET_WM_WINDOW_TYPE_DOCKoroverride_redirectset — the standard way external OSKs identify themselves to the WM.Reference
Reported by a user in onboard-osk/onboard#41