Fix issue: When left-clicking on the "window frame" (blue top area on Windows) (Any editor), the window jumps to bottom half of the screen, if a context menu is currently opened (could be Windows specific)
This commit is contained in:
parent
91a3b3d396
commit
498c8ce61d
|
@ -885,6 +885,17 @@ bool EDA_DRAW_PANEL::OnRightClick( wxMouseEvent& event )
|
||||||
pos = event.GetPosition();
|
pos = event.GetPosition();
|
||||||
m_ignoreMouseEvents = true;
|
m_ignoreMouseEvents = true;
|
||||||
PopupMenu( &MasterMenu, pos );
|
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();
|
MoveCursorToCrossHair();
|
||||||
m_ignoreMouseEvents = false;
|
m_ignoreMouseEvents = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue