diff --git a/src/qt/window.cpp b/src/qt/window.cpp index 2eb51fee4b..cabf652879 100644 --- a/src/qt/window.cpp +++ b/src/qt/window.cpp @@ -1568,7 +1568,11 @@ bool wxWindowQt::QtHandleCloseEvent ( QWidget *handler, QCloseEvent *WXUNUSED( e bool wxWindowQt::QtHandleContextMenuEvent ( QWidget *WXUNUSED( handler ), QContextMenuEvent *event ) { wxContextMenuEvent e( wxEVT_CONTEXT_MENU, GetId() ); - e.SetPosition( wxQtConvertPoint( event->globalPos() ) ); + e.SetPosition( + event->reason() == QContextMenuEvent::Keyboard + ? wxDefaultPosition + : wxQtConvertPoint( event->globalPos() ) + ); e.SetEventObject(this); return ProcessWindowEvent( e );