Create WXSendContextMenuEvent() helper function
Put common code from all the different ports into it. This is not very useful right now, but it will allow to change this function once, instead of applying the same change to all ports, in the upcoming commit.
This commit is contained in:
@@ -1619,15 +1619,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(
|
||||
const wxPoint pos =
|
||||
event->reason() == QContextMenuEvent::Keyboard
|
||||
? wxDefaultPosition
|
||||
: wxQtConvertPoint( event->globalPos() )
|
||||
);
|
||||
e.SetEventObject(this);
|
||||
|
||||
return ProcessWindowEvent( e );
|
||||
: wxQtConvertPoint( event->globalPos() );
|
||||
return WXSendContextMenuEvent(pos);
|
||||
}
|
||||
|
||||
bool wxWindowQt::QtHandleFocusEvent ( QWidget *WXUNUSED( handler ), QFocusEvent *event )
|
||||
|
Reference in New Issue
Block a user