mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 11:23:42 +00:00
fixed an issue that FilamentGroupPopup dialog didn't dismiss on macOS (#13574)
On macOS, PopupWindow::OnMouseEvent2 synthesizes a wxEVT_ENTER_WINDOW on `this` whenever the hovered target transitions from a child back to the popup itself. wxPopupTransientWindow's OnIdle re-acquires mouse capture once the cursor leaves the popup, so the next MOTION (with the cursor already outside) hits OnMouseEvent2 with no child and synthesizes ENTER on the popup — which would otherwise cancel the dismissal timer started by OnLeaveWindow. Verify the cursor is actually inside before resetting.
This commit is contained in:
@@ -353,7 +353,13 @@ void FilamentGroupPopup::OnLeaveWindow(wxMouseEvent &)
|
|||||||
StartTimer();
|
StartTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FilamentGroupPopup::OnEnterWindow(wxMouseEvent &) { ResetTimer(); }
|
void FilamentGroupPopup::OnEnterWindow(wxMouseEvent &)
|
||||||
|
{
|
||||||
|
// Ignore spurious ENTER synthesized by PopupWindow::OnMouseEvent2 on macOS.
|
||||||
|
wxPoint pos = this->ScreenToClient(wxGetMousePosition());
|
||||||
|
if (!this->GetClientRect().Contains(pos)) return;
|
||||||
|
ResetTimer();
|
||||||
|
}
|
||||||
|
|
||||||
void FilamentGroupPopup::UpdateButtonStatus(int hover_idx)
|
void FilamentGroupPopup::UpdateButtonStatus(int hover_idx)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user