=== modified file 'common/draw_panel.cpp' --- common/draw_panel.cpp 2016-06-17 17:58:14 +0000 +++ common/draw_panel.cpp 2016-07-31 18:37:36 +0000 @@ -885,6 +885,17 @@ pos = event.GetPosition(); m_ignoreMouseEvents = true; PopupMenu( &MasterMenu, pos ); + // here, we are waiting for popup menu closing. + // Among different ways, it can be closed by clicking on the left mouse button. + // The expected behavior is to move the mouse cursor to its initial + // location, where the right click was made. + // However there is a case where the move cursor does not work as expected: + // when the user left clicks on the caption frame: the entire window is moved. + // Calling wxSafeYield avoid this behavior because it allows the left click + // to be proceeded before moving the mouse + wxSafeYield(); + + // Move the mouse cursor to its initial position: MoveCursorToCrossHair(); m_ignoreMouseEvents = false;