Fix DropDown submenus on Linux/Wayland (#13563)

Hovering a group item (e.g. "Generic" in the filament list) now opens
its submenu correctly. The dropdown stays usable while moving the
cursor between the parent list and the submenu, and dismisses normally
when the user clicks outside.
This commit is contained in:
SoftFever
2026-05-11 01:32:59 +08:00
committed by GitHub
parent d37444b34a
commit c0ae2bda99
4 changed files with 47 additions and 1 deletions
+6
View File
@@ -17,6 +17,12 @@ public:
#ifdef __WXMSW__
void BindUnfocusEvent();
#endif
protected:
// Orca: Hook so derived classes (e.g. DropDown chains) can skip auto-dismissal
// when the toplevel deactivates as a side effect of their own popup grab
// (notably on Wayland, where mapping a chained xdg_popup with grab makes
// the parent toplevel briefly inactive).
virtual bool ShouldDismissOnTopWindowDeactivate() { return true; }
private:
#ifdef __WXOSX__
void OnMouseEvent2(wxMouseEvent &evt);